forked from gatekeeper/gatekeeper-operator
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Refactor the bundle build #133
Merged
openshift-merge-bot
merged 3 commits into
stolostron:release-3.17
from
dhaiducek:bundle-build-updates
Dec 3, 2024
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
914 changes: 455 additions & 459 deletions
914
.tekton/gatekeeper-operator-bundle-3-17-pull-request.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,12 +21,12 @@ LABEL com.redhat.delivery.operator.bundle=true | |
LABEL com.redhat.openshift.versions=v4.12 | ||
# Bundle metadata | ||
LABEL name=gatekeeper/gatekeeper-operator-bundle | ||
LABEL description=gatekeeper-operator-bundle | ||
LABEL io.k8s.description=gatekeeper-operator-bundle | ||
LABEL summary="The Gatekeeper Operator installs and configures Open Policy Agent Gatekeeper." | ||
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 release="" | ||
LABEL distribution-scope=public | ||
LABEL maintainer="[email protected]" | ||
LABEL url=https://github.com/stolostron/gatekeeper-operator | ||
LABEL vendor="Red Hat" | ||
LABEL vendor="Red Hat, Inc." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
FROM registry.redhat.io/openshift4/ose-cli-rhel9:v4.17 as builder | ||
|
||
WORKDIR /gatekeeper-operator | ||
COPY . . | ||
RUN /gatekeeper-operator/build/konflux-patch.sh | ||
|
||
FROM scratch | ||
|
||
# Copy files to locations specified by labels. | ||
COPY --from=builder /gatekeeper-operator/bundle/manifests /manifests/ | ||
COPY --from=builder /gatekeeper-operator/bundle/metadata /metadata/ | ||
|
||
# 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/ | ||
LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 | ||
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ | ||
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. | ||
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 | ||
# 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 release="" | ||
LABEL distribution-scope=public | ||
LABEL maintainer="[email protected]" | ||
LABEL url=https://github.com/stolostron/gatekeeper-operator | ||
LABEL vendor="Red Hat, Inc." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#! /bin/bash | ||
|
||
set -e | ||
|
||
# Gatekeeper Operator image | ||
operator_img="registry.redhat.io/gatekeeper/gatekeeper-rhel9-operator@sha256:6e386be134d928bdb03b702e399c97e7aedecacaa3d0813183a8c5ecf13c7bc2" | ||
# Gatekeeper image | ||
gatekeeper_img="registry.redhat.io/gatekeeper/gatekeeper-rhel9@sha256:3095f68c12c5dc3b00ce84e1c37d516d96cbcb06d42eaef5372358786956bd62" | ||
|
||
build_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" | ||
|
||
csv_file=${build_dir}/../bundle/manifests/gatekeeper-operator.clusterserviceversion.yaml | ||
|
||
csv_patch=$(printf '[{ | ||
"op": "replace", | ||
"path": "/spec/install/spec/deployments/0/spec/template/spec/containers/0/env/0/value", | ||
"value": "%s", | ||
},{ | ||
"op": "replace", | ||
"path": "/spec/install/spec/deployments/0/spec/template/spec/containers/0/image", | ||
"value": "%s", | ||
},{ | ||
"op": "replace", | ||
"path": "/spec/relatedImages/0/image", | ||
"value": "%s", | ||
}]' ${gatekeeper_img} ${operator_img} ${gatekeeper_img}) | ||
|
||
kubectl patch --local=true -f ${csv_file} --type=json --patch="${csv_patch}" --output=yaml >${csv_file}.bk | ||
mv ${csv_file}.bk ${csv_file} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,12 +16,12 @@ annotations: | |
com.redhat.openshift.versions: v4.12 | ||
# Bundle metadata | ||
name: gatekeeper/gatekeeper-operator-bundle | ||
description: gatekeeper-operator-bundle | ||
io.k8s.description: gatekeeper-operator-bundle | ||
summary: "The Gatekeeper Operator installs and configures Open Policy Agent Gatekeeper." | ||
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 | ||
release: "" | ||
distribution-scope: public | ||
maintainer: "[email protected]" | ||
url: https://github.com/stolostron/gatekeeper-operator | ||
vendor: "Red Hat" | ||
vendor: "Red Hat, Inc." |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will these get updated by nudges?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's correct--that's the next piece I need to work out. That and the FBC.