Skip to content

Commit 8d4534b

Browse files
committed
Include the certificate to the secret synced
The certificate is not present in the clouds.yaml entry of the existent Hypershift secrest, it's defined in another entry, let's use that instead.
1 parent fa53975 commit 8d4534b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pkg/openstack-manila/secret/secretsync.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,13 @@ func (c *SecretSyncController) translateSecret(cloudSecret *v1.Secret) (*v1.Secr
115115

116116
data := cloudToConf(cloud)
117117

118+
// In the hypershift secret, the clouds.yaml field might not have the cacert defined. The content of the certificate
119+
// is defined in the ca-bundle.pem field instead.
120+
_, ok = cloudSecret.Data["ca-bundle.pem"]
121+
if ok {
122+
data["os-certAuthorityPath"] = []byte(cacertPath)
123+
}
124+
118125
secret := v1.Secret{
119126
ObjectMeta: metav1.ObjectMeta{
120127
Name: util.ManilaSecretName,

0 commit comments

Comments
 (0)