Skip to content

Commit 2fccfe8

Browse files
authored
Update for Ignition 8.3.3 (#4)
* fix: correct application of supplemental pod labels * fix: Update redundant health check accepted states * fix: correct usage info on redundant health check * feat: add PR workflow artifacting * chore: bump helm-unittest plugin to 1.0.3 * chore: bump appVersion to 8.3.3 Fixes IGN-14665
1 parent 44df0b6 commit 2fccfe8

7 files changed

Lines changed: 82 additions & 17 deletions

File tree

.github/workflows/pull-request.yml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ defaults:
99

1010
env:
1111
CT_CHART_DIRS: "."
12+
CHART_NAME: "ignition"
1213

1314
jobs:
1415
lint-and-unittest:
@@ -28,16 +29,40 @@ jobs:
2829
2930
- name: Install helm-unittest plugin
3031
run: |
31-
helm plugin install https://github.com/helm-unittest/helm-unittest --version v1.0.0
32+
helm plugin install https://github.com/helm-unittest/helm-unittest --version v1.0.3
3233
helm plugin list
3334
3435
- name: helm-unittest (all changed charts)
3536
run: |
36-
helm unittest ignition
37+
helm unittest "${CHART_NAME}"
3738
3839
- name: Set up chart-testing
3940
uses: helm/chart-testing-action@v2
4041

4142
- name: ct lint
4243
run: |
4344
ct lint --all
45+
46+
- name: Package Helm Chart (unsigned)
47+
run: |
48+
mkdir build
49+
helm package --destination build "${CHART_NAME}"
50+
51+
- name: Render simple summary with GH hash to build/SUMMARY.md
52+
run: |
53+
cat << EOF > build/SUMMARY.md
54+
# Build Summary
55+
56+
- Chart: ${CHART_NAME}
57+
- Build Date: $(date -u +"%Y-%m-%dT%H:%M:%SZ")
58+
- Commit: ${GITHUB_SHA}
59+
- Pull Request: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/pull/${{ github.event.pull_request.number }}
60+
- Workflow Run: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}
61+
EOF
62+
63+
- name: Artifact Packaged Chart
64+
uses: actions/upload-artifact@v6
65+
with:
66+
name: chart-build
67+
path: build/
68+
retention-days: 30

.github/workflows/release-branch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424

2525
- name: Install helm-unittest plugin
2626
run: |
27-
helm plugin install https://github.com/helm-unittest/helm-unittest --version v1.0.0
27+
helm plugin install https://github.com/helm-unittest/helm-unittest --version v1.0.3
2828
helm plugin list
2929
3030
- name: Set up chart-testing

ignition/CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [Unreleased]
9+
10+
### Fixed
11+
12+
- Fixed an issue where `podLabels` were incorrectly applied to StatefulSet metadata instead of pod metadata.
13+
14+
### Changed
15+
16+
- Bumped _appVersion_ for Ignition to 8.3.3.
17+
- Modified the redundant health check script to accept some additional states to facilitate better automated upgrades.
18+
819
## [0.2.0] - 2025-09-15
920

1021
⚠️ **WARNING:** Possible breaking changes related to Ingress and certificate generation. Please apply extra consideration to these areas while testing upgrades to this version of the chart.

ignition/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ apiVersion: v2
22
name: ignition
33
description: Ignition by Inductive Automation
44
type: application
5-
version: 0.2.0
6-
appVersion: "8.3.0"
5+
version: 0.2.1
6+
appVersion: "8.3.3"
77
kubeVersion: ">= 1.29.0-0"
88
home: https://www.inductiveautomation.com
99
maintainers:

ignition/scripts/redundant-health-check.sh

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ port=${GATEWAY_HTTP_PORT:-8088}
1212
status_endpoint="http://localhost:${port}/system/gwinfo"
1313
timeout_secs=3
1414
expected_context_state=RUNNING
15-
expected_redundant_state=Good
15+
expected_redundant_states=(Good OutOfDate Incompatible)
1616

1717
###############################################################################
1818
# Invoke a Redundancy-aware Health Check
@@ -23,7 +23,7 @@ function main() {
2323
exit 1
2424
fi
2525

26-
debug "Status endpoint: ${status_endpoint}, expecting context state: ${expected_context_state}, expecting redundant state: ${expected_redundant_state}, timeout: ${timeout_secs}."
26+
debug "Status endpoint: ${status_endpoint}, expecting context state: ${expected_context_state}, expecting redundant states: [${expected_redundant_states[*]}], timeout: ${timeout_secs}."
2727

2828
curl_output=$(curl -s --max-time "${timeout_secs}" -L -k -f "${status_endpoint}" 2>&1)
2929

@@ -43,17 +43,32 @@ function main() {
4343
echo "FAILED: ContextStatus is ${gwinfo_fields[ContextStatus]}, expected ${expected_context_state}" >&2
4444
exit 1
4545
fi
46-
elif [ "${gwinfo_fields[RedundantState]}" != "${expected_redundant_state}" ]; then
46+
elif ! validate_redundant_state "${gwinfo_fields[RedundantState]}"; then
4747
# Check RedundantNodeActiveStatus field
4848
if [ "${gwinfo_fields[RedundantNodeActiveStatus]}" != "Active" ]; then
49-
echo "FAILED: Not Active and RedundantState is ${gwinfo_fields[RedundantState]}, expected ${expected_redundant_state}" >&2
49+
echo "FAILED: Not Active and RedundantState is ${gwinfo_fields[RedundantState]}, expected one of: [${expected_redundant_states[*]}]" >&2
5050
exit 1
5151
fi
5252
fi
5353
debug "SUCCESS"
5454
exit 0
5555
}
5656

57+
###############################################################################
58+
# Validate redundant state against expected states
59+
###############################################################################
60+
function validate_redundant_state() {
61+
local actual_state="$1"
62+
63+
for expected_state in "${expected_redundant_states[@]}"; do
64+
if [ "${actual_state,,}" = "${expected_state,,}" ]; then
65+
return 0
66+
fi
67+
done
68+
69+
return 1
70+
}
71+
5772
###############################################################################
5873
# Outputs to stderr
5974
###############################################################################
@@ -70,23 +85,29 @@ function debug() {
7085
function usage() {
7186
# usage redundant-health-check.sh
7287
>&2 echo "Usage: $0 [flags] STATUS_ENDPOINT"
73-
>&2 echo "Example: ./redundant-health-check.sh -r Good -s RUNNING http://localhost:8088/system/gwinfo"
88+
>&2 echo "Example: ./redundant-health-check.sh -s RUNNING http://localhost:8088/system/gwinfo"
7489
>&2 echo "Flags:"
75-
>&2 echo " -r <state> - Expected redundant state (default: Good)"
76-
>&2 echo " -s <path/to/gan/secret> - The path to the mounted secret containing the webserver TLS certs/keystore (default: ${WEB_TLS_SECRETS_DIR})"
77-
>&2 echo " -d <path/to/data/folder> - The path to the Ignition data folder (default: ${IGNITION_DATA_DIR})"
90+
>&2 echo " -r <state> - Expected redundant state (can be specified multiple times, defaults to 'Good', 'OutOfDate', and 'Incompatible' when omitted)"
91+
>&2 echo " -s <state> - Expected context state, defaults to 'RUNNING'"
92+
>&2 echo " -t <seconds> - Timeout in seconds for the health check request, defaults to 3 seconds"
7893
>&2 echo " -h - Print this help message"
7994
>&2 echo " -v - Enable verbose output"
8095
}
8196

8297
# Argument Processing
98+
first_expected_state=true
8399
while getopts ":hvr:s:t:" opt; do
84100
case "$opt" in
85101
v)
86102
verbose=1
87103
;;
88104
r)
89-
expected_redundant_state=${OPTARG}
105+
# If this is the first -r argument, clear the default and start fresh
106+
if [ "${first_expected_state}" = true ]; then
107+
expected_redundant_states=()
108+
first_expected_state=false
109+
fi
110+
expected_redundant_states+=("${OPTARG}")
90111
;;
91112
s)
92113
expected_context_state=${OPTARG}

ignition/templates/statefulset.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ metadata:
55
name: {{ template "ignition.fullname" . }}-gateway
66
labels:
77
{{- include "ignition.labels" . | nindent 4 }}
8-
{{- with .Values.podLabels }}
9-
{{- toYaml . | nindent 4 }}
10-
{{- end }}
118
annotations:
129
checksum/config: {{ $configChecksum }}
1310
spec:
@@ -28,6 +25,9 @@ spec:
2825
metadata:
2926
labels:
3027
{{- include "ignition.labels" . | nindent 8 }}
28+
{{- with .Values.podLabels }}
29+
{{- toYaml . | nindent 8 }}
30+
{{- end }}
3131
annotations:
3232
checksum/config: {{ $configChecksum }}
3333
{{- with .Values.podAnnotations }}

ignition/tests/statefulset_test.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,14 @@ tests:
132132
app.kubernetes.io/instance: ignition
133133
app.kubernetes.io/version: "8.3.0"
134134
helm.sh/chart: ignition-0.1.0
135+
- isSubset:
136+
path: spec.template.metadata.labels
137+
content:
138+
app.kubernetes.io/name: foo
139+
app.kubernetes.io/managed-by: Helm
140+
app.kubernetes.io/instance: ignition
141+
app.kubernetes.io/version: "8.3.0"
142+
helm.sh/chart: ignition-0.1.0
135143
foo: bar
136144
bar: baz
137145
# Verify Pod AntiAffinity is applied correctly

0 commit comments

Comments
 (0)