Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix annotations #159

Merged
merged 1 commit into from
Jan 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -318,14 +318,15 @@ bundle: operator-sdk manifests kustomize ## Generate bundle manifests and metada
$(SED) -i 's/mediatype: \"\"/mediatype: \"image\/svg+xml\"/g' bundle/manifests/gatekeeper-operator.clusterserviceversion.yaml
$(SED) -i 's/^ version:.*/ version: "$(VERSION)"/' bundle/manifests/gatekeeper-operator.clusterserviceversion.yaml
$(SED) -i '/^ createdAt:.*/d' bundle/manifests/gatekeeper-operator.clusterserviceversion.yaml
$(SED) -i 's/$(CHANNELS)/$(CHANNELS)/g' bundle/metadata/annotations.yaml
yq '.annotations["operators.operatorframework.io.bundle.channels.v1"] = "$(CHANNELS)"' -i bundle/metadata/annotations.yaml
yq '.annotations.version = "v$(VERSION)"' -i bundle/metadata/annotations.yaml
$(SED) -i 's/^ olm.skipRange:.*/ olm.skipRange: "<$(VERSION)"/' bundle/manifests/gatekeeper-operator.clusterserviceversion.yaml
ifneq ($(REPLACES_VERSION), none)
$(SED) -i 's/^ replaces:.*/ replaces: gatekeeper-operator.v$(REPLACES_VERSION)/' bundle/manifests/gatekeeper-operator.clusterserviceversion.yaml
else
$(SED) -i 's/^ replaces:.*/ # replaces: none/' bundle/manifests/gatekeeper-operator.clusterserviceversion.yaml
endif
awk '/FROM/,/# Core bundle annotations./' build/bundle.Dockerfile | sed '$$d' > build/bundle.Dockerfile.tmp
awk '/FROM/,/# Core bundle annotations/' build/bundle.Dockerfile | sed '$$d' > build/bundle.Dockerfile.tmp
mv build/bundle.Dockerfile.tmp build/bundle.Dockerfile
yq '.annotations' bundle/metadata/annotations.yaml | sed 's/: /=/' | sed 's/^\([^#]\)/LABEL \1/' >> build/bundle.Dockerfile
$(OPERATOR_SDK) bundle validate ./bundle
Expand Down
12 changes: 8 additions & 4 deletions build/bundle.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM scratch
COPY bundle/manifests /manifests/
COPY bundle/metadata /metadata/

# Core bundle annotations.
# Core bundle annotations
LABEL operators.operatorframework.io.bundle.channel.default.v1=stable
LABEL operators.operatorframework.io.bundle.channels.v1="stable,3.17"
LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
Expand All @@ -14,17 +14,21 @@ LABEL operators.operatorframework.io.bundle.package.v1=gatekeeper-operator
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.34.1
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3
# Red Hat annotations.
# Red Hat annotations
LABEL com.redhat.component=gatekeeper-operator-bundle-container
LABEL com.redhat.delivery.backport=false
LABEL com.redhat.delivery.operator.bundle=true
LABEL com.redhat.openshift.versions=v4.12
# K8s/Openshift annotations
LABEL io.k8s.display-name="Gatekeeper Operator"
LABEL io.k8s.description="The Gatekeeper Operator installs and configures Open Policy Agent Gatekeeper."
LABEL io.openshift.expose-services=""
LABEL io.openshift.tags="data,images"
# Bundle metadata
LABEL name=gatekeeper/gatekeeper-operator-bundle
LABEL description="The Gatekeeper Operator installs and configures Open Policy Agent Gatekeeper."
LABEL io.k8s.description="The Gatekeeper Operator installs and configures Open Policy Agent Gatekeeper."
LABEL summary="Red Hat Gatekeeper Operator"
LABEL version=v3.17.0
LABEL version=v3.17.1
LABEL release=""
LABEL distribution-scope=public
LABEL maintainer="[email protected]"
Expand Down
12 changes: 8 additions & 4 deletions build/bundle.Dockerfile.rhtap
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ FROM scratch
COPY --from=builder /gatekeeper-operator/bundle/manifests /manifests/
COPY --from=builder /gatekeeper-operator/bundle/metadata /metadata/

# Core bundle annotations.
# Core bundle annotations
LABEL operators.operatorframework.io.bundle.channel.default.v1=stable
LABEL operators.operatorframework.io.bundle.channels.v1="stable,3.17"
LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
Expand All @@ -20,17 +20,21 @@ LABEL operators.operatorframework.io.bundle.package.v1=gatekeeper-operator
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.34.1
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3
# Red Hat annotations.
# Red Hat annotations
LABEL com.redhat.component=gatekeeper-operator-bundle-container
LABEL com.redhat.delivery.backport=false
LABEL com.redhat.delivery.operator.bundle=true
LABEL com.redhat.openshift.versions=v4.12
# K8s/Openshift annotations
LABEL io.k8s.display-name="Gatekeeper Operator"
LABEL io.k8s.description="The Gatekeeper Operator installs and configures Open Policy Agent Gatekeeper."
LABEL io.openshift.expose-services=""
LABEL io.openshift.tags="data,images"
# Bundle metadata
LABEL name=gatekeeper/gatekeeper-operator-bundle
LABEL description="The Gatekeeper Operator installs and configures Open Policy Agent Gatekeeper."
LABEL io.k8s.description="The Gatekeeper Operator installs and configures Open Policy Agent Gatekeeper."
LABEL summary="Red Hat Gatekeeper Operator"
LABEL version=v3.17.0
LABEL version=v3.17.1
LABEL release=""
LABEL distribution-scope=public
LABEL maintainer="[email protected]"
Expand Down
12 changes: 8 additions & 4 deletions bundle/metadata/annotations.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
annotations:
# Core bundle annotations.
# Core bundle annotations
operators.operatorframework.io.bundle.channel.default.v1: stable
operators.operatorframework.io.bundle.channels.v1: "stable,3.17"
operators.operatorframework.io.bundle.manifests.v1: manifests/
Expand All @@ -9,17 +9,21 @@ annotations:
operators.operatorframework.io.metrics.builder: operator-sdk-v1.34.1
operators.operatorframework.io.metrics.mediatype.v1: metrics+v1
operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v3
# Red Hat annotations.
# Red Hat annotations
com.redhat.component: gatekeeper-operator-bundle-container
com.redhat.delivery.backport: false
com.redhat.delivery.operator.bundle: true
com.redhat.openshift.versions: v4.12
# K8s/Openshift annotations
io.k8s.display-name: "Gatekeeper Operator"
io.k8s.description: "The Gatekeeper Operator installs and configures Open Policy Agent Gatekeeper."
io.openshift.expose-services: ""
io.openshift.tags: "data,images"
# Bundle metadata
name: gatekeeper/gatekeeper-operator-bundle
description: "The Gatekeeper Operator installs and configures Open Policy Agent Gatekeeper."
io.k8s.description: "The Gatekeeper Operator installs and configures Open Policy Agent Gatekeeper."
summary: "Red Hat Gatekeeper Operator"
version: v3.17.0
version: v3.17.1
release: ""
distribution-scope: public
maintainer: "[email protected]"
Expand Down
Loading