-
Notifications
You must be signed in to change notification settings - Fork 50
fix(release): pin AuthBridge injection images + guard against :latest (#508) #512
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -103,6 +103,18 @@ jobs: | |
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Guard — injected AuthBridge images must be version-pinned (no floating tags) | ||
| # release.yml pins the controller-manager image (below) but NOT the cortex-built | ||
| # AuthBridge injection images; they were shipping at :latest (rossoctl/rossoctl#508). | ||
| # Fail the release if any is a floating tag so it can never regress silently. | ||
| run: | | ||
| cd ${{ env.CHARTS_PATH }}/operator | ||
| if grep -nE 'ghcr\.io/rossoctl/cortex/[a-z-]+:(latest|main|master)([^0-9a-zA-Z.-]|$)' values.yaml; then | ||
|
Member
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. Deny-list of 3 tag names + hardcoded registry path. These all pass the guard:
Positive assertion is strictly tighter, and for k in envoyProxy authbridge authbridgeLite proxyInit; do
img=$(yq ".defaults.images.$k" values.yaml)
[[ "$img" =~ :v[0-9]+\.[0-9]+\.[0-9]+ ]] || { echo "::error::defaults.images.$k not version-pinned: $img"; exit 1; }
doneKeys the check on the 4 values that matter instead of on the registry string. |
||
| echo "::error::injected AuthBridge image(s) pinned to a floating tag — pin to a cortex release tag before releasing (rossoctl/rossoctl#508)" | ||
| exit 1 | ||
| fi | ||
| echo "AuthBridge injected images are version-pinned OK" | ||
|
|
||
| - name: Package and push Helm chart | ||
| run: | | ||
| chartVersion=$(echo "${{ github.ref_name }}" | cut -c 2-) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -246,10 +246,10 @@ featureGates: | |
| # proxy-sidecar / lite mode (always-on enforce-redirect egress capture). | ||
| defaults: | ||
| images: | ||
| envoyProxy: ghcr.io/rossoctl/cortex/authbridge-envoy:latest | ||
| authbridge: ghcr.io/rossoctl/cortex/authbridge:latest | ||
| authbridgeLite: ghcr.io/rossoctl/cortex/authbridge-lite:latest | ||
| proxyInit: ghcr.io/rossoctl/cortex/proxy-init:latest | ||
| envoyProxy: ghcr.io/rossoctl/cortex/authbridge-envoy:v0.7.0-alpha.3 | ||
|
Member
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. Chart layer pinned, compiled fallback not:
Related: |
||
| authbridge: ghcr.io/rossoctl/cortex/authbridge:v0.7.0-alpha.3 | ||
| authbridgeLite: ghcr.io/rossoctl/cortex/authbridge-lite:v0.7.0-alpha.3 | ||
| proxyInit: ghcr.io/rossoctl/cortex/proxy-init:v0.7.0-alpha.3 | ||
| pullPolicy: IfNotPresent | ||
|
|
||
| # Proxy settings | ||
|
|
||
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.
Guard sits in the
releasejob, which isneeds: build-and-push+if: ref_type == 'tag'. By the time it fails,kagenti-operatorandagentcard-signerare already built and pushed to ghcr with the release tag — half-published release (images out, chart not), manual cleanup.Two cheaper spots: a pre-flight job that
build-and-pushdepends on, or theHelm Chart Lintjob insecurity-scans.yamlwhich runs on every PR — then a:latestregression is caught at review time, not mid-release.