@@ -14,7 +14,6 @@ import (
1414 "github.com/pdok/mapserver-operator/internal/controller/mapserver"
1515 "github.com/pdok/mapserver-operator/internal/controller/ogcwebserviceproxy"
1616 "github.com/pdok/mapserver-operator/internal/controller/types"
17- "github.com/pdok/smooth-operator/pkg/k8s"
1817 smoothoperatorutils "github.com/pdok/smooth-operator/pkg/util"
1918 appsv1 "k8s.io/api/apps/v1"
2019 corev1 "k8s.io/api/core/v1"
@@ -24,13 +23,6 @@ import (
2423 ctrl "sigs.k8s.io/controller-runtime"
2524)
2625
27- const (
28- blobsConfigPrefix = "blobs-"
29- blobsSecretPrefix = "blobs-"
30- postgisConfigPrefix = "postgres-"
31- postgisSecretPrefix = "postgres-"
32- )
33-
3426var storageClassName string
3527
3628func SetStorageClassName (name string ) {
@@ -65,19 +57,14 @@ func mutateDeployment[R Reconciler, O pdoknlv3.WMSWFS](r R, obj O, deployment *a
6557 },
6658 }
6759
68- blobsSecret , err := k8s .GetSecret (getReconcilerClient (r ), obj .GetNamespace (), blobsSecretPrefix , make (map [string ]string ))
69- if err != nil {
70- return err
71- }
72-
7360 initContainers , err := getInitContainerForDeployment (r , obj )
7461 if err != nil {
7562 return err
7663 }
7764 setTerminationMessage (initContainers )
7865
7966 images := getReconcilerImages (r )
80- containers , err := getContainers (obj , images , blobsSecret )
67+ containers , err := getContainers (obj , images )
8168 if err != nil {
8269 return err
8370 }
@@ -140,18 +127,9 @@ func getPodAnnotations(deployment *appsv1.Deployment) map[string]string {
140127}
141128
142129func getInitContainerForDeployment [R Reconciler , O pdoknlv3.WMSWFS ](r R , obj O ) ([]corev1.Container , error ) {
143- blobsConfig , err := k8s .GetConfigMap (getReconcilerClient (r ), obj .GetNamespace (), blobsConfigPrefix , make (map [string ]string ))
144- if err != nil {
145- return nil , err
146- }
147-
148- blobsSecret , err := k8s .GetSecret (getReconcilerClient (r ), obj .GetNamespace (), blobsSecretPrefix , make (map [string ]string ))
149- if err != nil {
150- return nil , err
151- }
152130
153131 images := getReconcilerImages (r )
154- blobDownloadInitContainer , err := blobdownload .GetBlobDownloadInitContainer (obj , * images , blobsConfig . Name , blobsSecret . Name )
132+ blobDownloadInitContainer , err := blobdownload .GetBlobDownloadInitContainer (obj , * images )
155133 if err != nil {
156134 return nil , err
157135 }
@@ -166,16 +144,7 @@ func getInitContainerForDeployment[R Reconciler, O pdoknlv3.WMSWFS](r R, obj O)
166144 }
167145
168146 if obj .Mapfile () == nil {
169- postgresConfig , err := k8s .GetConfigMap (getReconcilerClient (r ), obj .GetNamespace (), postgisConfigPrefix , make (map [string ]string ))
170- if err != nil {
171- return nil , err
172- }
173-
174- postgresSecret , err := k8s .GetSecret (getReconcilerClient (r ), obj .GetNamespace (), postgisSecretPrefix , make (map [string ]string ))
175- if err != nil {
176- return nil , err
177- }
178- mapfileGeneratorInitContainer , err := mapfilegenerator .GetMapfileGeneratorInitContainer (obj , * images , postgresConfig .Name , postgresSecret .Name )
147+ mapfileGeneratorInitContainer , err := mapfilegenerator .GetMapfileGeneratorInitContainer (obj , * images )
179148 if err != nil {
180149 return nil , err
181150 }
@@ -204,8 +173,8 @@ func getInitContainerForDeployment[R Reconciler, O pdoknlv3.WMSWFS](r R, obj O)
204173 return initContainers , nil
205174}
206175
207- func getContainers [O pdoknlv3.WMSWFS ](obj O , images * types.Images , blobsSecret * corev1. Secret ) ([]corev1.Container , error ) {
208- mapserverContainer , err := mapserver .GetMapserverContainer (obj , * images , blobsSecret . Name )
176+ func getContainers [O pdoknlv3.WMSWFS ](obj O , images * types.Images ) ([]corev1.Container , error ) {
177+ mapserverContainer , err := mapserver .GetMapserverContainer (obj , * images )
209178 if err != nil {
210179 return nil , err
211180 }
0 commit comments