Signed-off-by: Howard Lau <howardlau1999@hotmail.com>
This commit is contained in:
Howard Lau 2020-10-29 09:03:30 +00:00
parent f8e325e446
commit 2c0d8fac02
No known key found for this signature in database
GPG Key ID: 5CCC55849E3CF8E2
2 changed files with 3 additions and 28 deletions

View File

@ -33,33 +33,8 @@ func (r *SeaweedReconciler) createFilerStatefulSet(m *seaweedv1.Seaweed) *appsv1
filerPodSpec.Containers = []corev1.Container{{
Name: "seaweedfs",
Image: m.Spec.Image,
ImagePullPolicy: corev1.PullIfNotPresent,
Env: []corev1.EnvVar{
{
Name: "POD_IP",
ValueFrom: &corev1.EnvVarSource{
FieldRef: &corev1.ObjectFieldSelector{
FieldPath: "status.podIP",
},
},
},
{
Name: "POD_NAME",
ValueFrom: &corev1.EnvVarSource{
FieldRef: &corev1.ObjectFieldSelector{
FieldPath: "metadata.name",
},
},
},
{
Name: "NAMESPACE",
ValueFrom: &corev1.EnvVarSource{
FieldRef: &corev1.ObjectFieldSelector{
FieldPath: "metadata.namespace",
},
},
},
},
ImagePullPolicy: m.BaseFilerSpec().ImagePullPolicy(),
Env: append(m.BaseFilerSpec().Env(), kubernetesEnvVars...),
Command: []string{
"/bin/sh",
"-ec",

View File

@ -22,7 +22,7 @@ func (r *SeaweedReconciler) createMasterStatefulSet(m *seaweedv1.Seaweed) *appsv
masterPodSpec.Containers = []corev1.Container{{
Name: "seaweedfs",
Image: m.Spec.Image,
ImagePullPolicy: corev1.PullIfNotPresent,
ImagePullPolicy: m.BaseMasterSpec().ImagePullPolicy(),
Env: append(m.BaseMasterSpec().Env(), kubernetesEnvVars...),
Command: []string{
"/bin/sh",