From 03d7bacd60a6e2cd0f4df3a160d44053e14104a9 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Sat, 1 Jan 2022 11:41:26 -0800 Subject: [PATCH] avoid error when chmod fails, continue instead --- pkg/resources/statefulsets/log.go | 1 + pkg/resources/statefulsets/prometheus.go | 1 + 2 files changed, 2 insertions(+) diff --git a/pkg/resources/statefulsets/log.go b/pkg/resources/statefulsets/log.go index f097790a9ca..9305201fea8 100644 --- a/pkg/resources/statefulsets/log.go +++ b/pkg/resources/statefulsets/log.go @@ -219,6 +219,7 @@ func NewForLogDb(t *miniov2.Tenant, serviceName string) *appsv1.StatefulSet { "-R", fmt.Sprintf("%s:%s", strconv.FormatInt(*dbPod.Spec.SecurityContext.RunAsUser, 10), strconv.FormatInt(*dbPod.Spec.SecurityContext.RunAsGroup, 10)), "/var/lib/postgresql/data", + "||", "true", }, SecurityContext: &initContainerSecurityContext, VolumeMounts: logVolumeMounts(t), diff --git a/pkg/resources/statefulsets/prometheus.go b/pkg/resources/statefulsets/prometheus.go index 73713ec7939..4184a0a9b3e 100644 --- a/pkg/resources/statefulsets/prometheus.go +++ b/pkg/resources/statefulsets/prometheus.go @@ -216,6 +216,7 @@ func NewForPrometheus(t *miniov2.Tenant, serviceName string) *appsv1.StatefulSet "-R", fmt.Sprintf("%s:%s", strconv.FormatInt(*securityContext.RunAsUser, 10), strconv.FormatInt(*securityContext.RunAsGroup, 10)), "/prometheus", + "||", "true", // make sure we do not fail if init container fails. }, SecurityContext: &initContainerSecurityContext, VolumeMounts: prometheusVolumeMounts(t),