diff --git a/pkg/resources/statefulsets/minio-statefulset.go b/pkg/resources/statefulsets/minio-statefulset.go index 8c75d905902..84750d888a4 100644 --- a/pkg/resources/statefulsets/minio-statefulset.go +++ b/pkg/resources/statefulsets/minio-statefulset.go @@ -879,6 +879,12 @@ func getInitContainer(t *miniov2.Tenant, operatorImage string) v1.Container { "--tenant", t.Name, }, + Env: []corev1.EnvVar{ + { + Name: "CLUSTER_DOMAIN", + Value: miniov2.GetClusterDomain(), + }, + }, VolumeMounts: []corev1.VolumeMount{ CfgVolumeMount, }, @@ -900,6 +906,12 @@ func getSideCarContainer(t *miniov2.Tenant, operatorImage string) v1.Container { "--config-name", t.Spec.Configuration.Name, }, + Env: []corev1.EnvVar{ + { + Name: "CLUSTER_DOMAIN", + Value: miniov2.GetClusterDomain(), + }, + }, VolumeMounts: []corev1.VolumeMount{ CfgVolumeMount, },