Skip to content

Commit f9a9964

Browse files
committed
fix(helm): declare naming overrides in the strict schema; SHA-pin CI actions
- nameOverride/fullnameOverride are consumed by sim.name/sim.fullname but were never in values.yaml, so root additionalProperties: false rejected Helm's standard naming overrides — both now declared (a helper-wide sweep confirmed they were the only template-read keys missing), with a smoke regression test that installs under the strict schema and asserts the override lands in resource names - CI supply-chain hardening: checkout/setup-helm/kind-action pinned to full commit SHAs (tag comments retained) and the kubeconform archive verified against its published sha256
1 parent 065e389 commit f9a9964

3 files changed

Lines changed: 25 additions & 6 deletions

File tree

.github/workflows/helm.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ jobs:
2525
runs-on: ${{ (vars.CI_PROVIDER == '' || vars.CI_PROVIDER == 'blacksmith') && 'blacksmith-2vcpu-ubuntu-2404' || 'ubuntu-latest' }}
2626
timeout-minutes: 15
2727
steps:
28-
- uses: actions/checkout@v4
28+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
2929

3030
- name: Set up Helm
31-
uses: azure/setup-helm@v4
31+
uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4
3232
with:
3333
version: v3.16.4
3434

@@ -44,6 +44,7 @@ jobs:
4444
run: |
4545
curl -sSL -o /tmp/kubeconform.tar.gz \
4646
https://github.com/yannh/kubeconform/releases/download/v0.6.7/kubeconform-linux-amd64.tar.gz
47+
echo "95f14e87aa28c09d5941f11bd024c1d02fdc0303ccaa23f61cef67bc92619d73 /tmp/kubeconform.tar.gz" | sha256sum -c -
4748
tar -xzf /tmp/kubeconform.tar.gz -C /tmp kubeconform
4849
4950
- name: Render and validate manifests (default configuration)
@@ -91,7 +92,7 @@ jobs:
9192
runs-on: ${{ (vars.CI_PROVIDER == '' || vars.CI_PROVIDER == 'blacksmith') && 'blacksmith-2vcpu-ubuntu-2404' || 'ubuntu-latest' }}
9293
timeout-minutes: 5
9394
steps:
94-
- uses: actions/checkout@v4
95+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
9596
with:
9697
fetch-depth: 0
9798
- name: Require a Chart.yaml version bump when chart content changes
@@ -117,15 +118,15 @@ jobs:
117118
runs-on: ${{ (vars.CI_PROVIDER == '' || vars.CI_PROVIDER == 'blacksmith') && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }}
118119
timeout-minutes: 25
119120
steps:
120-
- uses: actions/checkout@v4
121+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
121122

122123
- name: Set up Helm
123-
uses: azure/setup-helm@v4
124+
uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4
124125
with:
125126
version: v3.16.4
126127

127128
- name: Create kind cluster
128-
uses: helm/kind-action@v1
129+
uses: helm/kind-action@ef37e7f390d99f746eb8b610417061a60e82a6cc # v1
129130
with:
130131
version: v0.24.0
131132

helm/sim/tests/smoke_test.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,13 @@ tests:
3333
asserts:
3434
- isKind: { of: Secret }
3535
- equal: { path: metadata.name, value: t-sim-app-secrets }
36+
37+
- it: accepts the standard Helm naming overrides under the strict schema
38+
set:
39+
nameOverride: acme
40+
fullnameOverride: acme-sim
41+
asserts:
42+
- matchRegex:
43+
path: metadata.name
44+
pattern: "^acme-sim"
45+
template: deployment-app.yaml

helm/sim/values.schema.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,6 +1191,14 @@
11911191
}
11921192
}
11931193
},
1194+
"nameOverride": {
1195+
"type": "string",
1196+
"description": "Override the chart name used in resource names"
1197+
},
1198+
"fullnameOverride": {
1199+
"type": "string",
1200+
"description": "Override the fully qualified release name used in resource names"
1201+
},
11941202
"affinity": {
11951203
"type": "object",
11961204
"description": "Pod affinity/anti-affinity rules applied to app and realtime pods"

0 commit comments

Comments
 (0)