Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions controllers/galera_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func buildGcommURI(instance *mariadbv1.Galera) string {
basename := instance.Name + "-galera"
res := []string{}

for i := 0; i < replicas; i++ {
for i := range replicas {
// Generate Gcomm with subdomains for TLS validation
res = append(res, basename+"-"+strconv.Itoa(i)+"."+basename+"."+instance.Namespace+".svc")
}
Expand Down Expand Up @@ -943,7 +943,7 @@ func (r *GaleraReconciler) generateConfigMaps(
envVars *map[string]env.Setter,
) error {
log := GetLog(ctx, "galera")
templateParameters := map[string]interface{}{
templateParameters := map[string]any{
"logToDisk": instance.Spec.LogToDisk,
}
customData := make(map[string]string)
Expand Down
10 changes: 5 additions & 5 deletions tests/functional/base_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ const (
interval = timeout / 100
)

func CreateGaleraConfig(namespace string, spec map[string]interface{}) client.Object {
func CreateGaleraConfig(namespace string, spec map[string]any) client.Object {
name := uuid.New().String()

raw := map[string]interface{}{
raw := map[string]any{
"apiVersion": "mariadb.openstack.org/v1beta1",
"kind": "Galera",
"metadata": map[string]interface{}{
"metadata": map[string]any{
"name": name,
"namespace": namespace,
},
Expand All @@ -50,8 +50,8 @@ func CreateGaleraConfig(namespace string, spec map[string]interface{}) client.Ob
return th.CreateUnstructured(raw)
}

func GetDefaultGaleraSpec() map[string]interface{} {
return map[string]interface{}{
func GetDefaultGaleraSpec() map[string]any {
return map[string]any{
"replicas": 1,
"logToDisk": false,
"secret": "osp-secret",
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/galera_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ var _ = Describe("Galera webhook", func() {
When("a Galera gets created with a name longer then 46 chars", func() {
It("gets blocked by the webhook and fail", func() {

raw := map[string]interface{}{
raw := map[string]any{
"apiVersion": "mariadb.openstack.org/v1beta1",
"kind": "Galera",
"metadata": map[string]interface{}{
"metadata": map[string]any{
"name": "foo-1234567890-1234567890-1234567890-1234567890",
"namespace": namespace,
},
Expand Down