Skip to content

Commit af812af

Browse files
Jonathan S. Katzjkatz
authored andcommitted
Fix pgo create cluster to respect --pgbackrest-s3-ca-secret
Unsure when this regression slipped in, but it only affected the `pgo create cluster` command and not using custom S3 CAs through the custom resource workflow. Issue: [sc-13183]
1 parent 03bf3cf commit af812af

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

internal/apiserver/clusterservice/clusterimpl.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -981,6 +981,10 @@ func CreateCluster(request *msgs.CreateClusterRequest, ns, pgouser string) msgs.
981981
util.BackRestRepoSecretKeyAWSS3KeyGCSKey: backrestGCSKey,
982982
}
983983

984+
if len(backrestS3CACert) > 0 {
985+
s3Credentials[util.BackRestRepoSecretKeyAWSS3KeyAWSS3CACert] = backrestS3CACert
986+
}
987+
984988
backrestSecret, err := apiserver.Clientset.CoreV1().Secrets(request.Namespace).
985989
Get(ctx, secretName, metav1.GetOptions{})
986990

@@ -1026,6 +1030,8 @@ func CreateCluster(request *msgs.CreateClusterRequest, ns, pgouser string) msgs.
10261030
len(backrestS3CACert) == 0 {
10271031
s3Credentials[util.BackRestRepoSecretKeyAWSS3KeyAWSS3CACert] =
10281032
backrestSecret.Data[util.BackRestRepoSecretKeyAWSS3KeyAWSS3CACert]
1033+
} else if len(backrestS3CACert) > 0 {
1034+
s3Credentials[util.BackRestRepoSecretKeyAWSS3KeyAWSS3CACert] = backrestS3CACert
10291035
}
10301036
// the pgBackRest repo config secret already exists, update any provided
10311037
// S3 credential information

0 commit comments

Comments
 (0)