mirror of
https://github.com/pgsty/minio.git
synced 2026-12-03 12:26:39 +03:00
fix(helm): use node health endpoints and preserve probe upgrade defaults
Share the built-in and custom probe rendering across both server workloads. Check live during startup and for restarts, and ready for Service traffic. Set the transport from the server TLS setting and target its API port. An older release can supply none of the new defaults during --reuse-values. Omit inactive probes and supply the timing defaults when just an enabled flag is set. Cover both values paths and custom overrides in the Helm migration check. Refs #288, #283. Signed-off-by: Feng Ruohang <rh@vonng.com>
This commit is contained in:
@@ -30,3 +30,9 @@ oidc:
|
||||
imagePullSecrets:
|
||||
- name: primary-pull
|
||||
- name: '{{ .Release.Name }}-pull'
|
||||
startupProbe:
|
||||
enabled: true
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
readinessProbe:
|
||||
enabled: true
|
||||
|
||||
@@ -55,14 +55,23 @@ helm_run lint "${new_chart}"
|
||||
helm_run template silo "${new_chart}" \
|
||||
--namespace silo \
|
||||
--set rootUser=silo-admin \
|
||||
--set rootPassword=test-password-123456 >/dev/null
|
||||
--set rootPassword=test-password-123456 >"${work_dir}/default-distributed.yaml"
|
||||
helm_run template silo "${new_chart}" \
|
||||
--namespace silo \
|
||||
--set mode=standalone \
|
||||
--set replicas=1 \
|
||||
--set persistence.enabled=false \
|
||||
--set rootUser=silo-admin \
|
||||
--set rootPassword=test-password-123456 >/dev/null
|
||||
--set rootPassword=test-password-123456 >"${work_dir}/default-standalone.yaml"
|
||||
if grep -Eq '^[[:space:]]+(liveness|readiness|startup)Probe:' "${work_dir}"/default-*.yaml; then
|
||||
echo "default workload unexpectedly enables a server probe" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# --reuse-values renders new templates with the old release's coalesced defaults.
|
||||
# Passing -f old/values.yaml alone would fill missing keys with new defaults.
|
||||
cp -R helm/silo "${work_dir}/reuse"
|
||||
git show RELEASE.2026-11-12T00-00-00Z:helm/silo/values.yaml >"${work_dir}/reuse/values.yaml"
|
||||
|
||||
# Exercise the persisted standalone PVC, optional legacy values, and OIDC in both workloads.
|
||||
cp buildscripts/helm-migration-guard/testdata/optional-values.yaml "${work_dir}/optional-values.yaml"
|
||||
@@ -72,6 +81,12 @@ for mode in standalone distributed; do
|
||||
-f "${output_dir}/optional-values.yaml" --set "mode=${mode}" >"${render}"
|
||||
expect_rendered "${render}" \
|
||||
'createBucket chart-test "none" false "" false' \
|
||||
'startupProbe:' 'livenessProbe:' 'readinessProbe:' \
|
||||
'path: /minio/health/live' \
|
||||
'path: /minio/health/ready' \
|
||||
'scheme: HTTPS' \
|
||||
'periodSeconds: 30' \
|
||||
'failureThreshold: 60' \
|
||||
'name: "chart-oidc"' \
|
||||
'key: "discovery"' \
|
||||
'value: "https://console.example.test/oauth_callback"' \
|
||||
@@ -80,6 +95,20 @@ for mode in standalone distributed; do
|
||||
echo "${mode} sets a browser redirect without a configured URL" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
render="${work_dir}/${mode}-reuse.yaml"
|
||||
helm_run template silo-reuse "${output_dir}/reuse" --is-upgrade \
|
||||
--set "mode=${mode}" --set minioAPIPort=9443 \
|
||||
--set readinessProbe.enabled=true,startupProbe.enabled=true \
|
||||
--set customStartupProbe.tcpSocket.port=9444 >"${render}"
|
||||
expect_rendered "${render}" \
|
||||
'path: /minio/health/ready' 'port: 9443' 'scheme: HTTP' \
|
||||
'periodSeconds: 15' 'failureThreshold: 3' 'timeoutSeconds: 5' \
|
||||
'startupProbe:' 'tcpSocket:' 'port: 9444'
|
||||
if grep -Eq 'livenessProbe:|path: /minio/health/live' "${render}"; then
|
||||
echo "${mode} rendered a disabled or overridden built-in probe" >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# Existing values commonly address the historical myminio target. Render the
|
||||
|
||||
Reference in New Issue
Block a user