Skip to content

Commit 3af2001

Browse files
authored
Merge pull request #323 from vshn/fix/more_deprovisioning_raceconditions
Protect the certificate by the cluster
2 parents 28568d7 + 1095dcd commit 3af2001

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/comp-functions/functions/vshnpostgres/postgresql_deploy.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ func createCerts(comp *vshnv1.VSHNPostgreSQL, svc *runtime.ServiceRuntime) error
122122
},
123123
}
124124

125-
err := svc.SetDesiredKubeObjectWithName(selfSignedIssuer, comp.GetName()+"-localca", "local-ca")
125+
err := svc.SetDesiredKubeObjectWithName(selfSignedIssuer, comp.GetName()+"-localca", "local-ca", runtime.KubeOptionProtectedBy("cluster"))
126126
if err != nil {
127127
err = fmt.Errorf("cannot create local ca object: %w", err)
128128
return err
@@ -165,7 +165,7 @@ func createCerts(comp *vshnv1.VSHNPostgreSQL, svc *runtime.ServiceRuntime) error
165165
},
166166
}
167167

168-
err = svc.SetDesiredKubeObjectWithName(certificate, comp.GetName()+"-certificate", "certificate")
168+
err = svc.SetDesiredKubeObjectWithName(certificate, comp.GetName()+"-certificate", "certificate", runtime.KubeOptionProtectedBy("cluster"))
169169
if err != nil {
170170
err = fmt.Errorf("cannot create local ca object: %w", err)
171171
return err

0 commit comments

Comments
 (0)