diff --git a/controllers/cloud.redhat.com/providers/sidecar/default.go b/controllers/cloud.redhat.com/providers/sidecar/default.go index a867c3351..006c770a1 100644 --- a/controllers/cloud.redhat.com/providers/sidecar/default.go +++ b/controllers/cloud.redhat.com/providers/sidecar/default.go @@ -64,7 +64,7 @@ func (sc *sidecarProvider) Provide(app *crd.ClowdApp) error { cont := getOtelCollector(app.Name) if cont != nil { if innerDeployment.UseStatefulSet { - sts.Spec.Template.Spec.Containers = append(d.Spec.Template.Spec.Containers, *cont) + sts.Spec.Template.Spec.Containers = append(sts.Spec.Template.Spec.Containers, *cont) } else { d.Spec.Template.Spec.Containers = append(d.Spec.Template.Spec.Containers, *cont) } diff --git a/controllers/cloud.redhat.com/providers/statefulset/impl.go b/controllers/cloud.redhat.com/providers/statefulset/impl.go index 483426e02..ec423fd4e 100644 --- a/controllers/cloud.redhat.com/providers/statefulset/impl.go +++ b/controllers/cloud.redhat.com/providers/statefulset/impl.go @@ -296,15 +296,6 @@ func initStatefulSet(app *crd.ClowdApp, env *crd.ClowdEnvironment, s *apps.State return nil } -func setRecreateDeploymentStrategyForPVCs(vol core.Volume, d *apps.Deployment) { - if vol.VolumeSource.PersistentVolumeClaim == nil { - return - } - d.Spec.Strategy = apps.DeploymentStrategy{ - Type: apps.RecreateDeploymentStrategyType, - } -} - func setVolumeSourceConfigMapDefaultMode(vol *core.Volume) { if vol.VolumeSource.PersistentVolumeClaim != nil { return diff --git a/controllers/cloud.redhat.com/providers/web/impl.go b/controllers/cloud.redhat.com/providers/web/impl.go index 11a563024..7b33d1ceb 100644 --- a/controllers/cloud.redhat.com/providers/web/impl.go +++ b/controllers/cloud.redhat.com/providers/web/impl.go @@ -275,7 +275,7 @@ func populateSideCar[D *apps.Deployment | *apps.StatefulSet](dOrS D, depl *crd.D }, } - caddyConfigVol := core.Volume{} + var caddyConfigVol core.Volume if depl.UseStatefulSet { caddyConfigVol = core.Volume{