From e10010b8b809a3754dd4e476f4008408c1bf38a9 Mon Sep 17 00:00:00 2001 From: Bradley Mayo Date: Tue, 25 Jul 2023 14:41:37 -0400 Subject: [PATCH 1/7] Added operator image to related images --- Makefile | 9 ++++++--- config/manager/manager.yaml | 2 ++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 89de433c4..0be633449 100644 --- a/Makefile +++ b/Makefile @@ -189,6 +189,8 @@ manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and Cust .PHONY: bundle bundle: manifests setup kustomize ## Generate bundle manifests and metadata, then validate generated files. scripts/update-sample.sh + + sed -i.bak "s,OPERATOR_IMAGE,${IMG},g" config/manager/manager.yaml sed -i.bak "s,IMAGE,${IMG},g;s,CREATEDAT,${CREATEDAT},g" config/manifests/patches/csvAnnotations.yaml operator-sdk generate kustomize manifests -q cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG) @@ -200,9 +202,6 @@ bundle: manifests setup kustomize ## Generate bundle manifests and metadata, the $(KUSTOMIZE) build config/kustomize/operator -o internal/deploy/kustomize/daily/base/runtime-component-operator.yaml sed -i.bak "s,${IMG},${KUSTOMIZE_IMG},g;s,serviceAccountName: controller-manager,serviceAccountName: rco-controller-manager,g" internal/deploy/kustomize/daily/base/runtime-component-operator.yaml $(KUSTOMIZE) build config/kustomize/roles -o internal/deploy/kustomize/daily/base/runtime-component-roles.yaml - - mv config/manifests/patches/csvAnnotations.yaml.bak config/manifests/patches/csvAnnotations.yaml - rm internal/deploy/kustomize/daily/base/runtime-component-operator.yaml.bak $(KUSTOMIZE) build config/kubectl/crd -o internal/deploy/kubectl/runtime-component-crd.yaml $(KUSTOMIZE) build config/kubectl/operator -o internal/deploy/kubectl/runtime-component-operator.yaml @@ -212,6 +211,10 @@ bundle: manifests setup kustomize ## Generate bundle manifests and metadata, the $(KUSTOMIZE) build config/kustomize/watch-all -o internal/deploy/kustomize/daily/overlays/watch-all-namespaces/cluster-roles.yaml $(KUSTOMIZE) build config/kustomize/watch-another -o internal/deploy/kustomize/daily/overlays/watch-another-namespace/rco-watched-ns/watched-roles.yaml + mv config/manager/manager.yaml.bak config/manager/manager.yaml + mv config/manifests/patches/csvAnnotations.yaml.bak config/manifests/patches/csvAnnotations.yaml + rm internal/deploy/kustomize/daily/base/runtime-component-operator.yaml.bak + operator-sdk bundle validate ./bundle .PHONY: fmt diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index ddd3b55b4..8f7271a21 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -68,6 +68,8 @@ spec: fieldPath: metadata.annotations['olm.targetNamespaces'] - name: RELATED_IMAGE_LIBERTY_SAMPLE_APP value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:d3c67c4a15c97b0fb82f9ef4a2ccf474232b878787e9eea39af75a3ac78469e3 + - name: RELATED_IMAGE_RUNTIME_COMPONENT_OPERATOR + value: OPERATOR_IMAGE securityContext: allowPrivilegeEscalation: false privileged: false From e12d486955c12bb8a473acea596ece9cdc365080 Mon Sep 17 00:00:00 2001 From: Bradley Mayo Date: Tue, 25 Jul 2023 14:47:19 -0400 Subject: [PATCH 2/7] Added generated updates from "make bundle" --- .../manifests/runtime-component.clusterserviceversion.yaml | 6 +++++- internal/deploy/kubectl/runtime-component-operator.yaml | 2 ++ .../kustomize/daily/base/runtime-component-operator.yaml | 4 +++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/bundle/manifests/runtime-component.clusterserviceversion.yaml b/bundle/manifests/runtime-component.clusterserviceversion.yaml index 521e7ea97..780c55822 100644 --- a/bundle/manifests/runtime-component.clusterserviceversion.yaml +++ b/bundle/manifests/runtime-component.clusterserviceversion.yaml @@ -68,7 +68,7 @@ metadata: categories: Application Runtime certified: "true" containerImage: icr.io/appcafe/runtime-component-operator:daily - createdAt: "2023-06-29T16:02:23Z" + createdAt: "2023-07-25T14:44:37Z" description: Deploys any runtime component with dynamic and auto-tuning configuration olm.skipRange: '>=0.8.0 <1.2.1' operators.openshift.io/infrastructure-features: '["disconnected"]' @@ -977,6 +977,8 @@ spec: fieldPath: metadata.annotations['olm.targetNamespaces'] - name: RELATED_IMAGE_LIBERTY_SAMPLE_APP value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:d3c67c4a15c97b0fb82f9ef4a2ccf474232b878787e9eea39af75a3ac78469e3 + - name: RELATED_IMAGE_RUNTIME_COMPONENT_OPERATOR + value: icr.io/appcafe/runtime-component-operator:daily image: icr.io/appcafe/runtime-component-operator:daily livenessProbe: failureThreshold: 3 @@ -1259,4 +1261,6 @@ spec: relatedImages: - image: icr.io/appcafe/open-liberty/samples/getting-started@sha256:d3c67c4a15c97b0fb82f9ef4a2ccf474232b878787e9eea39af75a3ac78469e3 name: liberty-sample-app + - image: icr.io/appcafe/runtime-component-operator:daily + name: runtime-component-operator version: 1.2.1 diff --git a/internal/deploy/kubectl/runtime-component-operator.yaml b/internal/deploy/kubectl/runtime-component-operator.yaml index 8abd85c2d..f4431a147 100644 --- a/internal/deploy/kubectl/runtime-component-operator.yaml +++ b/internal/deploy/kubectl/runtime-component-operator.yaml @@ -304,6 +304,8 @@ spec: value: RUNTIME_COMPONENT_WATCH_NAMESPACE - name: RELATED_IMAGE_LIBERTY_SAMPLE_APP value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:d3c67c4a15c97b0fb82f9ef4a2ccf474232b878787e9eea39af75a3ac78469e3 + - name: RELATED_IMAGE_RUNTIME_COMPONENT_OPERATOR + value: icr.io/appcafe/runtime-component-operator:daily image: icr.io/appcafe/runtime-component-operator:daily livenessProbe: failureThreshold: 3 diff --git a/internal/deploy/kustomize/daily/base/runtime-component-operator.yaml b/internal/deploy/kustomize/daily/base/runtime-component-operator.yaml index 1d811d064..4fa685b16 100644 --- a/internal/deploy/kustomize/daily/base/runtime-component-operator.yaml +++ b/internal/deploy/kustomize/daily/base/runtime-component-operator.yaml @@ -51,7 +51,9 @@ spec: fieldPath: metadata.namespace - name: RELATED_IMAGE_LIBERTY_SAMPLE_APP value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:d3c67c4a15c97b0fb82f9ef4a2ccf474232b878787e9eea39af75a3ac78469e3 - image: icr.io/appcafe/runtime-component-operator:1.2.1 + - name: RELATED_IMAGE_RUNTIME_COMPONENT_OPERATOR + value: icr.io/appcafe/runtime-component-operator:daily + image: icr.io/appcafe/runtime-component-operator:daily livenessProbe: failureThreshold: 3 httpGet: From 408e12f81514049ba3330f90cf19254cc7f1381a Mon Sep 17 00:00:00 2001 From: Bradley Mayo Date: Tue, 1 Aug 2023 13:14:24 -0400 Subject: [PATCH 3/7] Revert "Added generated updates from "make bundle"" This reverts commit e12d486955c12bb8a473acea596ece9cdc365080. --- .../manifests/runtime-component.clusterserviceversion.yaml | 6 +----- internal/deploy/kubectl/runtime-component-operator.yaml | 2 -- .../kustomize/daily/base/runtime-component-operator.yaml | 4 +--- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/bundle/manifests/runtime-component.clusterserviceversion.yaml b/bundle/manifests/runtime-component.clusterserviceversion.yaml index 780c55822..521e7ea97 100644 --- a/bundle/manifests/runtime-component.clusterserviceversion.yaml +++ b/bundle/manifests/runtime-component.clusterserviceversion.yaml @@ -68,7 +68,7 @@ metadata: categories: Application Runtime certified: "true" containerImage: icr.io/appcafe/runtime-component-operator:daily - createdAt: "2023-07-25T14:44:37Z" + createdAt: "2023-06-29T16:02:23Z" description: Deploys any runtime component with dynamic and auto-tuning configuration olm.skipRange: '>=0.8.0 <1.2.1' operators.openshift.io/infrastructure-features: '["disconnected"]' @@ -977,8 +977,6 @@ spec: fieldPath: metadata.annotations['olm.targetNamespaces'] - name: RELATED_IMAGE_LIBERTY_SAMPLE_APP value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:d3c67c4a15c97b0fb82f9ef4a2ccf474232b878787e9eea39af75a3ac78469e3 - - name: RELATED_IMAGE_RUNTIME_COMPONENT_OPERATOR - value: icr.io/appcafe/runtime-component-operator:daily image: icr.io/appcafe/runtime-component-operator:daily livenessProbe: failureThreshold: 3 @@ -1261,6 +1259,4 @@ spec: relatedImages: - image: icr.io/appcafe/open-liberty/samples/getting-started@sha256:d3c67c4a15c97b0fb82f9ef4a2ccf474232b878787e9eea39af75a3ac78469e3 name: liberty-sample-app - - image: icr.io/appcafe/runtime-component-operator:daily - name: runtime-component-operator version: 1.2.1 diff --git a/internal/deploy/kubectl/runtime-component-operator.yaml b/internal/deploy/kubectl/runtime-component-operator.yaml index f4431a147..8abd85c2d 100644 --- a/internal/deploy/kubectl/runtime-component-operator.yaml +++ b/internal/deploy/kubectl/runtime-component-operator.yaml @@ -304,8 +304,6 @@ spec: value: RUNTIME_COMPONENT_WATCH_NAMESPACE - name: RELATED_IMAGE_LIBERTY_SAMPLE_APP value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:d3c67c4a15c97b0fb82f9ef4a2ccf474232b878787e9eea39af75a3ac78469e3 - - name: RELATED_IMAGE_RUNTIME_COMPONENT_OPERATOR - value: icr.io/appcafe/runtime-component-operator:daily image: icr.io/appcafe/runtime-component-operator:daily livenessProbe: failureThreshold: 3 diff --git a/internal/deploy/kustomize/daily/base/runtime-component-operator.yaml b/internal/deploy/kustomize/daily/base/runtime-component-operator.yaml index 4fa685b16..1d811d064 100644 --- a/internal/deploy/kustomize/daily/base/runtime-component-operator.yaml +++ b/internal/deploy/kustomize/daily/base/runtime-component-operator.yaml @@ -51,9 +51,7 @@ spec: fieldPath: metadata.namespace - name: RELATED_IMAGE_LIBERTY_SAMPLE_APP value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:d3c67c4a15c97b0fb82f9ef4a2ccf474232b878787e9eea39af75a3ac78469e3 - - name: RELATED_IMAGE_RUNTIME_COMPONENT_OPERATOR - value: icr.io/appcafe/runtime-component-operator:daily - image: icr.io/appcafe/runtime-component-operator:daily + image: icr.io/appcafe/runtime-component-operator:1.2.1 livenessProbe: failureThreshold: 3 httpGet: From 2a044ab839c3a61c851fea8d29975ae31c404169 Mon Sep 17 00:00:00 2001 From: Bradley Mayo Date: Tue, 1 Aug 2023 13:16:50 -0400 Subject: [PATCH 4/7] Attempt update to avoid sample SHA merge conflict --- config/manager/manager.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 8f7271a21..133afaee9 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -67,7 +67,7 @@ spec: fieldRef: fieldPath: metadata.annotations['olm.targetNamespaces'] - name: RELATED_IMAGE_LIBERTY_SAMPLE_APP - value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:d3c67c4a15c97b0fb82f9ef4a2ccf474232b878787e9eea39af75a3ac78469e3 + value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:e32f0eb0feff73c6bc8416fe2f7aa0cb74cbaa325cae5fad636325ee0ac4a105 - name: RELATED_IMAGE_RUNTIME_COMPONENT_OPERATOR value: OPERATOR_IMAGE securityContext: From 42688303adcbb48c02df5788e37f7bf154757d4e Mon Sep 17 00:00:00 2001 From: Bradley Mayo Date: Tue, 1 Aug 2023 13:20:44 -0400 Subject: [PATCH 5/7] Remove conflict to allow for pull of main --- config/manager/manager.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 133afaee9..a2422d1ea 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -68,8 +68,6 @@ spec: fieldPath: metadata.annotations['olm.targetNamespaces'] - name: RELATED_IMAGE_LIBERTY_SAMPLE_APP value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:e32f0eb0feff73c6bc8416fe2f7aa0cb74cbaa325cae5fad636325ee0ac4a105 - - name: RELATED_IMAGE_RUNTIME_COMPONENT_OPERATOR - value: OPERATOR_IMAGE securityContext: allowPrivilegeEscalation: false privileged: false From 4b09a1c06a6cdfcc165ccf9bc14c8a725bf64845 Mon Sep 17 00:00:00 2001 From: Bradley Mayo Date: Tue, 1 Aug 2023 13:22:09 -0400 Subject: [PATCH 6/7] Re-add related image to manager.yaml --- config/manager/manager.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index a2422d1ea..133afaee9 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -68,6 +68,8 @@ spec: fieldPath: metadata.annotations['olm.targetNamespaces'] - name: RELATED_IMAGE_LIBERTY_SAMPLE_APP value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:e32f0eb0feff73c6bc8416fe2f7aa0cb74cbaa325cae5fad636325ee0ac4a105 + - name: RELATED_IMAGE_RUNTIME_COMPONENT_OPERATOR + value: OPERATOR_IMAGE securityContext: allowPrivilegeEscalation: false privileged: false From d50c54ebb4c613984843733797d180197b9f69e5 Mon Sep 17 00:00:00 2001 From: Bradley Mayo Date: Tue, 1 Aug 2023 13:25:04 -0400 Subject: [PATCH 7/7] Re-add generated output from "make bundle" --- .../manifests/runtime-component.clusterserviceversion.yaml | 6 +++++- internal/deploy/kubectl/runtime-component-operator.yaml | 2 ++ .../kustomize/daily/base/runtime-component-operator.yaml | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/bundle/manifests/runtime-component.clusterserviceversion.yaml b/bundle/manifests/runtime-component.clusterserviceversion.yaml index 0b005c418..bb4e56abf 100644 --- a/bundle/manifests/runtime-component.clusterserviceversion.yaml +++ b/bundle/manifests/runtime-component.clusterserviceversion.yaml @@ -68,7 +68,7 @@ metadata: categories: Application Runtime certified: "true" containerImage: icr.io/appcafe/runtime-component-operator:daily - createdAt: "2023-08-01T06:51:41Z" + createdAt: "2023-08-01T13:24:02Z" description: Deploys any runtime component with dynamic and auto-tuning configuration olm.skipRange: '>=0.8.0 <1.2.2' operators.openshift.io/infrastructure-features: '["disconnected"]' @@ -977,6 +977,8 @@ spec: fieldPath: metadata.annotations['olm.targetNamespaces'] - name: RELATED_IMAGE_LIBERTY_SAMPLE_APP value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:e32f0eb0feff73c6bc8416fe2f7aa0cb74cbaa325cae5fad636325ee0ac4a105 + - name: RELATED_IMAGE_RUNTIME_COMPONENT_OPERATOR + value: icr.io/appcafe/runtime-component-operator:daily image: icr.io/appcafe/runtime-component-operator:daily livenessProbe: failureThreshold: 3 @@ -1259,4 +1261,6 @@ spec: relatedImages: - image: icr.io/appcafe/open-liberty/samples/getting-started@sha256:e32f0eb0feff73c6bc8416fe2f7aa0cb74cbaa325cae5fad636325ee0ac4a105 name: liberty-sample-app + - image: icr.io/appcafe/runtime-component-operator:daily + name: runtime-component-operator version: 1.2.2 diff --git a/internal/deploy/kubectl/runtime-component-operator.yaml b/internal/deploy/kubectl/runtime-component-operator.yaml index 465b206fd..680e267d8 100644 --- a/internal/deploy/kubectl/runtime-component-operator.yaml +++ b/internal/deploy/kubectl/runtime-component-operator.yaml @@ -304,6 +304,8 @@ spec: value: RUNTIME_COMPONENT_WATCH_NAMESPACE - name: RELATED_IMAGE_LIBERTY_SAMPLE_APP value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:e32f0eb0feff73c6bc8416fe2f7aa0cb74cbaa325cae5fad636325ee0ac4a105 + - name: RELATED_IMAGE_RUNTIME_COMPONENT_OPERATOR + value: icr.io/appcafe/runtime-component-operator:daily image: icr.io/appcafe/runtime-component-operator:daily livenessProbe: failureThreshold: 3 diff --git a/internal/deploy/kustomize/daily/base/runtime-component-operator.yaml b/internal/deploy/kustomize/daily/base/runtime-component-operator.yaml index 6e1bffb90..cd6c1c66e 100644 --- a/internal/deploy/kustomize/daily/base/runtime-component-operator.yaml +++ b/internal/deploy/kustomize/daily/base/runtime-component-operator.yaml @@ -51,6 +51,8 @@ spec: fieldPath: metadata.namespace - name: RELATED_IMAGE_LIBERTY_SAMPLE_APP value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:e32f0eb0feff73c6bc8416fe2f7aa0cb74cbaa325cae5fad636325ee0ac4a105 + - name: RELATED_IMAGE_RUNTIME_COMPONENT_OPERATOR + value: icr.io/appcafe/runtime-component-operator:daily image: icr.io/appcafe/runtime-component-operator:daily livenessProbe: failureThreshold: 3