@@ -26,11 +26,7 @@ import (
2626 corev1 "k8s.io/api/core/v1"
2727 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2828 "k8s.io/apimachinery/pkg/util/intstr"
29- )
30-
31- const (
32- // ServiceCommand -
33- ServiceCommand = "/usr/local/bin/kolla_set_configs && /usr/local/bin/kolla_start"
29+ "k8s.io/utils/ptr"
3430)
3531
3632// Deployment func
@@ -40,8 +36,6 @@ func Deployment(
4036 labels map [string ]string ,
4137 annotations map [string ]string ,
4238) * appsv1.Deployment {
43- runAsUser := int64 (0 )
44-
4539 livenessProbe := & corev1.Probe {
4640 // TODO might need tuning
4741 TimeoutSeconds : 5 ,
@@ -70,7 +64,7 @@ func Deployment(
7064 },
7165 }
7266 } else {
73- args = append (args , ServiceCommand )
67+ args = append (args , KollaServiceCommand )
7468 //
7569 // https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
7670 //
@@ -112,10 +106,10 @@ func Deployment(
112106 Args : args ,
113107 Image : instance .Spec .ContainerImage ,
114108 SecurityContext : & corev1.SecurityContext {
115- RunAsUser : & runAsUser ,
109+ RunAsUser : ptr . To ( PlacementUserID ) ,
116110 },
117111 Env : env .MergeEnvs ([]corev1.EnvVar {}, envVars ),
118- VolumeMounts : getVolumeMounts (),
112+ VolumeMounts : getVolumeMounts ("api" ),
119113 Resources : instance .Spec .Resources ,
120114 ReadinessProbe : readinessProbe ,
121115 LivenessProbe : livenessProbe ,
0 commit comments