Skip to content

Commit

Permalink
use hack to add annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
NissesSenap committed Feb 3, 2024
1 parent 484d2ac commit 293f2ab
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 15 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: 5 additions & 11 deletions bundle/manifests/grafana-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -417,25 +417,19 @@ spec:
- name: Grafana Operator
url: https://grafana.github.io/grafana-operator
maintainers:
- email: [email protected]
name: Peter Braun
- email: [email protected]
name: Hubert Stefanski
- email: [email protected]
name: Edvin Norling
- email: [email protected]
name: Igor Beliakov
- email: [email protected]
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
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"
4 changes: 0 additions & 4 deletions bundle/metadata/properties.yaml

This file was deleted.

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 293f2ab

Please sign in to comment.