From e537d52fcfeebc56c2de83eccc3910479a459060 Mon Sep 17 00:00:00 2001 From: Edvin Norling Date: Mon, 22 Jan 2024 12:00:39 +0100 Subject: [PATCH 1/7] add maxOpenshiftVersion --- .../manifests/bases/grafana-operator.clusterserviceversion.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/config/manifests/bases/grafana-operator.clusterserviceversion.yaml b/config/manifests/bases/grafana-operator.clusterserviceversion.yaml index fd7fd80dc..e3d468a23 100644 --- a/config/manifests/bases/grafana-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/grafana-operator.clusterserviceversion.yaml @@ -9,6 +9,7 @@ metadata: createdAt: "2023-12-11T09:21:22Z" repository: https://github.com/grafana/grafana-operator support: Grafana Labs + olm.properties: '[{"type": "olm.maxOpenShiftVersion", "value": "v4.60"}]' name: grafana-operator.v0.0.0 namespace: placeholder spec: From 47d81ec67211bcde549e6116e1d311577eb00699 Mon Sep 17 00:00:00 2001 From: Edvin Norling Date: Mon, 22 Jan 2024 13:06:39 +0100 Subject: [PATCH 2/7] make olm CI pass --- .../grafana-operator.clusterserviceversion.yaml | 14 +++++++------- bundle/metadata/properties.yaml | 4 ++++ config/manager/kustomization.yaml | 2 +- .../grafana-operator.clusterserviceversion.yaml | 1 - 4 files changed, 12 insertions(+), 9 deletions(-) create mode 100644 bundle/metadata/properties.yaml diff --git a/bundle/manifests/grafana-operator.clusterserviceversion.yaml b/bundle/manifests/grafana-operator.clusterserviceversion.yaml index 1f7769fc5..ea4be787a 100644 --- a/bundle/manifests/grafana-operator.clusterserviceversion.yaml +++ b/bundle/manifests/grafana-operator.clusterserviceversion.yaml @@ -95,12 +95,12 @@ metadata: capabilities: Basic Install categories: Monitoring containerImage: ghcr.io/grafana/grafana-operator@sha256:97561cef949b58f55ec67d133c02ac205e2ec3fb77388aeb868dacfcebad0752 - createdAt: "2024-01-22T07:16:13Z" + createdAt: "2024-01-22T12:06:14Z" operators.operatorframework.io/builder: operator-sdk-v1.32.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: https://github.com/grafana/grafana-operator support: Grafana Labs - name: grafana-operator.v5.6.0 + name: grafana-operator.v5.6.1 namespace: placeholder spec: apiservicedefinitions: {} @@ -332,7 +332,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.annotations['olm.targetNamespaces'] - image: ghcr.io/grafana/grafana-operator@sha256:97561cef949b58f55ec67d133c02ac205e2ec3fb77388aeb868dacfcebad0752 + image: ghcr.io/grafana/grafana-operator@sha256:49ed7bdbae0b9a43e31df2e8ad2baad07042cf098d3c5944c4ce96e20a296695 imagePullPolicy: Always livenessProbe: httpGet: @@ -421,11 +421,11 @@ spec: name: Grafana Labs url: https://grafana.com relatedImages: - - image: docker.io/grafana/grafana@sha256:ff68ed4324e471ffa269aa5308cdcf12276ef2d5a660daea95db9d629a32a7d8 - name: grafana - - image: ghcr.io/grafana/grafana-operator@sha256:97561cef949b58f55ec67d133c02ac205e2ec3fb77388aeb868dacfcebad0752 + - image: ghcr.io/grafana/grafana-operator@sha256:49ed7bdbae0b9a43e31df2e8ad2baad07042cf098d3c5944c4ce96e20a296695 name: manager - image: ghcr.io/grafana/grafana-operator@sha256:97561cef949b58f55ec67d133c02ac205e2ec3fb77388aeb868dacfcebad0752 name: grafana-operator-97561cef949b58f55ec67d133c02ac205e2ec3fb77388aeb868dacfcebad0752-annotation + - image: docker.io/grafana/grafana@sha256:ff68ed4324e471ffa269aa5308cdcf12276ef2d5a660daea95db9d629a32a7d8 + name: grafana replaces: grafana-operator.v5.5.2 - version: 5.6.0 + version: 5.6.1 diff --git a/bundle/metadata/properties.yaml b/bundle/metadata/properties.yaml new file mode 100644 index 000000000..5727b961d --- /dev/null +++ b/bundle/metadata/properties.yaml @@ -0,0 +1,4 @@ +properties: + - type: olm.maxOpenShiftVersion + value: + version: "4.60" diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 55eeca4f1..15688959d 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -15,4 +15,4 @@ configMapGenerator: images: - name: controller newName: ghcr.io/grafana/grafana-operator - newTag: v5.6.0 + newTag: v5.6.1 diff --git a/config/manifests/bases/grafana-operator.clusterserviceversion.yaml b/config/manifests/bases/grafana-operator.clusterserviceversion.yaml index e3d468a23..fd7fd80dc 100644 --- a/config/manifests/bases/grafana-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/grafana-operator.clusterserviceversion.yaml @@ -9,7 +9,6 @@ metadata: createdAt: "2023-12-11T09:21:22Z" repository: https://github.com/grafana/grafana-operator support: Grafana Labs - olm.properties: '[{"type": "olm.maxOpenShiftVersion", "value": "v4.60"}]' name: grafana-operator.v0.0.0 namespace: placeholder spec: From 7ec27d08c2a16a98aded49a6e82d85c4abbe9bc3 Mon Sep 17 00:00:00 2001 From: Edvin Norling Date: Mon, 22 Jan 2024 13:08:06 +0100 Subject: [PATCH 3/7] add make description Signed-off-by: Edvin Norling --- .../manifests/grafana-operator.clusterserviceversion.yaml | 7 ++++--- .../bases/grafana-operator.clusterserviceversion.yaml | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bundle/manifests/grafana-operator.clusterserviceversion.yaml b/bundle/manifests/grafana-operator.clusterserviceversion.yaml index ea4be787a..47b386726 100644 --- a/bundle/manifests/grafana-operator.clusterserviceversion.yaml +++ b/bundle/manifests/grafana-operator.clusterserviceversion.yaml @@ -95,7 +95,8 @@ metadata: capabilities: Basic Install categories: Monitoring containerImage: ghcr.io/grafana/grafana-operator@sha256:97561cef949b58f55ec67d133c02ac205e2ec3fb77388aeb868dacfcebad0752 - createdAt: "2024-01-22T12:06:14Z" + createdAt: "2024-01-22T12:08:11Z" + description: Deploys and manages Grafana instances, dashboards and data sources operators.operatorframework.io/builder: operator-sdk-v1.32.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: https://github.com/grafana/grafana-operator @@ -421,11 +422,11 @@ spec: name: Grafana Labs url: https://grafana.com relatedImages: + - image: docker.io/grafana/grafana@sha256:ff68ed4324e471ffa269aa5308cdcf12276ef2d5a660daea95db9d629a32a7d8 + name: grafana - image: ghcr.io/grafana/grafana-operator@sha256:49ed7bdbae0b9a43e31df2e8ad2baad07042cf098d3c5944c4ce96e20a296695 name: manager - image: ghcr.io/grafana/grafana-operator@sha256:97561cef949b58f55ec67d133c02ac205e2ec3fb77388aeb868dacfcebad0752 name: grafana-operator-97561cef949b58f55ec67d133c02ac205e2ec3fb77388aeb868dacfcebad0752-annotation - - image: docker.io/grafana/grafana@sha256:ff68ed4324e471ffa269aa5308cdcf12276ef2d5a660daea95db9d629a32a7d8 - name: grafana replaces: grafana-operator.v5.5.2 version: 5.6.1 diff --git a/config/manifests/bases/grafana-operator.clusterserviceversion.yaml b/config/manifests/bases/grafana-operator.clusterserviceversion.yaml index fd7fd80dc..4c44de771 100644 --- a/config/manifests/bases/grafana-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/grafana-operator.clusterserviceversion.yaml @@ -7,6 +7,7 @@ metadata: categories: Monitoring containerImage: ghcr.io/grafana/grafana-operator:v5.6.0 createdAt: "2023-12-11T09:21:22Z" + description: Deploys and manages Grafana instances, dashboards and data sources repository: https://github.com/grafana/grafana-operator support: Grafana Labs name: grafana-operator.v0.0.0 From 16afbf20f42a487cd5280499c1a4ee304cb56a94 Mon Sep 17 00:00:00 2001 From: Edvin Norling Date: Mon, 22 Jan 2024 13:15:46 +0100 Subject: [PATCH 4/7] add maintainers Signed-off-by: Edvin Norling --- .../grafana-operator.clusterserviceversion.yaml | 15 ++++++++++++--- .../grafana-operator.clusterserviceversion.yaml | 9 +++++++++ 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/bundle/manifests/grafana-operator.clusterserviceversion.yaml b/bundle/manifests/grafana-operator.clusterserviceversion.yaml index 47b386726..b518a2ee2 100644 --- a/bundle/manifests/grafana-operator.clusterserviceversion.yaml +++ b/bundle/manifests/grafana-operator.clusterserviceversion.yaml @@ -95,7 +95,7 @@ metadata: capabilities: Basic Install categories: Monitoring containerImage: ghcr.io/grafana/grafana-operator@sha256:97561cef949b58f55ec67d133c02ac205e2ec3fb77388aeb868dacfcebad0752 - createdAt: "2024-01-22T12:08:11Z" + createdAt: "2024-01-22T12:15:51Z" description: Deploys and manages Grafana instances, dashboards and data sources operators.operatorframework.io/builder: operator-sdk-v1.32.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 @@ -416,17 +416,26 @@ spec: links: - name: Grafana Operator url: https://grafana.github.io/grafana-operator + maintainers: + - email: pbraun@redhat.com + name: Peter Braun + - email: hstefans@redhat.com + name: Hubert Stefanski + - email: edvin.norling@gmail.com + name: Edvin Norling + - email: demtis.register@gmail.com + name: Igor Beliakov maturity: stable minKubeVersion: 1.23.0 provider: name: Grafana Labs url: https://grafana.com relatedImages: - - image: docker.io/grafana/grafana@sha256:ff68ed4324e471ffa269aa5308cdcf12276ef2d5a660daea95db9d629a32a7d8 - name: grafana - image: ghcr.io/grafana/grafana-operator@sha256:49ed7bdbae0b9a43e31df2e8ad2baad07042cf098d3c5944c4ce96e20a296695 name: manager - image: ghcr.io/grafana/grafana-operator@sha256:97561cef949b58f55ec67d133c02ac205e2ec3fb77388aeb868dacfcebad0752 name: grafana-operator-97561cef949b58f55ec67d133c02ac205e2ec3fb77388aeb868dacfcebad0752-annotation + - image: docker.io/grafana/grafana@sha256:ff68ed4324e471ffa269aa5308cdcf12276ef2d5a660daea95db9d629a32a7d8 + name: grafana replaces: grafana-operator.v5.5.2 version: 5.6.1 diff --git a/config/manifests/bases/grafana-operator.clusterserviceversion.yaml b/config/manifests/bases/grafana-operator.clusterserviceversion.yaml index 4c44de771..4eb775746 100644 --- a/config/manifests/bases/grafana-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/grafana-operator.clusterserviceversion.yaml @@ -61,6 +61,15 @@ spec: links: - name: Grafana Operator url: https://grafana.github.io/grafana-operator + maintainers: + - email: pbraun@redhat.com + name: Peter Braun + - email: hstefans@redhat.com + name: Hubert Stefanski + - email: edvin.norling@gmail.com + name: Edvin Norling + - email: demtis.register@gmail.com + name: Igor Beliakov maturity: stable minKubeVersion: 1.23.0 provider: From 484d2ac356eadd7c48b25ee872bbe4b39feda909 Mon Sep 17 00:00:00 2001 From: Edvin Norling Date: Sat, 3 Feb 2024 08:09:41 +0100 Subject: [PATCH 5/7] change to grafana email --- .../bases/grafana-operator.clusterserviceversion.yaml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/config/manifests/bases/grafana-operator.clusterserviceversion.yaml b/config/manifests/bases/grafana-operator.clusterserviceversion.yaml index 4eb775746..018b2261d 100644 --- a/config/manifests/bases/grafana-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/grafana-operator.clusterserviceversion.yaml @@ -62,14 +62,8 @@ spec: - name: Grafana Operator url: https://grafana.github.io/grafana-operator maintainers: - - email: pbraun@redhat.com - name: Peter Braun - - email: hstefans@redhat.com - name: Hubert Stefanski - - email: edvin.norling@gmail.com - name: Edvin Norling - - email: demtis.register@gmail.com - name: Igor Beliakov + - email: grafana-operator@grafana.com + name: Grafana-operator maintainers maturity: stable minKubeVersion: 1.23.0 provider: From 293f2ab457a07c0d7efae7b919bb67d5a937ae47 Mon Sep 17 00:00:00 2001 From: Edvin Norling Date: Sat, 3 Feb 2024 08:17:38 +0100 Subject: [PATCH 6/7] use hack to add annotations --- Makefile | 1 + bundle.Dockerfile | 1 + .../grafana-operator.clusterserviceversion.yaml | 16 +++++----------- bundle/metadata/annotations.yaml | 3 +++ bundle/metadata/properties.yaml | 4 ---- hack/add-openshift-annotations.sh | 11 +++++++++++ 6 files changed, 21 insertions(+), 15 deletions(-) delete mode 100644 bundle/metadata/properties.yaml create mode 100755 hack/add-openshift-annotations.sh diff --git a/Makefile b/Makefile index 7f7fa77b9..157e29846 100644 --- a/Makefile +++ b/Makefile @@ -238,6 +238,7 @@ bundle: manifests kustomize operator-sdk ## Generate bundle manifests and metada $(OPERATOR_SDK) generate kustomize manifests -q cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG) $(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle $(BUNDLE_GEN_FLAGS) + ./hack/add-openshift-annotations.sh $(OPERATOR_SDK) bundle validate ./bundle .PHONY: bundle/redhat diff --git a/bundle.Dockerfile b/bundle.Dockerfile index 74f6e2eab..83dcc69fd 100644 --- a/bundle.Dockerfile +++ b/bundle.Dockerfile @@ -14,3 +14,4 @@ LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3 # Copy files to locations specified by labels. COPY bundle/manifests /manifests/ COPY bundle/metadata /metadata/ +LABEL com.redhat.openshift.versions="v4.11-v4.15" diff --git a/bundle/manifests/grafana-operator.clusterserviceversion.yaml b/bundle/manifests/grafana-operator.clusterserviceversion.yaml index b518a2ee2..24b28da8d 100644 --- a/bundle/manifests/grafana-operator.clusterserviceversion.yaml +++ b/bundle/manifests/grafana-operator.clusterserviceversion.yaml @@ -95,7 +95,7 @@ metadata: capabilities: Basic Install categories: Monitoring containerImage: ghcr.io/grafana/grafana-operator@sha256:97561cef949b58f55ec67d133c02ac205e2ec3fb77388aeb868dacfcebad0752 - createdAt: "2024-01-22T12:15:51Z" + createdAt: "2024-02-03T07:21:20Z" description: Deploys and manages Grafana instances, dashboards and data sources operators.operatorframework.io/builder: operator-sdk-v1.32.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 @@ -417,25 +417,19 @@ spec: - name: Grafana Operator url: https://grafana.github.io/grafana-operator maintainers: - - email: pbraun@redhat.com - name: Peter Braun - - email: hstefans@redhat.com - name: Hubert Stefanski - - email: edvin.norling@gmail.com - name: Edvin Norling - - email: demtis.register@gmail.com - name: Igor Beliakov + - email: grafana-operator@grafana.com + name: Grafana-operator maintainers maturity: stable minKubeVersion: 1.23.0 provider: name: Grafana Labs url: https://grafana.com relatedImages: + - image: docker.io/grafana/grafana@sha256:ff68ed4324e471ffa269aa5308cdcf12276ef2d5a660daea95db9d629a32a7d8 + name: grafana - image: ghcr.io/grafana/grafana-operator@sha256:49ed7bdbae0b9a43e31df2e8ad2baad07042cf098d3c5944c4ce96e20a296695 name: manager - image: ghcr.io/grafana/grafana-operator@sha256:97561cef949b58f55ec67d133c02ac205e2ec3fb77388aeb868dacfcebad0752 name: grafana-operator-97561cef949b58f55ec67d133c02ac205e2ec3fb77388aeb868dacfcebad0752-annotation - - image: docker.io/grafana/grafana@sha256:ff68ed4324e471ffa269aa5308cdcf12276ef2d5a660daea95db9d629a32a7d8 - name: grafana replaces: grafana-operator.v5.5.2 version: 5.6.1 diff --git a/bundle/metadata/annotations.yaml b/bundle/metadata/annotations.yaml index 87ac26496..1aceb1d9c 100644 --- a/bundle/metadata/annotations.yaml +++ b/bundle/metadata/annotations.yaml @@ -9,3 +9,6 @@ annotations: operators.operatorframework.io.metrics.builder: operator-sdk-v1.32.0 operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v3 + + # OpenShift specific annotations + com.redhat.openshift.versions: "v4.11-v4.15" diff --git a/bundle/metadata/properties.yaml b/bundle/metadata/properties.yaml deleted file mode 100644 index 5727b961d..000000000 --- a/bundle/metadata/properties.yaml +++ /dev/null @@ -1,4 +0,0 @@ -properties: - - type: olm.maxOpenShiftVersion - value: - version: "4.60" diff --git a/hack/add-openshift-annotations.sh b/hack/add-openshift-annotations.sh new file mode 100755 index 000000000..b4ac3ad1b --- /dev/null +++ b/hack/add-openshift-annotations.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +OPENSHIFT_VERSIONS="\"v4.11-v4.15\"" + +{ + echo "" + echo " # OpenShift specific annotations" + echo " com.redhat.openshift.versions: $OPENSHIFT_VERSIONS" +} >> bundle/metadata/annotations.yaml + +echo "LABEL com.redhat.openshift.versions=$OPENSHIFT_VERSIONS" >> bundle.Dockerfile From e92f7948d205953fc1bc59afd86104e5f649bc4e Mon Sep 17 00:00:00 2001 From: Edvin Norling Date: Sat, 3 Feb 2024 08:28:38 +0100 Subject: [PATCH 7/7] replaces 5.6.0 --- bundle/manifests/grafana-operator.clusterserviceversion.yaml | 4 ++-- .../bases/grafana-operator.clusterserviceversion.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bundle/manifests/grafana-operator.clusterserviceversion.yaml b/bundle/manifests/grafana-operator.clusterserviceversion.yaml index 24b28da8d..34da697e3 100644 --- a/bundle/manifests/grafana-operator.clusterserviceversion.yaml +++ b/bundle/manifests/grafana-operator.clusterserviceversion.yaml @@ -95,7 +95,7 @@ metadata: capabilities: Basic Install categories: Monitoring containerImage: ghcr.io/grafana/grafana-operator@sha256:97561cef949b58f55ec67d133c02ac205e2ec3fb77388aeb868dacfcebad0752 - createdAt: "2024-02-03T07:21:20Z" + createdAt: "2024-02-03T07:28:20Z" description: Deploys and manages Grafana instances, dashboards and data sources operators.operatorframework.io/builder: operator-sdk-v1.32.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 @@ -431,5 +431,5 @@ spec: name: manager - image: ghcr.io/grafana/grafana-operator@sha256:97561cef949b58f55ec67d133c02ac205e2ec3fb77388aeb868dacfcebad0752 name: grafana-operator-97561cef949b58f55ec67d133c02ac205e2ec3fb77388aeb868dacfcebad0752-annotation - replaces: grafana-operator.v5.5.2 + replaces: grafana-operator.v5.6.0 version: 5.6.1 diff --git a/config/manifests/bases/grafana-operator.clusterserviceversion.yaml b/config/manifests/bases/grafana-operator.clusterserviceversion.yaml index 018b2261d..5a07268df 100644 --- a/config/manifests/bases/grafana-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/grafana-operator.clusterserviceversion.yaml @@ -69,5 +69,5 @@ spec: provider: name: Grafana Labs url: https://grafana.com - replaces: grafana-operator.v5.5.2 + replaces: grafana-operator.v5.6.0 version: 0.0.0