From 105d84b7c8e2a3c079492529f9b3a8d73d39b147 Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 27 Mar 2024 12:25:41 +0100 Subject: [PATCH] Add the CA-bundle injection configmap to the NooBaa package Signed-off-by: Ben --- deploy/operator.yaml | 1 - pkg/olm/olm.go | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) 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))