diff --git a/internal/defaults/exoscalev1.go b/internal/defaults/exoscalev1.go index 2bdb7b7..cfb627e 100644 --- a/internal/defaults/exoscalev1.go +++ b/internal/defaults/exoscalev1.go @@ -9,10 +9,10 @@ func (d *Defaults) GetExoscalePostgreSQLDefault() *exoscalev1.ExoscalePostgreSQL postgreSQLdefault.Spec.Parameters.Service.MajorVersion = "15" postgreSQLdefault.Spec.Parameters.Service.Zone = "ch-dk-2" - postgreSQLdefault.Spec.Parameters.Size.Plan = "hobbyist-2 " + postgreSQLdefault.Spec.Parameters.Size.Plan = "hobbyist-2" postgreSQLdefault.Spec.Parameters.Backup.TimeOfDay = "12:00:00" - postgreSQLdefault.Spec.Parameters.Maintenance.DayOfWeek = "Sunday" - postgreSQLdefault.Spec.Parameters.Maintenance.TimeOfDay = "24:00:00" + postgreSQLdefault.Spec.Parameters.Maintenance.DayOfWeek = "sunday" + postgreSQLdefault.Spec.Parameters.Maintenance.TimeOfDay = "00:00:00" return &postgreSQLdefault } @@ -20,8 +20,8 @@ func (d *Defaults) GetExoscalePostgreSQLDefault() *exoscalev1.ExoscalePostgreSQL func (d *Defaults) GetExoscaleRedisDefault() *exoscalev1.ExoscaleRedis { var redisDefault exoscalev1.ExoscaleRedis - redisDefault.Spec.Parameters.Maintenance.DayOfWeek = "Sunday" - redisDefault.Spec.Parameters.Maintenance.TimeOfDay = "24:00:00" + redisDefault.Spec.Parameters.Maintenance.DayOfWeek = "sunday" + redisDefault.Spec.Parameters.Maintenance.TimeOfDay = "00:00:00" redisDefault.Spec.Parameters.Service.Zone = "ch-dk-2" return &redisDefault @@ -32,9 +32,9 @@ func (d *Defaults) GetExoscaleKafkaDefault() *exoscalev1.ExoscaleKafka { kafkaDefault.Spec.Parameters.Service.Version = "3.4.0" kafkaDefault.Spec.Parameters.Service.Zone = "ch-dk-2" - kafkaDefault.Spec.Parameters.Size.Plan = "startup-2 " - kafkaDefault.Spec.Parameters.Maintenance.DayOfWeek = "Sunday" - kafkaDefault.Spec.Parameters.Maintenance.TimeOfDay = "24:00:00" + kafkaDefault.Spec.Parameters.Size.Plan = "startup-2" + kafkaDefault.Spec.Parameters.Maintenance.DayOfWeek = "sunday" + kafkaDefault.Spec.Parameters.Maintenance.TimeOfDay = "00:00:00" return &kafkaDefault } @@ -44,10 +44,10 @@ func (d *Defaults) GetExoscaleMySQLDefault() *exoscalev1.ExoscaleMySQL { mySQLdefault.Spec.Parameters.Service.MajorVersion = "8" mySQLdefault.Spec.Parameters.Service.Zone = "ch-dk-2" - mySQLdefault.Spec.Parameters.Size.Plan = "hobbyist-2 " + mySQLdefault.Spec.Parameters.Size.Plan = "hobbyist-2" mySQLdefault.Spec.Parameters.Backup.TimeOfDay = "12:00:00" - mySQLdefault.Spec.Parameters.Maintenance.DayOfWeek = "Sunday" - mySQLdefault.Spec.Parameters.Maintenance.TimeOfDay = "24:00:00" + mySQLdefault.Spec.Parameters.Maintenance.DayOfWeek = "sunday" + mySQLdefault.Spec.Parameters.Maintenance.TimeOfDay = "00:00:00" return &mySQLdefault } @@ -57,10 +57,10 @@ func (d *Defaults) GetExoscaleOpenSearchDefault() *exoscalev1.ExoscaleOpenSearch openSearchDefault.Spec.Parameters.Service.MajorVersion = "2" openSearchDefault.Spec.Parameters.Service.Zone = "ch-dk-2" - openSearchDefault.Spec.Parameters.Size.Plan = "hobbyist-2 " + openSearchDefault.Spec.Parameters.Size.Plan = "hobbyist-2" openSearchDefault.Spec.Parameters.Backup.TimeOfDay = "12:00:00" - openSearchDefault.Spec.Parameters.Maintenance.DayOfWeek = "Sunday" - openSearchDefault.Spec.Parameters.Maintenance.TimeOfDay = "24:00:00" + openSearchDefault.Spec.Parameters.Maintenance.DayOfWeek = "sunday" + openSearchDefault.Spec.Parameters.Maintenance.TimeOfDay = "00:00:00" return &openSearchDefault } diff --git a/tests/golden/exoKafka.json b/tests/golden/exoKafka.json index f07aa95..e79a185 100644 --- a/tests/golden/exoKafka.json +++ b/tests/golden/exoKafka.json @@ -1,6 +1,6 @@ { "default": "kafka-default --kind ExoscaleKafka", - "parameters": "kafka-parameters --kind ExoscaleKafka --spec.parameters.maintenance.dayOfWeek=Monday --spec.parameters.service.zone ch-fr-1 --spec.parameters.size.plan enterprise-large", + "parameters": "kafka-parameters --kind ExoscaleKafka --spec.parameters.maintenance.dayOfWeek=monday --spec.parameters.service.zone ch-fr-1 --spec.parameters.size.plan enterprise-large", "unset": "kafka-unset --kind ExoscaleKafka --spec.parameters.maintenance.dayOfWeek- --spec.parameters.service- --spec.parameters.size.plan-", - "jsonInput": "kafka-jsonInput --kind ExoscaleKafka --spec.parameters.maintenance={\"DayOfWeek\":\"Monday\",\"TimeOfDay\":\"00:00:00\"} --spec.parameters.service {\"Zone\":\"ch-fr-99\"} --spec.parameters.size.plan {\"Foo\":\"Bar\"}" + "jsonInput": "kafka-jsonInput --kind ExoscaleKafka --spec.parameters.maintenance={\"DayOfWeek\":\"monday\",\"TimeOfDay\":\"00:00:00\"} --spec.parameters.service {\"Zone\":\"ch-fr-99\"} --spec.parameters.size.plan {\"Foo\":\"Bar\"}" } diff --git a/tests/golden/exoKafka/default.yaml b/tests/golden/exoKafka/default.yaml index 7741c26..424f7f7 100644 --- a/tests/golden/exoKafka/default.yaml +++ b/tests/golden/exoKafka/default.yaml @@ -6,14 +6,14 @@ metadata: spec: parameters: maintenance: - dayOfWeek: Sunday - timeOfDay: "24:00:00" + dayOfWeek: sunday + timeOfDay: "00:00:00" network: {} service: kafkaSettings: null version: 3.4.0 zone: ch-dk-2 size: - plan: 'startup-2 ' + plan: startup-2 writeConnectionSecretToRef: {} status: {} diff --git a/tests/golden/exoKafka/jsonInput.yaml b/tests/golden/exoKafka/jsonInput.yaml index 9aa3328..6ec67ca 100644 --- a/tests/golden/exoKafka/jsonInput.yaml +++ b/tests/golden/exoKafka/jsonInput.yaml @@ -6,7 +6,7 @@ metadata: spec: parameters: maintenance: - dayOfWeek: Monday + dayOfWeek: monday timeOfDay: "00:00:00" network: {} service: diff --git a/tests/golden/exoKafka/parameters.yaml b/tests/golden/exoKafka/parameters.yaml index 259dbbf..6a9d3b9 100644 --- a/tests/golden/exoKafka/parameters.yaml +++ b/tests/golden/exoKafka/parameters.yaml @@ -6,8 +6,8 @@ metadata: spec: parameters: maintenance: - dayOfWeek: Monday - timeOfDay: "24:00:00" + dayOfWeek: monday + timeOfDay: "00:00:00" network: {} service: kafkaSettings: null diff --git a/tests/golden/exoKafka/unset.yaml b/tests/golden/exoKafka/unset.yaml index 71ad742..81ea452 100644 --- a/tests/golden/exoKafka/unset.yaml +++ b/tests/golden/exoKafka/unset.yaml @@ -6,7 +6,7 @@ metadata: spec: parameters: maintenance: - timeOfDay: "24:00:00" + timeOfDay: "00:00:00" network: {} service: kafkaSettings: null diff --git a/tests/golden/exoMySQL.json b/tests/golden/exoMySQL.json index 6e56c36..9eeef44 100644 --- a/tests/golden/exoMySQL.json +++ b/tests/golden/exoMySQL.json @@ -1,6 +1,6 @@ { "default": "mysql-default --kind ExoscaleMySQL", - "parameters": "mysql-parameters --kind ExoscaleMySQL --spec.parameters.backup.timeOfDay=24:00:00 --spec.parameters.maintenance.dayOfWeek Monday --spec.parameters.service.majorVersion 9999", + "parameters": "mysql-parameters --kind ExoscaleMySQL --spec.parameters.backup.timeOfDay=24:00:00 --spec.parameters.maintenance.dayOfWeek monday --spec.parameters.service.majorVersion 9999", "unset": "mysql-unset --kind ExoscaleMySQL --spec.parameters.maintenance.dayOfWeek- --spec.parameters.service- --spec.parameters.size.plan-", - "jsonInput": "mysql-jsonInput --kind ExoscaleMySQL --spec.parameters.maintenance={\"DayOfWeek\":\"Monday\",\"TimeOfDay\":\"00:00:00\"} --spec.parameters.service {\"Zone\":\"ch-fr-99\"} --spec.parameters.size.plan {\"Foo\":\"Bar\"}" + "jsonInput": "mysql-jsonInput --kind ExoscaleMySQL --spec.parameters.maintenance={\"DayOfWeek\":\"monday\",\"TimeOfDay\":\"00:00:00\"} --spec.parameters.service {\"Zone\":\"ch-fr-99\"} --spec.parameters.size.plan {\"Foo\":\"Bar\"}" } diff --git a/tests/golden/exoMySQL/default.yaml b/tests/golden/exoMySQL/default.yaml index 22a3ee9..c73794c 100644 --- a/tests/golden/exoMySQL/default.yaml +++ b/tests/golden/exoMySQL/default.yaml @@ -8,14 +8,14 @@ spec: backup: timeOfDay: "12:00:00" maintenance: - dayOfWeek: Sunday - timeOfDay: "24:00:00" + dayOfWeek: sunday + timeOfDay: "00:00:00" network: {} service: majorVersion: "8" mysqlSettings: null zone: ch-dk-2 size: - plan: 'hobbyist-2 ' + plan: hobbyist-2 writeConnectionSecretToRef: {} status: {} diff --git a/tests/golden/exoMySQL/jsonInput.yaml b/tests/golden/exoMySQL/jsonInput.yaml index 6d227a8..2751e4d 100644 --- a/tests/golden/exoMySQL/jsonInput.yaml +++ b/tests/golden/exoMySQL/jsonInput.yaml @@ -8,7 +8,7 @@ spec: backup: timeOfDay: "12:00:00" maintenance: - dayOfWeek: Monday + dayOfWeek: monday timeOfDay: "00:00:00" network: {} service: diff --git a/tests/golden/exoMySQL/parameters.yaml b/tests/golden/exoMySQL/parameters.yaml index d6b43bc..7daa035 100644 --- a/tests/golden/exoMySQL/parameters.yaml +++ b/tests/golden/exoMySQL/parameters.yaml @@ -8,14 +8,14 @@ spec: backup: timeOfDay: "24:00:00" maintenance: - dayOfWeek: Monday - timeOfDay: "24:00:00" + dayOfWeek: monday + timeOfDay: "00:00:00" network: {} service: majorVersion: "9999" mysqlSettings: null zone: ch-dk-2 size: - plan: 'hobbyist-2 ' + plan: hobbyist-2 writeConnectionSecretToRef: {} status: {} diff --git a/tests/golden/exoMySQL/unset.yaml b/tests/golden/exoMySQL/unset.yaml index 531948e..1074592 100644 --- a/tests/golden/exoMySQL/unset.yaml +++ b/tests/golden/exoMySQL/unset.yaml @@ -8,7 +8,7 @@ spec: backup: timeOfDay: "12:00:00" maintenance: - timeOfDay: "24:00:00" + timeOfDay: "00:00:00" network: {} service: mysqlSettings: null diff --git a/tests/golden/exoOpenSearch.json b/tests/golden/exoOpenSearch.json index 4a28d79..89e992f 100644 --- a/tests/golden/exoOpenSearch.json +++ b/tests/golden/exoOpenSearch.json @@ -2,5 +2,5 @@ "default": "opensearch-default --kind ExoscaleOpenSearch", "parameters": "opensearch-parameters --kind ExoscaleOpenSearch --spec.parameters.backup.timeOfDay=24:00:00 --spec.parameters.size.plan enterprise-large --spec.parameters.service.majorVersion 9999", "unset": "opensearch-unset --kind ExoscaleOpenSearch --spec.parameters.maintenance.dayOfWeek- --spec.parameters.service- --spec.parameters.size.plan-", - "jsonInput": "opensearch-jsonInput --kind ExoscaleOpenSearch --spec.parameters.maintenance={\"DayOfWeek\":\"Monday\",\"TimeOfDay\":\"00:00:00\"} --spec.parameters.service {\"Zone\":\"ch-fr-99\"} --spec.parameters.size.plan {\"Foo\":\"Bar\"}" + "jsonInput": "opensearch-jsonInput --kind ExoscaleOpenSearch --spec.parameters.maintenance={\"DayOfWeek\":\"monday\",\"TimeOfDay\":\"00:00:00\"} --spec.parameters.service {\"Zone\":\"ch-fr-99\"} --spec.parameters.size.plan {\"Foo\":\"Bar\"}" } diff --git a/tests/golden/exoOpenSearch/default.yaml b/tests/golden/exoOpenSearch/default.yaml index f0e3113..83ed16c 100644 --- a/tests/golden/exoOpenSearch/default.yaml +++ b/tests/golden/exoOpenSearch/default.yaml @@ -8,14 +8,14 @@ spec: backup: timeOfDay: "12:00:00" maintenance: - dayOfWeek: Sunday - timeOfDay: "24:00:00" + dayOfWeek: sunday + timeOfDay: "00:00:00" network: {} service: majorVersion: "2" opensearchSettings: null zone: ch-dk-2 size: - plan: 'hobbyist-2 ' + plan: hobbyist-2 writeConnectionSecretToRef: {} status: {} diff --git a/tests/golden/exoOpenSearch/jsonInput.yaml b/tests/golden/exoOpenSearch/jsonInput.yaml index 9352699..7c8ea5a 100644 --- a/tests/golden/exoOpenSearch/jsonInput.yaml +++ b/tests/golden/exoOpenSearch/jsonInput.yaml @@ -8,7 +8,7 @@ spec: backup: timeOfDay: "12:00:00" maintenance: - dayOfWeek: Monday + dayOfWeek: monday timeOfDay: "00:00:00" network: {} service: diff --git a/tests/golden/exoOpenSearch/parameters.yaml b/tests/golden/exoOpenSearch/parameters.yaml index 1a5ba96..fbf7a90 100644 --- a/tests/golden/exoOpenSearch/parameters.yaml +++ b/tests/golden/exoOpenSearch/parameters.yaml @@ -8,8 +8,8 @@ spec: backup: timeOfDay: "24:00:00" maintenance: - dayOfWeek: Sunday - timeOfDay: "24:00:00" + dayOfWeek: sunday + timeOfDay: "00:00:00" network: {} service: majorVersion: "9999" diff --git a/tests/golden/exoOpenSearch/unset.yaml b/tests/golden/exoOpenSearch/unset.yaml index 9caa31b..7981759 100644 --- a/tests/golden/exoOpenSearch/unset.yaml +++ b/tests/golden/exoOpenSearch/unset.yaml @@ -8,7 +8,7 @@ spec: backup: timeOfDay: "12:00:00" maintenance: - timeOfDay: "24:00:00" + timeOfDay: "00:00:00" network: {} service: opensearchSettings: null diff --git a/tests/golden/exoPostgreSQL.json b/tests/golden/exoPostgreSQL.json index bde83ef..c86005b 100644 --- a/tests/golden/exoPostgreSQL.json +++ b/tests/golden/exoPostgreSQL.json @@ -2,6 +2,6 @@ "default": "postgres-default --kind ExoscalePostgreSQL", "parameters": "postgres-parameters --kind ExoscalePostgreSQL --spec.parameters.backup.timeOfDay=24:00:00 --spec.parameters.service.majorVersion 13 --spec.parameters.size.plan enterprise-large", "unset": "postgres-unset --kind ExoscalePostgreSQL --spec.parameters.maintenance.dayOfWeek- --spec.parameters.service- --spec.parameters.size.plan-", - "jsonInput": "postgres-jsonInput --kind ExoscalePostgreSQL --spec.parameters.maintenance={\"DayOfWeek\":\"Monday\",\"TimeOfDay\":\"00:00:00\"} --spec.parameters.service {\"Zone\":\"ch-fr-99\"} --spec.parameters.size.plan {\"Foo\":\"Bar\"}" + "jsonInput": "postgres-jsonInput --kind ExoscalePostgreSQL --spec.parameters.maintenance={\"DayOfWeek\":\"monday\",\"TimeOfDay\":\"00:00:00\"} --spec.parameters.service {\"Zone\":\"ch-fr-99\"} --spec.parameters.size.plan {\"Foo\":\"Bar\"}" } diff --git a/tests/golden/exoPostgreSQL/default.yaml b/tests/golden/exoPostgreSQL/default.yaml index c024a54..44e96fe 100644 --- a/tests/golden/exoPostgreSQL/default.yaml +++ b/tests/golden/exoPostgreSQL/default.yaml @@ -8,14 +8,14 @@ spec: backup: timeOfDay: "12:00:00" maintenance: - dayOfWeek: Sunday - timeOfDay: "24:00:00" + dayOfWeek: sunday + timeOfDay: "00:00:00" network: {} service: majorVersion: "15" pgSettings: null zone: ch-dk-2 size: - plan: 'hobbyist-2 ' + plan: hobbyist-2 writeConnectionSecretToRef: {} status: {} diff --git a/tests/golden/exoPostgreSQL/jsonInput.yaml b/tests/golden/exoPostgreSQL/jsonInput.yaml index 665279e..54eb09a 100644 --- a/tests/golden/exoPostgreSQL/jsonInput.yaml +++ b/tests/golden/exoPostgreSQL/jsonInput.yaml @@ -8,7 +8,7 @@ spec: backup: timeOfDay: "12:00:00" maintenance: - dayOfWeek: Monday + dayOfWeek: monday timeOfDay: "00:00:00" network: {} service: diff --git a/tests/golden/exoPostgreSQL/parameters.yaml b/tests/golden/exoPostgreSQL/parameters.yaml index 86edfda..e657f8e 100644 --- a/tests/golden/exoPostgreSQL/parameters.yaml +++ b/tests/golden/exoPostgreSQL/parameters.yaml @@ -8,8 +8,8 @@ spec: backup: timeOfDay: "24:00:00" maintenance: - dayOfWeek: Sunday - timeOfDay: "24:00:00" + dayOfWeek: sunday + timeOfDay: "00:00:00" network: {} service: majorVersion: "13" diff --git a/tests/golden/exoPostgreSQL/unset.yaml b/tests/golden/exoPostgreSQL/unset.yaml index 578b038..7c08d25 100644 --- a/tests/golden/exoPostgreSQL/unset.yaml +++ b/tests/golden/exoPostgreSQL/unset.yaml @@ -8,7 +8,7 @@ spec: backup: timeOfDay: "12:00:00" maintenance: - timeOfDay: "24:00:00" + timeOfDay: "00:00:00" network: {} service: pgSettings: null diff --git a/tests/golden/exoRedis.json b/tests/golden/exoRedis.json index 25411e3..cfa0475 100644 --- a/tests/golden/exoRedis.json +++ b/tests/golden/exoRedis.json @@ -2,6 +2,6 @@ "default": "redis-default --kind ExoscaleRedis", "parameters": "redis-parameters --kind ExoscaleRedis --spec.parameters.size.plan=enterprise-large --spec.parameters.service.zone ch-fr-1 --spec.parameters.maintenance.timeOfDay 24:00:00", "unset": "redis-unset --kind ExoscaleRedis --spec.parameters.maintenance.dayOfWeek- --spec.parameters.service- --spec.parameters.service.redisSettings-", - "jsonInput": "redis-jsonInput --kind ExoscaleRedis --spec.parameters.maintenance={\"DayOfWeek\":\"Monday\",\"TimeOfDay\":\"00:00:00\"} --spec.parameters.service {\"Zone\":\"ch-fr-99\"} --spec.parameters.size.plan {\"Foo\":\"Bar\"}" + "jsonInput": "redis-jsonInput --kind ExoscaleRedis --spec.parameters.maintenance={\"DayOfWeek\":\"monday\",\"TimeOfDay\":\"00:00:00\"} --spec.parameters.service {\"Zone\":\"ch-fr-99\"} --spec.parameters.size.plan {\"Foo\":\"Bar\"}" } diff --git a/tests/golden/exoRedis/default.yaml b/tests/golden/exoRedis/default.yaml index 6881572..39519c5 100644 --- a/tests/golden/exoRedis/default.yaml +++ b/tests/golden/exoRedis/default.yaml @@ -6,8 +6,8 @@ metadata: spec: parameters: maintenance: - dayOfWeek: Sunday - timeOfDay: "24:00:00" + dayOfWeek: sunday + timeOfDay: "00:00:00" network: {} service: redisSettings: null diff --git a/tests/golden/exoRedis/jsonInput.yaml b/tests/golden/exoRedis/jsonInput.yaml index cf073f9..2207601 100644 --- a/tests/golden/exoRedis/jsonInput.yaml +++ b/tests/golden/exoRedis/jsonInput.yaml @@ -6,7 +6,7 @@ metadata: spec: parameters: maintenance: - dayOfWeek: Monday + dayOfWeek: monday timeOfDay: "00:00:00" network: {} service: diff --git a/tests/golden/exoRedis/parameters.yaml b/tests/golden/exoRedis/parameters.yaml index 1e288b0..7c4243c 100644 --- a/tests/golden/exoRedis/parameters.yaml +++ b/tests/golden/exoRedis/parameters.yaml @@ -6,7 +6,7 @@ metadata: spec: parameters: maintenance: - dayOfWeek: Sunday + dayOfWeek: sunday timeOfDay: "24:00:00" network: {} service: diff --git a/tests/golden/exoRedis/unset.yaml b/tests/golden/exoRedis/unset.yaml index 10aaf1c..3b281f5 100644 --- a/tests/golden/exoRedis/unset.yaml +++ b/tests/golden/exoRedis/unset.yaml @@ -6,7 +6,7 @@ metadata: spec: parameters: maintenance: - timeOfDay: "24:00:00" + timeOfDay: "00:00:00" network: {} service: redisSettings: null