Repository navigation
feat: update migration to current COS and COD definitions #93
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
86d74e1
feat: update migration to current COS and COD definitions
tmshort 73dc304
fix: repair partial controller installations safely
tmshort 3987bd3
test: use Redis for live namespace deletion
tmshort 232dc36
docs: describe revision API helpers and regression coverage
tmshort 324c221
test: use schema-valid operators for live batch migration
tmshort 29ec7da
refactor: validate migration revisions with server-side dry runs
tmshort 22da80f
fix: align migration E2E setup and dry-run permissions
tmshort 40eda60
fix: make rollback snapshot ordering deterministic
tmshort b02246b
refactor: keep COS API checks in readiness reporting
tmshort 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,39 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| # Build the pinned controller: released installers use older experimental APIs. | ||
| : "${OLM_V1_COMMIT:?OLM_V1_COMMIT is required}" | ||
| : "${E2E_KUBECONFIG:?E2E_KUBECONFIG is required}" | ||
| : "${E2E_CLUSTER_NAME:?E2E_CLUSTER_NAME is required}" | ||
| : "${KIND:?KIND is required}" | ||
| [[ "$OLM_V1_COMMIT" =~ ^[0-9a-f]{40}$ ]] || { echo 'OLM_V1_COMMIT must be a full commit hash' >&2; exit 1; } | ||
|
|
||
| source_dir=$(mktemp -d) | ||
| trap 'rm -rf "$source_dir"' EXIT | ||
| git -C "$source_dir" init --quiet | ||
| git -C "$source_dir" fetch --quiet --depth=1 https://github.com/operator-framework/operator-controller.git "$OLM_V1_COMMIT" | ||
| git -C "$source_dir" checkout --quiet --detach FETCH_HEAD | ||
|
|
||
| # Reuse upstream image names, build targets, manifest generation, and installer. | ||
| # Loading into the existing cluster avoids upstream's destructive cluster target. | ||
| # setup.sh installs the live catalog after controller installation. | ||
| export KUBECONFIG | ||
| KUBECONFIG=$(realpath "$E2E_KUBECONFIG") | ||
| # The generated Helm manifest uses these image names; do not inherit caller | ||
| # image overrides (including make command-line variables) into the build. | ||
| make -C "$source_dir" -f Makefile -f - migration-install \ | ||
| IMAGE_REGISTRY=quay.io/operator-framework IMAGE_TAG=devel \ | ||
| OPCON_IMAGE_REPO=quay.io/operator-framework/operator-controller \ | ||
| CATD_IMAGE_REPO=quay.io/operator-framework/catalogd \ | ||
| OBJECT_CONTROLLER_IMAGE_REPO=quay.io/operator-framework/object-controller \ | ||
| OPCON_IMG=quay.io/operator-framework/operator-controller:devel \ | ||
| CATD_IMG=quay.io/operator-framework/catalogd:devel \ | ||
| OBJECT_CONTROLLER_IMG=quay.io/operator-framework/object-controller:devel \ | ||
| KIND="$KIND" MIGRATION_CLUSTER="$E2E_CLUSTER_NAME" <<'MAKE' | ||
|
joelanford marked this conversation as resolved.
Resolved
|
||
| SHELL := /bin/bash | ||
| .SHELLFLAGS := -eu -o pipefail -c | ||
| .PHONY: migration-install | ||
| migration-install: docker-build manifests | ||
| $(KIND) load docker-image $(OPCON_IMG) $(CATD_IMG) $(OBJECT_CONTROLLER_IMG) --name $(MIGRATION_CLUSTER) | ||
| MANIFEST=$(EXPERIMENTAL_MANIFEST) DEFAULT_CATALOG=$(CATALOGS_MANIFEST) INSTALL_DEFAULT_CATALOGS=false envsubst '$$DEFAULT_CATALOG,$$CERT_MGR_VERSION,$$INSTALL_DEFAULT_CATALOGS,$$MANIFEST' < scripts/install.tpl.sh | bash | ||
| MAKE | ||
This file contains hidden or 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
Oops, something went wrong.
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.
@joelanford walked me through why we're pulling at a specific commit level here, and I'm not a fan, but I understand we want more stable CI in this repo
Uh oh!
There was an error while loading. Please reload this page.
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.
The APIs are experimental/TPNU, so, they can change incompatibly at any time.