Skip to content

Commit 942557e

Browse files
authored
Merge pull request #1316 from percona/K8SPG-624-use-bool
2 parents c62817b + 9c217f3 commit 942557e

File tree

8 files changed

+17
-17
lines changed

8 files changed

+17
-17
lines changed

build/crd/percona/generated/pgv2.percona.com_perconapgclusters.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10303,11 +10303,11 @@ spec:
1030310303
bucket:
1030410304
type: string
1030510305
disableSSL:
10306-
type: string
10306+
type: boolean
1030710307
endpoint:
1030810308
type: string
1030910309
forcePathStyle:
10310-
type: string
10310+
type: boolean
1031110311
region:
1031210312
type: string
1031310313
secret:

config/crd/bases/pgv2.percona.com_perconapgclusters.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10708,11 +10708,11 @@ spec:
1070810708
bucket:
1070910709
type: string
1071010710
disableSSL:
10711-
type: string
10711+
type: boolean
1071210712
endpoint:
1071310713
type: string
1071410714
forcePathStyle:
10715-
type: string
10715+
type: boolean
1071610716
region:
1071710717
type: string
1071810718
secret:

deploy/bundle.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11005,11 +11005,11 @@ spec:
1100511005
bucket:
1100611006
type: string
1100711007
disableSSL:
11008-
type: string
11008+
type: boolean
1100911009
endpoint:
1101011010
type: string
1101111011
forcePathStyle:
11012-
type: string
11012+
type: boolean
1101311013
region:
1101411014
type: string
1101511015
secret:

deploy/crd.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11005,11 +11005,11 @@ spec:
1100511005
bucket:
1100611006
type: string
1100711007
disableSSL:
11008-
type: string
11008+
type: boolean
1100911009
endpoint:
1101011010
type: string
1101111011
forcePathStyle:
11012-
type: string
11012+
type: boolean
1101311013
region:
1101411014
type: string
1101511015
secret:

deploy/cw-bundle.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11005,11 +11005,11 @@ spec:
1100511005
bucket:
1100611006
type: string
1100711007
disableSSL:
11008-
type: string
11008+
type: boolean
1100911009
endpoint:
1101011010
type: string
1101111011
forcePathStyle:
11012-
type: string
11012+
type: boolean
1101311013
region:
1101411014
type: string
1101511015
secret:

e2e-tests/functions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ get_cr() {
292292
yq eval -i '
293293
.spec.extensions.image = "'$IMAGE'" |
294294
.spec.extensions.imagePullPolicy = "Always" |
295-
.spec.extensions.storage = {"type": "s3", "bucket": "operator-testing", "region": "us-east-1", "endpoint": "http://minio-service:9000", "forcePathStyle": "true", "disableSSL": "true", "secret": {"name": "minio-secret"}}
295+
.spec.extensions.storage = {"type": "s3", "bucket": "operator-testing", "region": "us-east-1", "endpoint": "http://minio-service:9000", "forcePathStyle": true, "disableSSL": true, "secret": {"name": "minio-secret"}}
296296
' $TEMP_DIR/cr.yaml
297297
;;
298298
esac

percona/extensions/containers.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,17 +106,17 @@ func InstallerContainer(cr *pgv2.PerconaPGCluster, postgresVersion int, spec *pg
106106
if cr.CompareVersion("2.8.0") >= 0 {
107107
// Check whether the configuration exists so that existing e2e tests
108108
// that do not set these values are not affected.
109-
if spec.Storage.DisableSSL != "" {
109+
if spec.Storage.DisableSSL {
110110
container.Env = append(container.Env, corev1.EnvVar{
111111
Name: "STORAGE_DISABLE_SSL",
112-
Value: spec.Storage.DisableSSL,
112+
Value: strconv.FormatBool(spec.Storage.DisableSSL),
113113
})
114114
}
115115

116-
if spec.Storage.ForcePathStyle != "" {
116+
if spec.Storage.ForcePathStyle {
117117
container.Env = append(container.Env, corev1.EnvVar{
118118
Name: "STORAGE_FORCE_PATH_STYLE",
119-
Value: spec.Storage.ForcePathStyle,
119+
Value: strconv.FormatBool(spec.Storage.ForcePathStyle),
120120
})
121121
}
122122
}

pkg/apis/pgv2.percona.com/v2/perconapgcluster_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -659,8 +659,8 @@ type CustomExtensionsStorageSpec struct {
659659
Bucket string `json:"bucket,omitempty"`
660660
Region string `json:"region,omitempty"`
661661
Endpoint string `json:"endpoint,omitempty"`
662-
ForcePathStyle string `json:"forcePathStyle,omitempty"`
663-
DisableSSL string `json:"disableSSL,omitempty"`
662+
ForcePathStyle bool `json:"forcePathStyle,omitempty"`
663+
DisableSSL bool `json:"disableSSL,omitempty"`
664664
Secret *corev1.SecretProjection `json:"secret,omitempty"`
665665
}
666666

0 commit comments

Comments
 (0)