Documentation ¶
Index ¶
- Constants
- func GenerateCommand(devbox *devboxv1alpha1.Devbox, runtime *devboxv1alpha1.Runtime) []string
- func GenerateDevboxArgs(devbox *devboxv1alpha1.Devbox, runtime *devboxv1alpha1.Runtime) []string
- func GenerateDevboxEnvVars(devbox *devboxv1alpha1.Devbox, nextCommitHistory *devboxv1alpha1.CommitHistory) []corev1.EnvVar
- func GenerateDevboxPhase(devbox *devboxv1alpha1.Devbox, podList corev1.PodList) devboxv1alpha1.DevboxPhase
- func GeneratePodAnnotations(devbox *devboxv1alpha1.Devbox, runtime *devboxv1alpha1.Runtime) map[string]string
- func GeneratePodLabels(devbox *devboxv1alpha1.Devbox, runtime *devboxv1alpha1.Runtime) map[string]string
- func GenerateResourceRequirements(devbox *devboxv1alpha1.Devbox, requestCPURate, requestMemoryRate float64, ...) corev1.ResourceRequirements
- func GenerateSSHKeyPair() ([]byte, []byte, error)
- func GenerateSSHVolume(devbox *devboxv1alpha1.Devbox) corev1.Volume
- func GenerateSSHVolumeMounts() []corev1.VolumeMount
- func GenerateWorkingDir(devbox *devboxv1alpha1.Devbox, runtime *devboxv1alpha1.Runtime) string
- func GetLastSuccessCommitHistory(devbox *devboxv1alpha1.Devbox) *devboxv1alpha1.CommitHistory
- func GetLastSuccessCommitImageName(devbox *devboxv1alpha1.Devbox, runtime *devboxv1alpha1.Runtime) string
- func IsExceededQuotaError(err error) bool
- func MergeCommitHistory(devbox *devboxv1alpha1.Devbox, latestDevbox *devboxv1alpha1.Devbox) []*devboxv1alpha1.CommitHistory
- func PodMatchExpectations(expectPod *corev1.Pod, pod *corev1.Pod) bool
- func PredicateCommitStatus(pod *corev1.Pod) devboxv1alpha1.CommitStatus
- func UpdateCommitHistory(devbox *devboxv1alpha1.Devbox, pod *corev1.Pod, updateStatus bool)
- func UpdateDevboxStatus(current, latest *devboxv1alpha1.Devbox)
- func UpdatePredicatedCommitStatus(devbox *devboxv1alpha1.Devbox, pod *corev1.Pod)
Constants ¶
const (
DevBoxPartOf = "devbox"
)
Variables ¶
This section is empty.
Functions ¶
func GenerateCommand ¶
func GenerateCommand(devbox *devboxv1alpha1.Devbox, runtime *devboxv1alpha1.Runtime) []string
GenerateCommand generates the command for the Devbox pod
func GenerateDevboxArgs ¶
func GenerateDevboxArgs(devbox *devboxv1alpha1.Devbox, runtime *devboxv1alpha1.Runtime) []string
GenerateDevboxArgs generates the arguments for the Devbox pod
func GenerateDevboxEnvVars ¶
func GenerateDevboxEnvVars(devbox *devboxv1alpha1.Devbox, nextCommitHistory *devboxv1alpha1.CommitHistory) []corev1.EnvVar
func GenerateDevboxPhase ¶
func GenerateDevboxPhase(devbox *devboxv1alpha1.Devbox, podList corev1.PodList) devboxv1alpha1.DevboxPhase
func GeneratePodAnnotations ¶
func GeneratePodAnnotations(devbox *devboxv1alpha1.Devbox, runtime *devboxv1alpha1.Runtime) map[string]string
func GeneratePodLabels ¶
func GeneratePodLabels(devbox *devboxv1alpha1.Devbox, runtime *devboxv1alpha1.Runtime) map[string]string
func GenerateResourceRequirements ¶
func GenerateResourceRequirements(devbox *devboxv1alpha1.Devbox, requestCPURate, requestMemoryRate float64, requestEphemeralStorage, limitEphemeralStorage string, ) corev1.ResourceRequirements
func GenerateSSHKeyPair ¶
func GenerateSSHVolume ¶
func GenerateSSHVolume(devbox *devboxv1alpha1.Devbox) corev1.Volume
GenerateSSHVolume generates a volume for SSH keys
func GenerateSSHVolumeMounts ¶
func GenerateSSHVolumeMounts() []corev1.VolumeMount
func GenerateWorkingDir ¶
func GenerateWorkingDir(devbox *devboxv1alpha1.Devbox, runtime *devboxv1alpha1.Runtime) string
GenerateWorkingDir generates the working directory for the Devbox pod
func GetLastSuccessCommitHistory ¶
func GetLastSuccessCommitHistory(devbox *devboxv1alpha1.Devbox) *devboxv1alpha1.CommitHistory
func GetLastSuccessCommitImageName ¶
func GetLastSuccessCommitImageName(devbox *devboxv1alpha1.Devbox, runtime *devboxv1alpha1.Runtime) string
func IsExceededQuotaError ¶
func MergeCommitHistory ¶
func MergeCommitHistory(devbox *devboxv1alpha1.Devbox, latestDevbox *devboxv1alpha1.Devbox) []*devboxv1alpha1.CommitHistory
func PredicateCommitStatus ¶
func PredicateCommitStatus(pod *corev1.Pod) devboxv1alpha1.CommitStatus
PredicateCommitStatus returns the commit status of the pod if the pod container id is empty, it means the pod is pending or has't started, we can assume the image has not been committed otherwise, it means the pod has been started, we can assume the image has been committed
func UpdateCommitHistory ¶
func UpdateCommitHistory(devbox *devboxv1alpha1.Devbox, pod *corev1.Pod, updateStatus bool)
func UpdateDevboxStatus ¶
func UpdateDevboxStatus(current, latest *devboxv1alpha1.Devbox)
UpdateDevboxStatus updates the devbox status, including phase, pod phase, last terminated state and commit history, maybe we need update more fields in the future TODO: move this function to devbox types.go
func UpdatePredicatedCommitStatus ¶
func UpdatePredicatedCommitStatus(devbox *devboxv1alpha1.Devbox, pod *corev1.Pod)
Types ¶
This section is empty.