-
Notifications
You must be signed in to change notification settings - Fork 28
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
Add configs for building a bundle with Konflux #1075
Open
gbenhaim
wants to merge
1
commit into
kubev2v:main
Choose a base branch
from
gbenhaim:konflux-bundle
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
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
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 @@ | ||
#!/bin/bash -e | ||
|
||
declare -A images | ||
|
||
# The image refrences below will get updated by Konflux everytime there is a new image. | ||
|
||
images[API_IMAGE]=quay.io/redhat-user-workloads/rh-mtv-1-tenant/forklift-operator/forklift-api@sha256:d21e617db2382601d707e2856c328aa3862db0469a7fe8ad70a250e22736f7d4 | ||
|
||
images[CONTROLLER_IMAGE]=quay.io/redhat-user-workloads/rh-mtv-1-tenant/forklift-operator/forklift-controller@sha256:d156496b7dc81ab4b81c1808390f17cda7400ead44e22af6c7d682fd2d2da07b | ||
|
||
images[MUST_GATHER_IMAGE]=quay.io/redhat-user-workloads/rh-mtv-1-tenant/forklift-operator/forklift-must-gather@sha256:3ff09dbc5ca4c0dd196eab5da46a98da7deaa4e71de010cd52684ca2eaaa0d7a | ||
|
||
images[OPENSTACK_POPULATOR_IMAGE]=quay.io/redhat-user-workloads/rh-mtv-1-tenant/forklift-operator/openstack-populator@sha256:f7bbdd2504f4e8441a9be58ee780b6c6ca3b4285ba4020b8958575dc5ecf9026 | ||
|
||
images[OPERATOR_IMAGE]=quay.io/redhat-user-workloads/rh-mtv-1-tenant/forklift-operator/forklift-operator@sha256:e34c608d6439b9ac5f9f297e4eaf35c69a5b8b74e3622385415d33479071f420 | ||
|
||
images[OVA_PROVIDER_SERVER_IMAGE]=quay.io/redhat-user-workloads/rh-mtv-1-tenant/forklift-operator/ova-provider-server@sha256:f8358ba912fbb4928f9021f0dd01d290df87facd1f4eed5da912e10aff5378ae | ||
|
||
images[OVIRT_POPULATOR_IMAGE]=quay.io/redhat-user-workloads/rh-mtv-1-tenant/forklift-operator/ovirt-populator@sha256:53d572527b5b9a3e5e55d19c0f7b9022a08242b80fdf4e2d3b964f75a48117e8 | ||
|
||
images[POPULATOR_CONTROLLER_IMAGE]=quay.io/redhat-user-workloads/rh-mtv-1-tenant/forklift-operator/populator-controller@sha256:c127768d14d9c56d487e2356a315f634278a412a9a50ab9c3eda447d5e3d0f2d | ||
|
||
images[UI_PLUGIN_IMAGE]=quay.io/redhat-user-workloads/rh-mtv-1-tenant/forklift-operator/forklift-console-plugin@sha256:fdc62b3269de1acb669419e7581cc22e4ef6e0f55a512d48c0e4dd7295d369ab | ||
|
||
images[VALIDATION_IMAGE]=quay.io/redhat-user-workloads/rh-mtv-1-tenant/forklift-operator/validation@sha256:4d04b097253a0e478d5938e2496a3ead842350f74e3972af0f953083bf7fe906 | ||
|
||
images[VIRT_V2V_IMAGE]=quay.io/redhat-user-workloads/rh-mtv-1-tenant/forklift-operator/virt-v2v@sha256:17628ab1f836549509ad80c321f669441d3f15348a5ef151b69fbbcec03ccd30 | ||
|
||
# Chage the repository of the images to match the repository they would be pushed | ||
# to during a release. | ||
|
||
for k in "${!images[@]}"; do | ||
image="${images[$k]}" | ||
new_image="${image/redhat-user-workloads\/rh-mtv-1-tenant/kubev2v}" | ||
export "$k=$new_image" | ||
done | ||
|
||
export VERSION="v2.7.0" |
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,63 @@ | ||
FROM quay.io/konflux-ci/operator-sdk-builder@sha256:08f084228288d6314573d7742671fc7ddf84c19e4cf8eeb7623f261a514d0e4e as builder | ||
|
||
COPY ./. /repo | ||
WORKDIR /repo/operator | ||
RUN source ./export-vars.sh && \ | ||
kustomize build config/manifests/ \ | ||
| envsubst \ | ||
| operator-sdk generate bundle \ | ||
-q \ | ||
--overwrite \ | ||
--extra-service-accounts forklift-controller,forklift-api,forklift-populator-controller \ | ||
--version 2.7.0 \ | ||
--channels development \ | ||
--default-channel development \ | ||
--output-dir build | ||
|
||
FROM scratch | ||
|
||
COPY --from=builder /repo/operator/build/manifests /manifests/ | ||
COPY --from=builder /repo/operator/build/metadata /metadata/ | ||
|
||
# These are three labels needed to control how the pipeline should handle this container image | ||
# This first label tells the pipeline that this is a bundle image and should be | ||
# delivered via an index image | ||
LABEL com.redhat.delivery.operator.bundle=true | ||
|
||
# This second label tells the pipeline which versions of OpenShift the operator supports. | ||
# This is used to control which index images should include this operator. | ||
# TODO: move to 4.7 once available! | ||
LABEL com.redhat.openshift.versions="v4.14-v4.16" | ||
|
||
# This third label tells the pipeline that this operator should *also* be supported on OCP 4.4 and | ||
# earlier. It is used to control whether or not the pipeline should attempt to automatically | ||
# backport this content into the old appregistry format and upload it to the quay.io application | ||
# registry endpoints. | ||
LABEL com.redhat.delivery.backport=false | ||
|
||
# The rest of these labels are copies of the same content in annotations.yaml and are needed by OLM | ||
LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 | ||
LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ | ||
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ | ||
LABEL operators.operatorframework.io.bundle.package.v1=mtv-operator | ||
LABEL operators.operatorframework.io.bundle.channels.v1=release-v2.7 | ||
LABEL operators.operatorframework.io.bundle.channel.default.v1=release-v2.7 | ||
|
||
# Not sure whate these label expand to | ||
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.22.0+git | ||
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 | ||
LABEL operators.operatorframework.io.metrics.project_layout=ansible.sdk.operatorframework.io/v1 | ||
LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/ | ||
LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1 | ||
|
||
# Main labels | ||
LABEL \ | ||
com.redhat.component="mtv-operator-bundle-container" \ | ||
version="2.7.0" \ | ||
name="migration-toolkit-virtualization/mtv-operator-bundle" \ | ||
License="Apache License 2.0" \ | ||
io.k8s.display-name="Migration Toolkit for Virtualization" \ | ||
io.openshift.tags="migration" \ | ||
io.k8s.description="Migration Toolkit for Virtualization - Operator Bundle" \ | ||
summary="Migration Toolkit for Virtualization - Operator Bundle" \ | ||
maintainer="Migration Toolkit for Virtualization Team <migtoolkit-virt@redhat.com>" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please switch to
|
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.
Please move this under the /build/ dir