@@ -18,6 +18,7 @@ package swiftproxy
18
18
19
19
import (
20
20
"fmt"
21
+ "maps"
21
22
22
23
memcachedv1 "github.com/openstack-k8s-operators/infra-operator/apis/memcached/v1beta1"
23
24
"github.com/openstack-k8s-operators/lib-common/modules/common/service"
@@ -40,7 +41,7 @@ func SecretTemplates(
40
41
transportURL string ,
41
42
apiTimeout int ,
42
43
) []util.Template {
43
- templateParameters := make (map [string ]interface {} )
44
+ templateParameters := make (map [string ]any )
44
45
templateParameters ["ServiceUser" ] = instance .Spec .ServiceUser
45
46
templateParameters ["ServicePassword" ] = password
46
47
templateParameters ["KeystonePublicURL" ] = keystonePublicURL
@@ -65,9 +66,9 @@ func SecretTemplates(
65
66
}
66
67
67
68
// create httpd vhost template parameters
68
- httpdVhostConfig := map [string ]interface {} {}
69
+ httpdVhostConfig := map [string ]any {}
69
70
for _ , endpt := range []service.Endpoint {service .EndpointInternal , service .EndpointPublic } {
70
- endptConfig := map [string ]interface {} {}
71
+ endptConfig := map [string ]any {}
71
72
endptConfig ["ServerName" ] = fmt .Sprintf ("%s-%s.%s.svc" , swift .ServiceName , endpt .String (), instance .Namespace )
72
73
endptConfig ["TLS" ] = false // default TLS to false, and set it bellow to true if enabled
73
74
if instance .Spec .TLS .API .Enabled (endpt ) {
@@ -79,9 +80,7 @@ func SecretTemplates(
79
80
}
80
81
templateParameters ["VHosts" ] = httpdVhostConfig
81
82
customData := map [string ]string {}
82
- for key , data := range instance .Spec .DefaultConfigOverwrite {
83
- customData [key ] = data
84
- }
83
+ maps .Copy (customData , instance .Spec .DefaultConfigOverwrite )
85
84
86
85
return []util.Template {
87
86
{
0 commit comments