Skip to content

Commit

Permalink
Trying to pass OLM CI (#1387)
Browse files Browse the repository at this point in the history
* add maxOpenshiftVersion

* make olm CI pass

* add make description

Signed-off-by: Edvin Norling <edvin.norling@kognic.com>

* add maintainers

Signed-off-by: Edvin Norling <edvin.norling@kognic.com>

* change to grafana email

* use hack to add annotations

* replaces 5.6.0

---------

Signed-off-by: Edvin Norling <edvin.norling@kognic.com>
  • Loading branch information
NissesSenap committed Feb 3, 2024
1 parent 5215764 commit 721edbe
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 8 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions bundle.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
16 changes: 10 additions & 6 deletions bundle/manifests/grafana-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,13 @@ metadata:
capabilities: Basic Install
categories: Monitoring
containerImage: ghcr.io/grafana/grafana-operator@sha256:97561cef949b58f55ec67d133c02ac205e2ec3fb77388aeb868dacfcebad0752
createdAt: "2024-01-22T07:16:13Z"
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
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: {}
Expand Down Expand Up @@ -332,7 +333,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:
Expand Down Expand Up @@ -415,6 +416,9 @@ spec:
links:
- name: Grafana Operator
url: https://grafana.github.io/grafana-operator
maintainers:
- email: grafana-operator@grafana.com
name: Grafana-operator maintainers
maturity: stable
minKubeVersion: 1.23.0
provider:
Expand All @@ -423,9 +427,9 @@ spec:
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
replaces: grafana-operator.v5.5.2
version: 5.6.0
replaces: grafana-operator.v5.6.0
version: 5.6.1
3 changes: 3 additions & 0 deletions bundle/metadata/annotations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ configMapGenerator:
images:
- name: controller
newName: ghcr.io/grafana/grafana-operator
newTag: v5.6.0
newTag: v5.6.1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -60,10 +61,13 @@ spec:
links:
- name: Grafana Operator
url: https://grafana.github.io/grafana-operator
maintainers:
- email: grafana-operator@grafana.com
name: Grafana-operator maintainers
maturity: stable
minKubeVersion: 1.23.0
provider:
name: Grafana Labs
url: https://grafana.com
replaces: grafana-operator.v5.5.2
replaces: grafana-operator.v5.6.0
version: 0.0.0
11 changes: 11 additions & 0 deletions hack/add-openshift-annotations.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 721edbe

Please sign in to comment.