Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Devbox runtime support release command and args #5078

Merged
merged 3 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions controllers/devbox/api/v1alpha1/runtime_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,18 @@ type Config struct {
// kubebuilder:validation:Optional
Args []string `json:"args,omitempty"`
// +kubebuilder:validation:Optional
// +kubebuilder:default=/home/sealos/project
WorkingDir string `json:"workingDir,omitempty"`
// +kubebuilder:validation:Optional
Env []corev1.EnvVar `json:"env,omitempty"`

// +kubebuilder:validation:Optional
// +kubebuilder:default={/bin/bash,-c}
ReleaseCommand []string `json:"releaseCommand,omitempty"`
// +kubebuilder:validation:Optional
// +kubebuilder:default={/home/sealos/project/entrypoint.sh}
ReleaseArgs []string `json:"releaseArgs,omitempty"`

// +kubebuilder:validation:Optional
// +kubebuilder:default={{name:"devbox-ssh-port",containerPort:22,protocol:TCP}}
Ports []corev1.ContainerPort `json:"ports,omitempty"`
Expand Down
14 changes: 14 additions & 0 deletions controllers/devbox/config/crd/bases/devbox.sealos.io_runtimes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,19 @@ spec:
- containerPort
type: object
type: array
releaseArgs:
default:
- /home/sealos/project/entrypoint.sh
items:
type: string
type: array
releaseCommand:
default:
- /bin/bash
- -c
items:
type: string
type: array
user:
default: sealos
type: string
Expand Down Expand Up @@ -1902,6 +1915,7 @@ spec:
type: object
type: array
workingDir:
default: /home/sealos/project
type: string
required:
- image
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ spec:
description: go1.22.5
config:
image: ghcr.io/cbluebird/devbox/go1.22.5:2f4067
workingDir: /home/sealos/project
releaseCommand:
- /bin/bash
- -c
releaseArgs:
- /home/sealos/project/entrypoint.sh
category:
- ubuntu
- go
Expand Down
14 changes: 14 additions & 0 deletions controllers/devbox/deploy/manifests/deploy.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3230,6 +3230,19 @@ spec:
- containerPort
type: object
type: array
releaseArgs:
default:
- /home/sealos/project/entrypoint.sh
items:
type: string
type: array
releaseCommand:
default:
- /bin/bash
- -c
items:
type: string
type: array
user:
default: sealos
type: string
Expand Down Expand Up @@ -4885,6 +4898,7 @@ spec:
type: object
type: array
workingDir:
default: /home/sealos/project
type: string
required:
- image
Expand Down
Loading