Skip to content

Commit 4d9f82a

Browse files
browcodex
andcommitted
release: push gateway chart 0.2.0
Signed-off-by: Tom Brow <[email protected]> Co-authored-by: Codex <[email protected]> Ai-assisted: true
1 parent bd98628 commit 4d9f82a

5 files changed

Lines changed: 32 additions & 9 deletions

File tree

‎deploy/charts/buzz-push-gateway/Chart.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ apiVersion: v2
33
# branches (see docs/push-gateway-deployment.md, "Gateway chart release").
44
name: buzz-push-gateway
55
description: Public capability-gated APNs last-hop gateway for Buzz
6-
version: 0.1.0
7-
appVersion: "0.1.0"
6+
version: 0.2.0
7+
appVersion: "0.2.0"
88
type: application

‎deploy/charts/buzz-push-gateway/tests/release-contract.sh‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,17 @@ set -euo pipefail
33
env -u GEM_HOME -u GEM_PATH -u RUBYLIB -u RUBYOPT ruby -ryaml <<'RUBY'
44
auto_text = File.read('.github/workflows/auto-tag-on-release-pr-merge.yml')
55
publish_text = File.read('.github/workflows/push-gateway-helm-chart.yml')
6+
chart = YAML.load_file('deploy/charts/buzz-push-gateway/Chart.yaml')
7+
production = YAML.load_file('deploy/charts/buzz-push-gateway/values-production.yaml')
68
# Parse first, then pin the tag producer and consumer strings whose agreement
79
# makes this a reachable lane rather than an orphan publisher.
810
YAML.load(auto_text)
911
YAML.load(publish_text)
12+
version = chart.fetch('version').to_s
13+
raise "gateway chart version is not semver: #{version}" unless version.match?(/\A\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?\z/)
14+
raise "gateway chart version/appVersion drift" unless chart.fetch('appVersion').to_s == version
15+
digest = production.dig('image', 'digest').to_s
16+
raise "production image digest is not immutable: #{digest}" unless digest.match?(/\Asha256:[0-9a-f]{64}\z/)
1017
[
1118
'push-chart-release/*)',
1219
'VERSION="${BRANCH#push-chart-release/}"',

‎deploy/charts/buzz-push-gateway/tests/render.sh‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ helm template push deploy/charts/buzz-push-gateway >"$out"
1010
# HTTPRoute. The environment-owned inputs remain mandatory.
1111
production_args=(
1212
-f deploy/charts/buzz-push-gateway/values-production.yaml
13-
--set 'image.digest=sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
1413
--set 'profiles.dogfood.appAttestAppId=REALTEAM.xyz.block.buzz.dogfood.mobile'
1514
--set 'networkPolicy.postgresEgressCidrs[0]=10.42.0.0/16'
1615
)
@@ -95,6 +94,12 @@ ingress_ports = np.dig("spec", "ingress")
9594
assert!(ingress_ports == Set[8080], ingress_ports.inspect)
9695
production = YAML.load_stream(File.read(ARGV[1])).compact
9796
assert!(!production.any? { |x| x["kind"] == "HTTPRoute" })
97+
production_values = YAML.load_file("deploy/charts/buzz-push-gateway/values-production.yaml")
98+
reviewed_digest = production_values.dig("image", "digest")
99+
assert!(reviewed_digest.match?(/\Asha256:[0-9a-f]{64}\z/), reviewed_digest.inspect)
100+
production_deployment = production.find { |x| x["kind"] == "Deployment" }
101+
production_image = production_deployment.dig("spec", "template", "spec", "containers", 0, "image")
102+
assert!(production_image == "ghcr.io/block/buzz-push-gateway@#{reviewed_digest}", production_image.inspect)
98103
route = YAML.load_stream(File.read(ARGV[2])).compact.find { |x| x["kind"] == "HTTPRoute" }
99104
assert!(!route.dig("spec", "parentRefs").empty?)
100105
assert!(route.dig("spec", "hostnames").include?("push.buzz.xyz"))
@@ -116,7 +121,7 @@ if helm template push deploy/charts/buzz-push-gateway --set httpRoute.enabled=tr
116121
fi
117122

118123
# The checked-in production contract is intentionally undeployable until CI or
119-
# the release system supplies an immutable digest and environment-owned values.
124+
# the release system supplies its environment-owned values.
120125
if helm template push deploy/charts/buzz-push-gateway -f deploy/charts/buzz-push-gateway/values-production.yaml >/dev/null 2>&1; then
121126
echo 'expected uninjected production values to fail' >&2
122127
exit 1

‎deploy/charts/buzz-push-gateway/values-production.yaml‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
# Required environment-owned values are deliberately invalid/empty here. A
2-
# production renderer must inject all of them; CI proves omission fails.
1+
# The immutable gateway image was reviewed from the successful multi-arch main
2+
# build at source 4a9de1a3a121285ef475d630b2b5764044c02cde. Its SLSA
3+
# provenance was verified against block/buzz/.github/workflows/docker.yml.
34
image:
45
tag: ""
5-
digest: ""
6+
digest: sha256:3936cad2d5cb0f6711c749024b96e56969d7e4506eb35d3519e3ef126fa6636d
7+
# Environment-owned values remain deliberately invalid/empty. A production
8+
# renderer must inject all of them; CI proves omission fails.
69
profiles:
710
dogfood:
811
appAttestAppId: ""

‎docs/push-gateway-deployment.md‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,12 @@ The chart defaults to the `main` image tag because `.github/workflows/docker.yml
219219
```bash
220220
gh attestation verify \
221221
oci://ghcr.io/block/buzz-push-gateway@sha256:<64-lowercase-hex> \
222-
--owner block
222+
--repo block/buzz \
223+
--signer-workflow block/buzz/.github/workflows/docker.yml \
224+
--source-digest <40-lowercase-hex-source-commit>
223225
```
224226

225-
Only after that command succeeds, set the exact digest as `image.digest`; the chart then renders `ghcr.io/block/buzz-push-gateway@sha256:...` and ignores the mutable tag. `values-production.yaml` is an intentionally invalid production-input contract: deployment CI must inject this verified `image.digest`, the provisioned dogfood Apple application identifier, and the actual PostgreSQL network. In an environment with an existing ingress or service mesh route, keep `httpRoute.enabled=false`. If this chart owns a Gateway API route, enable it and inject an environment-owned `parentRef`; schema validation rejects an enabled route with no parent. The render guard proves both rejection of missing required inputs and fully injected renders.
227+
Only after that command succeeds, record the exact digest as `image.digest`; the chart then renders `ghcr.io/block/buzz-push-gateway@sha256:...` and ignores the mutable tag. The `0.2.0` production values pin `sha256:3936cad2d5cb0f6711c749024b96e56969d7e4506eb35d3519e3ef126fa6636d`, the amd64/arm64 index built from `4a9de1a3a121285ef475d630b2b5764044c02cde` by the successful [main image workflow](https://github.com/block/buzz/actions/runs/33457946099). Its SLSA provenance was verified against `block/buzz/.github/workflows/docker.yml` and that source digest. `values-production.yaml` remains an intentionally invalid production-input contract: deployment CI must inject the provisioned dogfood Apple application identifier and the actual PostgreSQL network. In an environment with an existing ingress or service mesh route, keep `httpRoute.enabled=false`. If this chart owns a Gateway API route, enable it and inject an environment-owned `parentRef`; schema validation rejects an enabled route with no parent. The render guard proves both rejection of missing required inputs and fully injected renders.
226228

227229
Network policy keeps APNs HTTPS and PostgreSQL egress in separate CIDR lists. APNs currently requires broad TCP/443 reachability; `networkPolicy.postgresEgressCidrs` must be narrowed to the production database network, and the DNS namespace/pod selectors must match the cluster DNS deployment. The sample private CIDR is not a claim about the production topology.
228230

@@ -250,3 +252,9 @@ version. The publisher verifies the checked-out commit is the tag target and the
250252
chart version equals `X.Y.Z` before pushing
251253
`oci://ghcr.io/block/buzz/charts/buzz-push-gateway`. A manually pushed
252254
`push-chart-vX.Y.Z` tag is the documented rescue path and runs the same checks.
255+
After the publisher succeeds, verify the immutable chart artifact before use:
256+
257+
```bash
258+
helm show chart oci://ghcr.io/block/buzz/charts/buzz-push-gateway --version X.Y.Z
259+
helm pull oci://ghcr.io/block/buzz/charts/buzz-push-gateway --version X.Y.Z
260+
```

0 commit comments

Comments
 (0)