fix(operator): make manager Deployment OCI-only#13
Closed
CMGS wants to merge 1 commit into
Closed
Conversation
Replace the stale EPOCH_URL env with OCI_REGISTRY and wire GCP ADC auth for Artifact Registry so the OCI-only operator can start. Mount the cocoon-ar-writer-key Secret and point GOOGLE_APPLICATION_CREDENTIALS at it for artifactregistry.writer access.
Contributor
Author
|
Superseded: change landed directly on main as 9a5d5e0 per updated plan (commit-to-main, no PR). |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
main.go'sbuildRegistry()was switched to OCI-only: it now requires theOCI_REGISTRYenv var (errors.New("OCI_REGISTRY must be set")when empty) and no longer readsEPOCH_URL. But the kustomize manager Deployment still set the removedEPOCH_URLenv and never setOCI_REGISTRY, so any fresh install (kubectl apply -k config/default/) started an operator that immediately fatals.Stale:
config/manager/deployment.yaml:32—EPOCH_URLenv pointing athttp://epoch.cocoon-system.svc:8080. It was the only lingering epoch reference inconfig/.Fix
config/manager/deployment.yaml:EPOCH_URLenv.OCI_REGISTRY=asia-southeast1-docker.pkg.dev/simular-note/cocoon-artifacts.roles/artifactregistry.writer, needed byHasManifest/DeleteManifest): agcp-ar-writer-keyvolume from Secretcocoon-ar-writer-key, a read-only mount at/var/run/secrets/gcp, andGOOGLE_APPLICATION_CREDENTIALS=/var/run/secrets/gcp/key.json.google.Keychainresolves this via ADC.The Secret is created out-of-band at deploy time; no key material is committed.
Proof
kubectl kustomize config/default/renders cleanly withOCI_REGISTRY+GOOGLE_APPLICATION_CREDENTIALS+ the secret volume/mount, and zero epoch references (grep -ic epochon the full render →0).