diff --git a/deploy/operator.yaml b/deploy/operator.yaml index c97d0957a..15e2d18b3 100644 --- a/deploy/operator.yaml +++ b/deploy/operator.yaml @@ -36,7 +36,6 @@ spec: items: - key: ca-bundle.crt path: tls-ca-bundle.pem - optional: true containers: - name: noobaa-operator image: NOOBAA_OPERATOR_IMAGE diff --git a/pkg/olm/olm.go b/pkg/olm/olm.go index e98d960a7..593ab8a96 100644 --- a/pkg/olm/olm.go +++ b/pkg/olm/olm.go @@ -208,6 +208,10 @@ func RunCatalog(cmd *cobra.Command, args []string) { util.Panic(os.WriteFile(dir+"noobaa-operator.package.yaml", pkgBytes, 0644)) } util.Panic(util.WriteYamlFile(csvFileName, GenerateCSV(opConf, csvParams))) + // The CA configmap is needed prior to the operator startup to prevent a certificate injection race condition + util.Panic(util.WriteYamlFile( + versionDir+"noobaa-operator.ca-bundle-configmap.yaml", + util.KubeObject(bundle.File_deploy_internal_configmap_ca_inject_yaml))) crd.ForEachCRD(func(c *crd.CRD) { if c.Spec.Group == nbv1.SchemeGroupVersion.Group || (csvParams.OBCMode == OBCOwned && c.Spec.Group == obAPI.Domain) { util.Panic(util.WriteYamlFile(versionDir+c.Name+".crd.yaml", c))