Skip to content

Commit 721edbe

Browse files
authored
Trying to pass OLM CI (#1387)
* add maxOpenshiftVersion * make olm CI pass * add make description Signed-off-by: Edvin Norling <[email protected]> * add maintainers Signed-off-by: Edvin Norling <[email protected]> * change to grafana email * use hack to add annotations * replaces 5.6.0 --------- Signed-off-by: Edvin Norling <[email protected]>
1 parent 5215764 commit 721edbe

7 files changed

+32
-8
lines changed

Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ bundle: manifests kustomize operator-sdk ## Generate bundle manifests and metada
238238
$(OPERATOR_SDK) generate kustomize manifests -q
239239
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
240240
$(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle $(BUNDLE_GEN_FLAGS)
241+
./hack/add-openshift-annotations.sh
241242
$(OPERATOR_SDK) bundle validate ./bundle
242243

243244
.PHONY: bundle/redhat

bundle.Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3
1414
# Copy files to locations specified by labels.
1515
COPY bundle/manifests /manifests/
1616
COPY bundle/metadata /metadata/
17+
LABEL com.redhat.openshift.versions="v4.11-v4.15"

bundle/manifests/grafana-operator.clusterserviceversion.yaml

+10-6
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,13 @@ metadata:
9595
capabilities: Basic Install
9696
categories: Monitoring
9797
containerImage: ghcr.io/grafana/grafana-operator@sha256:97561cef949b58f55ec67d133c02ac205e2ec3fb77388aeb868dacfcebad0752
98-
createdAt: "2024-01-22T07:16:13Z"
98+
createdAt: "2024-02-03T07:28:20Z"
99+
description: Deploys and manages Grafana instances, dashboards and data sources
99100
operators.operatorframework.io/builder: operator-sdk-v1.32.0
100101
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
101102
repository: https://github.com/grafana/grafana-operator
102103
support: Grafana Labs
103-
name: grafana-operator.v5.6.0
104+
name: grafana-operator.v5.6.1
104105
namespace: placeholder
105106
spec:
106107
apiservicedefinitions: {}
@@ -332,7 +333,7 @@ spec:
332333
valueFrom:
333334
fieldRef:
334335
fieldPath: metadata.annotations['olm.targetNamespaces']
335-
image: ghcr.io/grafana/grafana-operator@sha256:97561cef949b58f55ec67d133c02ac205e2ec3fb77388aeb868dacfcebad0752
336+
image: ghcr.io/grafana/grafana-operator@sha256:49ed7bdbae0b9a43e31df2e8ad2baad07042cf098d3c5944c4ce96e20a296695
336337
imagePullPolicy: Always
337338
livenessProbe:
338339
httpGet:
@@ -415,6 +416,9 @@ spec:
415416
links:
416417
- name: Grafana Operator
417418
url: https://grafana.github.io/grafana-operator
419+
maintainers:
420+
421+
name: Grafana-operator maintainers
418422
maturity: stable
419423
minKubeVersion: 1.23.0
420424
provider:
@@ -423,9 +427,9 @@ spec:
423427
relatedImages:
424428
- image: docker.io/grafana/grafana@sha256:ff68ed4324e471ffa269aa5308cdcf12276ef2d5a660daea95db9d629a32a7d8
425429
name: grafana
426-
- image: ghcr.io/grafana/grafana-operator@sha256:97561cef949b58f55ec67d133c02ac205e2ec3fb77388aeb868dacfcebad0752
430+
- image: ghcr.io/grafana/grafana-operator@sha256:49ed7bdbae0b9a43e31df2e8ad2baad07042cf098d3c5944c4ce96e20a296695
427431
name: manager
428432
- image: ghcr.io/grafana/grafana-operator@sha256:97561cef949b58f55ec67d133c02ac205e2ec3fb77388aeb868dacfcebad0752
429433
name: grafana-operator-97561cef949b58f55ec67d133c02ac205e2ec3fb77388aeb868dacfcebad0752-annotation
430-
replaces: grafana-operator.v5.5.2
431-
version: 5.6.0
434+
replaces: grafana-operator.v5.6.0
435+
version: 5.6.1

bundle/metadata/annotations.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ annotations:
99
operators.operatorframework.io.metrics.builder: operator-sdk-v1.32.0
1010
operators.operatorframework.io.metrics.mediatype.v1: metrics+v1
1111
operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v3
12+
13+
# OpenShift specific annotations
14+
com.redhat.openshift.versions: "v4.11-v4.15"

config/manager/kustomization.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ configMapGenerator:
1515
images:
1616
- name: controller
1717
newName: ghcr.io/grafana/grafana-operator
18-
newTag: v5.6.0
18+
newTag: v5.6.1

config/manifests/bases/grafana-operator.clusterserviceversion.yaml

+5-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ metadata:
77
categories: Monitoring
88
containerImage: ghcr.io/grafana/grafana-operator:v5.6.0
99
createdAt: "2023-12-11T09:21:22Z"
10+
description: Deploys and manages Grafana instances, dashboards and data sources
1011
repository: https://github.com/grafana/grafana-operator
1112
support: Grafana Labs
1213
name: grafana-operator.v0.0.0
@@ -60,10 +61,13 @@ spec:
6061
links:
6162
- name: Grafana Operator
6263
url: https://grafana.github.io/grafana-operator
64+
maintainers:
65+
66+
name: Grafana-operator maintainers
6367
maturity: stable
6468
minKubeVersion: 1.23.0
6569
provider:
6670
name: Grafana Labs
6771
url: https://grafana.com
68-
replaces: grafana-operator.v5.5.2
72+
replaces: grafana-operator.v5.6.0
6973
version: 0.0.0

hack/add-openshift-annotations.sh

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
OPENSHIFT_VERSIONS="\"v4.11-v4.15\""
4+
5+
{
6+
echo ""
7+
echo " # OpenShift specific annotations"
8+
echo " com.redhat.openshift.versions: $OPENSHIFT_VERSIONS"
9+
} >> bundle/metadata/annotations.yaml
10+
11+
echo "LABEL com.redhat.openshift.versions=$OPENSHIFT_VERSIONS" >> bundle.Dockerfile

0 commit comments

Comments
 (0)