test: guard 3rd-party image-override pull-secret contract in integration deploys#6450
Closed
eamonnmoloney wants to merge 1 commit into
Closed
test: guard 3rd-party image-override pull-secret contract in integration deploys#6450eamonnmoloney wants to merge 1 commit into
eamonnmoloney wants to merge 1 commit into
Conversation
…ion deploys The reusable integration-test workflow is called by downstream repos (camunda/camunda, camunda/connectors, camunda/identity, the web-modeler repo) which override component images to registry.camunda.cloud builds. Such an image is only pullable if the component resolves an imagePullSecret containing registry-camunda-cloud. Helm resolves component pull secrets as "component-level image.pullSecrets if set, else global.image.pullSecrets" (component-level replaces global, it is not merged), so any caller-overridable component without that secret hits ImagePullBackOff — as connectors recently did. - Add registry-camunda-cloud to global.image.pullSecrets in each active version's chart-full-setup/values/base.yaml so every caller-overridable component is covered by default. - Add TestThirdPartyImageOverrideHasPullSecret (matrix package, run by make go.test): for each active version, assert every component in base-image-tags.yaml resolves a pull-secret set containing registry-camunda-cloud. Driven by chart-versions.yaml + base-image-tags.yaml so new versions and newly-overridable components are covered automatically. - Document the contract in .github/AGENTS.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
04dd3c3 to
7c83d6f
Compare
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.
Which problem does the PR fix?
This repo's reusable integration-test workflow (
test-integration-template.yaml/test-integration-runner.yaml) is invoked by 3rd-party callers (camunda/camunda,camunda/connectors,camunda/identity, the web-modeler repo, …) that override component images toregistry.camunda.cloudbuilds. A change here can silently break those callers — most recently connectors hitImagePullBackOffbecause its overridden image had no matching pull secret.There was no guard preventing this class of breakage from shipping before a downstream repo consumed the chart.
What's in this PR?
A general deploy-behaviour contract guard (not specific to the connectors bug):
The contract. Helm resolves a component's pull secrets as "component-level
image.pullSecretsif set, elseglobal.image.pullSecrets" — component-level replaces global, it is not merged (templates/common/_helpers.tpl:camundaPlatform.imagePullSecrets/subChartImagePullSecrets). So every component a caller can repoint to the private registry (the top-level keys ofbase-image-tags.yaml) must resolve a pull-secret set containingregistry-camunda-cloud.Fix. Add
registry-camunda-cloudtoglobal.image.pullSecretsin each active version'schart-full-setup/values/base.yaml, so every current and future caller-overridable component is covered by default.Guard.
TestThirdPartyImageOverrideHasPullSecret(inscripts/deploy-camunda/matrix/, run bymake go.test) walks every active chart version, reads the caller-overridable component set frombase-image-tags.yaml, replays the Helm pull-secret resolution against the mergedchart-full-setupvalues, and fails if any component would not getregistry-camunda-cloud. It is driven bychart-versions.yaml+base-image-tags.yaml, so new versions and newly-overridable components are covered automatically. Accompanying unit tests pin the resolution/merge logic.Docs. The contract is documented in
.github/AGENTS.md(Layered Values System section).Verified locally:
go test ./matrix/(full matrix suite incl. the new guard) passes;gofmtclean; Apache header present. The guard was confirmed to fail when the secret is removed (resolution unit test covers the missing-secret case).This generalizes the connectors-specific fix in #6449 — with
global.image.pullSecretscovering all components, no per-component entry is required, though existing explicit ones (webModeler, connectors) remain valid.Checklist
Before opening the PR:
make go.update-golden-only.After opening the PR: