@@ -18,6 +18,7 @@ package swiftproxy
1818
1919import (
2020 "fmt"
21+ "maps"
2122
2223 memcachedv1 "github.com/openstack-k8s-operators/infra-operator/apis/memcached/v1beta1"
2324 "github.com/openstack-k8s-operators/lib-common/modules/common/service"
@@ -40,7 +41,7 @@ func SecretTemplates(
4041 transportURL string ,
4142 apiTimeout int ,
4243) []util.Template {
43- templateParameters := make (map [string ]interface {} )
44+ templateParameters := make (map [string ]any )
4445 templateParameters ["ServiceUser" ] = instance .Spec .ServiceUser
4546 templateParameters ["ServicePassword" ] = password
4647 templateParameters ["KeystonePublicURL" ] = keystonePublicURL
@@ -65,9 +66,9 @@ func SecretTemplates(
6566 }
6667
6768 // create httpd vhost template parameters
68- httpdVhostConfig := map [string ]interface {} {}
69+ httpdVhostConfig := map [string ]any {}
6970 for _ , endpt := range []service.Endpoint {service .EndpointInternal , service .EndpointPublic } {
70- endptConfig := map [string ]interface {} {}
71+ endptConfig := map [string ]any {}
7172 endptConfig ["ServerName" ] = fmt .Sprintf ("%s-%s.%s.svc" , swift .ServiceName , endpt .String (), instance .Namespace )
7273 endptConfig ["TLS" ] = false // default TLS to false, and set it bellow to true if enabled
7374 if instance .Spec .TLS .API .Enabled (endpt ) {
@@ -79,9 +80,7 @@ func SecretTemplates(
7980 }
8081 templateParameters ["VHosts" ] = httpdVhostConfig
8182 customData := map [string ]string {}
82- for key , data := range instance .Spec .DefaultConfigOverwrite {
83- customData [key ] = data
84- }
83+ maps .Copy (customData , instance .Spec .DefaultConfigOverwrite )
8584
8685 return []util.Template {
8786 {
0 commit comments