added volume as a config in images
All checks were successful
Build and Push Docker Image / Build image (push) Successful in 2m6s
All checks were successful
Build and Push Docker Image / Build image (push) Successful in 2m6s
This commit is contained in:
parent
3a85e44ad4
commit
061f8d6d07
@ -37,6 +37,7 @@ type ImageSpec struct {
|
|||||||
Tag string `json:"tag"`
|
Tag string `json:"tag"`
|
||||||
Location string `json:"location"`
|
Location string `json:"location"`
|
||||||
WorkingDir string `json:"working_dir"`
|
WorkingDir string `json:"working_dir"`
|
||||||
|
Volume string `json:"volume,omitempty"`
|
||||||
Command []string `json:"command,omitempty"`
|
Command []string `json:"command,omitempty"`
|
||||||
Ports []Port `json:"ports"`
|
Ports []Port `json:"ports"`
|
||||||
Args []string `json:"args,omitempty"`
|
Args []string `json:"args,omitempty"`
|
||||||
|
@ -680,6 +680,11 @@ func (r *ServerManagerReconciler) ServerPod(s *servermanagerv1alpha1.ServerManag
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
volumePath := image.Spec.Volume
|
||||||
|
if volumePath == "" {
|
||||||
|
volumePath = image.Spec.WorkingDir
|
||||||
|
}
|
||||||
|
|
||||||
pod := &corev1.Pod{
|
pod := &corev1.Pod{
|
||||||
ObjectMeta: metav1.ObjectMeta{
|
ObjectMeta: metav1.ObjectMeta{
|
||||||
Name: s.Name,
|
Name: s.Name,
|
||||||
@ -709,7 +714,7 @@ func (r *ServerManagerReconciler) ServerPod(s *servermanagerv1alpha1.ServerManag
|
|||||||
Ports: ports,
|
Ports: ports,
|
||||||
VolumeMounts: []corev1.VolumeMount{{
|
VolumeMounts: []corev1.VolumeMount{{
|
||||||
Name: "volume",
|
Name: "volume",
|
||||||
MountPath: image.Spec.WorkingDir,
|
MountPath: volumePath,
|
||||||
}},
|
}},
|
||||||
Stdin: true,
|
Stdin: true,
|
||||||
TTY: true,
|
TTY: true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user