From aa38ce08587ca9d76a357813334b6e6665301a9f Mon Sep 17 00:00:00 2001 From: jackyalbo Date: Sun, 21 Jan 2024 15:41:15 +0200 Subject: [PATCH] Moving COSI temporarily out of the code Signed-off-by: jackyalbo --- .github/workflows/run_cosi_test.yaml | 4 ++- deploy/operator.yaml | 45 +++++++++++++------------- pkg/bundle/deploy.go | 47 +++++++++++++++------------- pkg/controller/add_cosi.go | 7 ++--- pkg/operator/operator.go | 3 +- 5 files changed, 56 insertions(+), 50 deletions(-) diff --git a/.github/workflows/run_cosi_test.yaml b/.github/workflows/run_cosi_test.yaml index 2fb97d5ff..787741609 100644 --- a/.github/workflows/run_cosi_test.yaml +++ b/.github/workflows/run_cosi_test.yaml @@ -1,5 +1,7 @@ name: COSI integration Tests -on: [push, pull_request, workflow_dispatch] +# SHOULD BE RETURNED ONCE COSI IS BACK +# on: [push, pull_request, workflow_dispatch] +on: [] jobs: run-cosi-test: diff --git a/deploy/operator.yaml b/deploy/operator.yaml index 09beae205..c97d0957a 100644 --- a/deploy/operator.yaml +++ b/deploy/operator.yaml @@ -27,8 +27,9 @@ spec: path: token # For testing purposes change the audience to api audience: openshift - - name: socket - emptyDir: {} + # SHOULD BE RETURNED ONCE COSI IS BACK + # - name: socket + # emptyDir: {} - name: noobaa-ca-inject configMap: name: noobaa-ca-inject @@ -45,8 +46,9 @@ spec: readOnly: true - name: noobaa-ca-inject mountPath: /etc/pki/ca-trust/extracted/pem - - name: socket - mountPath: /var/lib/cosi + # SHOULD BE RETURNED ONCE COSI IS BACK + # - name: socket + # mountPath: /var/lib/cosi resources: limits: cpu: "250m" @@ -62,20 +64,21 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - - name: objectstorage-provisioner-sidecar - image: COSI_SIDECAR_IMAGE - args: - - "--v=5" - resources: - limits: - cpu: "100m" - memory: "512Mi" - imagePullPolicy: Always - env: - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - volumeMounts: - - mountPath: /var/lib/cosi - name: socket + # SHOULD BE RETURNED ONCE COSI IS BACK + # - name: objectstorage-provisioner-sidecar + # image: COSI_SIDECAR_IMAGE + # args: + # - "--v=5" + # resources: + # limits: + # cpu: "100m" + # memory: "512Mi" + # imagePullPolicy: Always + # env: + # - name: POD_NAMESPACE + # valueFrom: + # fieldRef: + # fieldPath: metadata.namespace + # volumeMounts: + # - mountPath: /var/lib/cosi + # name: socket diff --git a/pkg/bundle/deploy.go b/pkg/bundle/deploy.go index 53563d5d0..b86b50713 100644 --- a/pkg/bundle/deploy.go +++ b/pkg/bundle/deploy.go @@ -5898,7 +5898,7 @@ spec: sourceNamespace: default ` -const Sha256_deploy_operator_yaml = "8f48fc9ae60e1ef5f25d6b1a7a6cd0a6e76f055eb0fc3f4dd5068d304ed111be" +const Sha256_deploy_operator_yaml = "1a2c110adc6763047d158e9021ea716e8d16ce734c0302c569b02e114189dff8" const File_deploy_operator_yaml = `apiVersion: apps/v1 kind: Deployment @@ -5929,8 +5929,9 @@ spec: path: token # For testing purposes change the audience to api audience: openshift - - name: socket - emptyDir: {} + # SHOULD BE RETURNED ONCE COSI IS BACK + # - name: socket + # emptyDir: {} - name: noobaa-ca-inject configMap: name: noobaa-ca-inject @@ -5947,8 +5948,9 @@ spec: readOnly: true - name: noobaa-ca-inject mountPath: /etc/pki/ca-trust/extracted/pem - - name: socket - mountPath: /var/lib/cosi + # SHOULD BE RETURNED ONCE COSI IS BACK + # - name: socket + # mountPath: /var/lib/cosi resources: limits: cpu: "250m" @@ -5964,23 +5966,24 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - - name: objectstorage-provisioner-sidecar - image: COSI_SIDECAR_IMAGE - args: - - "--v=5" - resources: - limits: - cpu: "100m" - memory: "512Mi" - imagePullPolicy: Always - env: - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - volumeMounts: - - mountPath: /var/lib/cosi - name: socket + # SHOULD BE RETURNED ONCE COSI IS BACK + # - name: objectstorage-provisioner-sidecar + # image: COSI_SIDECAR_IMAGE + # args: + # - "--v=5" + # resources: + # limits: + # cpu: "100m" + # memory: "512Mi" + # imagePullPolicy: Always + # env: + # - name: POD_NAMESPACE + # valueFrom: + # fieldRef: + # fieldPath: metadata.namespace + # volumeMounts: + # - mountPath: /var/lib/cosi + # name: socket ` const Sha256_deploy_role_yaml = "ce3cbcb74a9309158d7cf71ef38e747fe76c1bc0fb0f15d3e5404a746ce988e1" diff --git a/pkg/controller/add_cosi.go b/pkg/controller/add_cosi.go index eb63f147f..d89ee7944 100644 --- a/pkg/controller/add_cosi.go +++ b/pkg/controller/add_cosi.go @@ -1,10 +1,7 @@ package controller -import ( - "github.com/noobaa/noobaa-operator/v5/pkg/controller/cosi" -) - func init() { // AddToManagerFuncs is a list of functions to create controllers and add them to a manager. - AddToManagerFuncs = append(AddToManagerFuncs, cosi.Add) + // SHOULD BE RETURNED ONCE COSI IS BACK + // AddToManagerFuncs = append(AddToManagerFuncs, cosi.Add) } diff --git a/pkg/operator/operator.go b/pkg/operator/operator.go index 660f587cf..9087c9954 100644 --- a/pkg/operator/operator.go +++ b/pkg/operator/operator.go @@ -403,7 +403,8 @@ func LoadOperatorConf(cmd *cobra.Command) *Conf { c.Deployment.Spec.Template.Spec.ImagePullSecrets = []corev1.LocalObjectReference{{Name: options.ImagePullSecret}} } - c.Deployment.Spec.Template.Spec.Containers[1].Image = options.CosiSideCarImage + // SHOULD BE RETURNED ONCE COSI IS BACK + // c.Deployment.Spec.Template.Spec.Containers[1].Image = options.CosiSideCarImage return c }