From e8e78c0f575f96e9eee4877439020d1213e77a93 Mon Sep 17 00:00:00 2001 From: Chris Mitchell Date: Mon, 16 Dec 2024 16:17:47 -0500 Subject: [PATCH] Fix linting Signed-off-by: Chris Mitchell --- .../cloud.redhat.com/providers/sidecar/default.go | 2 +- .../cloud.redhat.com/providers/statefulset/impl.go | 9 --------- controllers/cloud.redhat.com/providers/web/impl.go | 2 +- 3 files changed, 2 insertions(+), 11 deletions(-) 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{