Compare commits

...

6 Commits

Author SHA1 Message Date
Feng Ruohang b7fc202ad9 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>
2026-12-03 16:43:59 +08:00
HaveFun83 70211f30ba add option to enable kubernetes probes
(cherry picked from commit 9650175a68)

Signed-off-by: HaveFun83 <38665716+HaveFun83@users.noreply.github.com>
Signed-off-by: Feng Ruohang <rh@vonng.com>
2026-12-03 16:30:58 +08:00
Feng Ruohang 0bc486be2e Merge pull request #357 from pgsty/codex/helm-7.1-upgrade
fix(helm): preserve upgrade values and validate chart publication
2026-12-03 16:26:04 +08:00
Feng Ruohang 11682b125d Merge pull request #362 from pgsty/codex/go-deps-20261125
Refresh server Go dependencies and embed the updated Console
2026-11-25 20:48:11 +08:00
Feng Ruohang a8e5cc4c13 Merge the updated #351 branch into the Helm follow-up
Signed-off-by: Feng Ruohang <rh@vonng.com>
2026-11-25 12:06:00 +08:00
Feng Ruohang 7226aaf3fc fix(helm): preserve upgrade values and validate chart publication
Signed-off-by: Feng Ruohang <rh@vonng.com>
2026-11-25 11:35:05 +08:00
19 changed files with 379 additions and 175 deletions
+23 -9
View File
@@ -3,7 +3,7 @@ name: Publish Helm Chart to GHCR
on: on:
push: push:
tags: tags:
- "chart-.*" - "chart-*"
permissions: permissions:
contents: read contents: read
@@ -14,18 +14,32 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v7 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Install Helm - name: Install Helm
uses: azure/setup-helm@v4 uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4
with:
version: v4.3.2
- name: Validate tag and package chart
run: |
set -euo pipefail
version="$(helm show chart helm/silo | sed -n 's/^version: //p')"
if [[ -z "$version" || "$GITHUB_REF_NAME" != "chart-$version" ]]; then
echo "Expected chart-$version for helm/silo, got $GITHUB_REF_NAME" >&2
exit 1
fi
helm lint helm/silo
helm package helm/silo --destination "$RUNNER_TEMP"
- name: Log in to GitHub Container Registry - name: Log in to GitHub Container Registry
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: | run: |
echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ghcr.io \ printf '%s' "$GH_TOKEN" | helm registry login ghcr.io \
--username ${{ github.actor }} \ --username "$GITHUB_ACTOR" --password-stdin
--password-stdin
- name: Package and Push Helm Chart - name: Push chart
run: | run: |
helm package helm/silo helm push "$RUNNER_TEMP/silo-${GITHUB_REF_NAME#chart-}.tgz" \
helm push silo-*.tgz oci://ghcr.io/${{ github.repository_owner }}/charts "oci://ghcr.io/${GITHUB_REPOSITORY_OWNER,,}/charts"
+1
View File
@@ -37,6 +37,7 @@ on:
- "buildscripts/rebrand-guard/**" - "buildscripts/rebrand-guard/**"
- "buildscripts/gen-ldflags.go" - "buildscripts/gen-ldflags.go"
- ".github/workflows/release.yml" - ".github/workflows/release.yml"
- ".github/workflows/release-helm.yml"
- ".github/workflows/docker-release.yml" - ".github/workflows/docker-release.yml"
- ".github/workflows/finalize-release.yml" - ".github/workflows/finalize-release.yml"
- ".github/workflows/test-release.yml" - ".github/workflows/test-release.yml"
@@ -0,0 +1,38 @@
rootUser: silo-admin
rootPassword: 'literal-{{ .Release.Name }}'
buckets:
- name: chart-test
tls:
enabled: true
certSecret: silo-tls
trustedCertsSecret: silo-trusted-ca
ingress:
enabled: true
tls:
- hosts: [s3.example.test]
consoleIngress:
enabled: true
tls:
- hosts: [console.example.test]
networkPolicy:
enabled: true
podDisruptionBudget:
enabled: true
metrics:
serviceMonitor:
enabled: true
includeNode: true
oidc:
enabled: true
existingConfigMapName: chart-oidc
existingConfigUrlKey: discovery
redirectUri: https://console.example.test/oauth_callback
imagePullSecrets:
- name: primary-pull
- name: '{{ .Release.Name }}-pull'
startupProbe:
enabled: true
livenessProbe:
enabled: true
readinessProbe:
enabled: true
@@ -0,0 +1,7 @@
apiVersion: v2
name: consumer
version: 0.1.0
dependencies:
- name: silo
alias: objects
version: "*"
@@ -0,0 +1,6 @@
global:
storageClass: site-storage
bucketSuffix: archive
objects:
buckets:
- name: '{{ .Release.Name }}-{{ .Values.global.bucketSuffix }}'
+71 -26
View File
@@ -40,36 +40,76 @@ else
} }
fi fi
expect_rendered() {
local render="$1" expected
shift
for expected in "$@"; do
grep -F -- "${expected}" "${render}" >/dev/null || {
echo "${render} is missing: ${expected}" >&2
exit 1
}
done
}
helm_run lint "${new_chart}" helm_run lint "${new_chart}"
helm_run template silo "${new_chart}" \ helm_run template silo "${new_chart}" \
--namespace silo \ --namespace silo \
--set rootUser=silo-admin \ --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}" \ helm_run template silo "${new_chart}" \
--namespace silo \ --namespace silo \
--set mode=standalone \ --set mode=standalone \
--set replicas=1 \ --set replicas=1 \
--set persistence.enabled=false \ --set persistence.enabled=false \
--set rootUser=silo-admin \ --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
# Exercise optional templates that the default render leaves dormant. # --reuse-values renders new templates with the old release's coalesced defaults.
helm_run template silo-all "${new_chart}" \ # Passing -f old/values.yaml alone would fill missing keys with new defaults.
--namespace silo \ cp -R helm/silo "${work_dir}/reuse"
--set rootUser=silo-admin \ git show RELEASE.2026-11-12T00-00-00Z:helm/silo/values.yaml >"${work_dir}/reuse/values.yaml"
--set rootPassword=test-password-123456 \
--set tls.enabled=true \ # Exercise the persisted standalone PVC, optional legacy values, and OIDC in both workloads.
--set tls.certSecret=silo-tls \ cp buildscripts/helm-migration-guard/testdata/optional-values.yaml "${work_dir}/optional-values.yaml"
--set trustedCertsSecret=silo-trusted-ca \ for mode in standalone distributed; do
--set ingress.enabled=true \ render="${work_dir}/${mode}.yaml"
--set consoleIngress.enabled=true \ helm_run template silo-all "${new_chart}" --namespace silo \
--set networkPolicy.enabled=true \ -f "${output_dir}/optional-values.yaml" --set "mode=${mode}" >"${render}"
--set podDisruptionBudget.enabled=true \ expect_rendered "${render}" \
--set metrics.serviceMonitor.enabled=true \ 'createBucket chart-test "none" false "" false' \
--set metrics.serviceMonitor.includeNode=true \ 'startupProbe:' 'livenessProbe:' 'readinessProbe:' \
--set 'buckets[0].name=chart-test' \ 'path: /minio/health/live' \
--set 'buckets[0].policy=none' \ 'path: /minio/health/ready' \
--set 'buckets[0].purge=false' >/dev/null 'scheme: HTTPS' \
'periodSeconds: 30' \
'failureThreshold: 60' \
'name: "chart-oidc"' \
'key: "discovery"' \
'value: "https://console.example.test/oauth_callback"' \
"rootPassword: \"$(printf '%s' 'literal-{{ .Release.Name }}' | base64)\""
if grep -F -- 'name: MINIO_BROWSER_REDIRECT_URL' "${render}" >/dev/null; then
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 # Existing values commonly address the historical myminio target. Render the
# custom-command path explicitly so both the new and compatibility aliases are # custom-command path explicitly so both the new and compatibility aliases are
@@ -81,15 +121,10 @@ helm_run template silo-custom "${new_chart}" \
--set rootPassword=test-password-123456 \ --set rootPassword=test-password-123456 \
--set-string 'customCommands[0].command=admin info myminio' \ --set-string 'customCommands[0].command=admin info myminio' \
--show-only templates/configmap.yaml >"${custom_render}" --show-only templates/configmap.yaml >"${custom_render}"
for expected in \ expect_rendered "${custom_render}" \
'alias set mysilo' \ 'alias set mysilo' \
'alias set myminio' \ 'alias set myminio' \
'runCommand admin info myminio'; do 'runCommand admin info myminio'
grep -F -- "${expected}" "${custom_render}" >/dev/null || {
echo "rendered custom command is missing: ${expected}" >&2
exit 1
}
done
old_render="${work_dir}/legacy.yaml" old_render="${work_dir}/legacy.yaml"
new_render="${work_dir}/candidate.yaml" new_render="${work_dir}/candidate.yaml"
@@ -132,4 +167,14 @@ if find "${work_dir}" -maxdepth 1 -type f -name 'minio-*.tgz' | grep -q .; then
exit 1 exit 1
fi fi
# Render the packaged chart under an alias, with values inherited from its parent.
cp -R buildscripts/helm-migration-guard/testdata/parent "${work_dir}/parent"
mkdir "${work_dir}/parent/charts"
cp "${work_dir}/silo-${chart_version}.tgz" "${work_dir}/parent/charts/"
helm_run template consumer "${output_dir}/parent" >"${work_dir}/parent.yaml"
expect_rendered "${work_dir}/parent.yaml" \
'name: consumer-objects' \
'storageClassName: "site-storage"' \
'createBucket consumer-archive "none" false "" false'
echo "Silo Helm lint, render, legacy-upgrade, and package checks passed" echo "Silo Helm lint, render, legacy-upgrade, and package checks passed"
+1 -1
View File
@@ -1,7 +1,7 @@
apiVersion: v1 apiVersion: v1
description: S3-Interface Libre Object Storage description: S3-Interface Libre Object Storage
name: silo name: silo
version: 7.1.0 version: 7.2.0
appVersion: RELEASE.2026-11-12T00-00-00Z appVersion: RELEASE.2026-11-12T00-00-00Z
keywords: keywords:
- silo - silo
+57 -9
View File
@@ -12,19 +12,22 @@ The chart and server are licensed under AGPL-3.0-or-later.
## Install ## Install
From GHCR: From the source checkout:
```bash ```bash
helm install silo oci://ghcr.io/pgsty/charts/silo \ helm install silo ./helm/silo \
--namespace silo --create-namespace \ --namespace silo --create-namespace \
--set rootUser=silo-admin \ --set rootUser=silo-admin \
--set rootPassword='replace-with-a-long-random-secret' --set rootPassword='replace-with-a-long-random-secret'
``` ```
For a version published on GHCR, use `oci://ghcr.io/pgsty/charts/silo` in
place of `./helm/silo` and pass `--version <chart-version>`.
For a disposable standalone installation: For a disposable standalone installation:
```bash ```bash
helm install silo oci://ghcr.io/pgsty/charts/silo \ helm install silo ./helm/silo \
--namespace silo --create-namespace \ --namespace silo --create-namespace \
--set mode=standalone \ --set mode=standalone \
--set replicas=1 \ --set replicas=1 \
@@ -64,7 +67,7 @@ helm get values my-release -n my-namespace -a > values.before-silo.yaml
SILO_TAG='<published-silo-release-tag>' SILO_TAG='<published-silo-release-tag>'
MCLI_TAG='<published-mcli-release-tag>' MCLI_TAG='<published-mcli-release-tag>'
helm template my-release oci://ghcr.io/pgsty/charts/silo \ helm template my-release ./helm/silo \
-n my-namespace \ -n my-namespace \
-f values.before-silo.yaml \ -f values.before-silo.yaml \
--set nameOverride=minio \ --set nameOverride=minio \
@@ -84,7 +87,7 @@ mounts. After review, upgrade the chart and image together:
```bash ```bash
SILO_TAG='<published-silo-release-tag>' SILO_TAG='<published-silo-release-tag>'
MCLI_TAG='<published-mcli-release-tag>' MCLI_TAG='<published-mcli-release-tag>'
helm upgrade my-release oci://ghcr.io/pgsty/charts/silo \ helm upgrade my-release ./helm/silo \
-n my-namespace \ -n my-namespace \
-f values.before-silo.yaml \ -f values.before-silo.yaml \
--set nameOverride=minio \ --set nameOverride=minio \
@@ -122,25 +125,70 @@ When upgrading an existing Silo release to `RELEASE.2026-11-12T00-00-00Z` (chart
## Persistence and TLS ## Persistence and TLS
The default PersistentVolumeClaim mounts at `/export`. Use an existing claim The default PersistentVolumeClaim mounts at `/export`. New claims use
with: `persistence.storageClass` or inherit `global.storageClass` from a parent chart.
Helm preserves the existing storage class during a connected upgrade when only
the parent supplies a default.
Use an existing claim with:
```bash ```bash
helm install silo oci://ghcr.io/pgsty/charts/silo --set persistence.existingClaim=PVC_NAME helm install silo ./helm/silo --set persistence.existingClaim=PVC_NAME
``` ```
Create a TLS Secret containing `private.key` and `public.crt`, then set: Create a TLS Secret containing `private.key` and `public.crt`, then set:
```bash ```bash
helm upgrade --install silo oci://ghcr.io/pgsty/charts/silo \ helm upgrade --install silo ./helm/silo \
--set tls.enabled=true \ --set tls.enabled=true \
--set tls.certSecret=silo-tls --set tls.certSecret=silo-tls
``` ```
Additional trusted CAs can be supplied through `trustedCertsSecret`. Additional trusted CAs can be supplied through `trustedCertsSecret`.
## Kubernetes health probes
Enable each probe independently for the server container in either mode.
```yaml
startupProbe:
enabled: true
livenessProbe:
enabled: true
readinessProbe:
enabled: true
```
| Probe | Pod endpoint | Default action after consecutive failures |
| --- | --- | --- |
| Startup | `/minio/health/live` | Restart after 60 checks at 5-second intervals. The first success releases the liveness and readiness checks. |
| Liveness | `/minio/health/live` | Restart after 3 checks at 30-second intervals. A saturated request queue can fail this check. |
| Readiness | `/minio/health/ready` | Stop routing new Service traffic to the Pod after 3 checks at 15-second intervals. Resume traffic on recovery. |
Enable startup alongside liveness when a cold start may exceed the liveness
failure window. Built-in probes use `minioAPIPort` and switch to HTTPS with
`tls.enabled`.
Kubelet skips certificate verification for HTTPS probes. Readiness includes
configured KMS and etcd checks. Both endpoints can succeed while storage or IAM
is loading. The distributed headless Service publishes peer addresses during
bootstrap. Use cluster quorum checks for monitoring and a signed S3 write and
readback when an application needs to verify object access.
[Health check guide](https://silo.pgsty.com/operations/monitoring/healthcheck-probe/)
All three probes default to disabled, including on upgrades with `--reuse-values`
from charts that predate these settings. A chart version change updates the
Pod template checksums for the ConfigMap and Secret by default and can trigger
a rollout even with all probes disabled. Set timing fields on each probe, for
example `--set startupProbe.failureThreshold=120` for a ten-minute startup budget.
A nonempty `customStartupProbe`, `customLivenessProbe`, or `customReadinessProbe`
supplies the complete Kubernetes probe even when its built-in is disabled.
Custom probe fields are passed through literally.
## Existing Secrets and post-install resources ## Existing Secrets and post-install resources
The chart treats `rootUser` and `rootPassword` as literal values. A parent chart
can opt into evaluating both as Helm templates with `tplRootCredentials: true`.
Set `existingSecret` to a Secret containing `rootUser` and `rootPassword`. Set `existingSecret` to a Secret containing `rootUser` and `rootPassword`.
Buckets, users, policies, service accounts, and custom commands can be created Buckets, users, policies, service accounts, and custom commands can be created
with the existing `buckets`, `users`, `policies`, `svcaccts`, and with the existing `buckets`, `users`, `policies`, `svcaccts`, and
@@ -119,5 +119,5 @@ connectToSilo $scheme
{{ $global := . }} {{ $global := . }}
# Create the buckets # Create the buckets
{{- range .Values.buckets }} {{- range .Values.buckets }}
createBucket {{ tpl .name $global }} {{ tpl .policy $global | default "none" | quote }} {{ .purge | default false }} {{ .versioning | default "" }} {{ .objectlocking | default false }}{{- end }} createBucket {{ tpl .name $global }} {{ tpl (default "none" .policy) $global | default "none" | quote }} {{ .purge | default false }} {{ ternary .versioning "" (ne .versioning nil) | quote }} {{ .objectlocking | default false }}{{- end }}
{{- end }} {{- end }}
+110 -20
View File
@@ -119,26 +119,34 @@ Properly format optional additional arguments to Silo binary
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{/*
Return the proper Docker Image Registry Secret Names
*/}}
{{- define "silo.imagePullSecrets" -}} {{- define "silo.imagePullSecrets" -}}
{{/* {{- with (or (.Values.global | default dict).imagePullSecrets .Values.imagePullSecrets) }}
Helm 2.11 supports the assignment of a value to a variable defined in a different scope, imagePullSecrets: {{- tpl (toYaml .) $ | nindent 2 }}
but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. {{- end }}
Also, we can not use a single if because lazy evaluation is not an option
*/}}
{{- if .Values.global }}
{{- if .Values.global.imagePullSecrets }}
imagePullSecrets:
{{ tpl (toYaml .Values.global.imagePullSecrets) $ }}
{{- else if .Values.imagePullSecrets }}
imagePullSecrets:
{{ tpl (toYaml .Values.imagePullSecrets) $ }}
{{- end -}} {{- end -}}
{{- else if .Values.imagePullSecrets }}
imagePullSecrets: {{/* Keep the class already chosen for an existing claim when a parent supplies a default. */}}
{{ tpl (toYaml .Values.imagePullSecrets) $ }} {{- define "silo.storageClass" -}}
{{- $class := or .Values.persistence.storageClass (.Values.global | default dict).storageClass -}}
{{- if $class -}}
{{- $spec := dict "storageClassName" (ternary "" $class (eq $class "-")) -}}
{{- if and .Release.IsUpgrade (not .Values.persistence.storageClass) -}}
{{- $name := include "silo.fullname" . -}}
{{- if eq .Values.mode "standalone" -}}
{{- with (lookup "v1" "PersistentVolumeClaim" .Release.Namespace $name) -}}
{{- $spec = .spec -}}
{{- end -}}
{{- else -}}
{{- with (lookup "apps/v1" "StatefulSet" .Release.Namespace $name) -}}
{{- with .spec.volumeClaimTemplates -}}
{{- $spec = (first .).spec -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- if hasKey $spec "storageClassName" -}}
storageClassName: {{ $spec.storageClassName | quote }}
{{- end -}}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
@@ -201,7 +209,11 @@ otherwise it generates a random value.
{{- define "silo.root.username" -}} {{- define "silo.root.username" -}}
{{- if .Values.rootUser }} {{- if .Values.rootUser }}
{{- tpl .Values.rootUser . | toString }} {{- if .Values.tplRootCredentials }}
{{- tpl (.Values.rootUser | toString) . }}
{{- else }}
{{- .Values.rootUser | toString }}
{{- end }}
{{- else }} {{- else }}
{{- include "silo.getValueFromSecret" (dict "Namespace" .Release.Namespace "Name" (include "silo.fullname" .) "Length" 20 "Key" "rootUser") }} {{- include "silo.getValueFromSecret" (dict "Namespace" .Release.Namespace "Name" (include "silo.fullname" .) "Length" 20 "Key" "rootUser") }}
{{- end }} {{- end }}
@@ -209,8 +221,86 @@ otherwise it generates a random value.
{{- define "silo.root.password" -}} {{- define "silo.root.password" -}}
{{- if .Values.rootPassword }} {{- if .Values.rootPassword }}
{{- tpl .Values.rootPassword . | toString }} {{- if .Values.tplRootCredentials }}
{{- tpl (.Values.rootPassword | toString) . }}
{{- else }}
{{- .Values.rootPassword | toString }}
{{- end }}
{{- else }} {{- else }}
{{- include "silo.getValueFromSecret" (dict "Namespace" .Release.Namespace "Name" (include "silo.fullname" .) "Length" 40 "Key" "rootPassword") }} {{- include "silo.getValueFromSecret" (dict "Namespace" .Release.Namespace "Name" (include "silo.fullname" .) "Length" 40 "Key" "rootPassword") }}
{{- end }} {{- end }}
{{- end -}} {{- end -}}
{{/* OIDC environment shared by the standalone and distributed workloads. */}}
{{- define "silo.oidcEnv" -}}
{{- $oidc := .Values.oidc -}}
{{- if $oidc.enabled -}}
- name: MINIO_IDENTITY_OPENID_CONFIG_URL
{{- if and $oidc.existingConfigMapName $oidc.existingConfigUrlKey }}
valueFrom:
configMapKeyRef:
name: {{ $oidc.existingConfigMapName | quote }}
key: {{ $oidc.existingConfigUrlKey | quote }}
{{- else }}
value: {{ $oidc.configUrl | quote }}
{{- end }}
- name: MINIO_IDENTITY_OPENID_CLIENT_ID
{{- if and $oidc.existingClientSecretName $oidc.existingClientIdKey }}
valueFrom:
secretKeyRef:
name: {{ $oidc.existingClientSecretName | quote }}
key: {{ $oidc.existingClientIdKey | quote }}
{{- else }}
value: {{ $oidc.clientId | quote }}
{{- end }}
- name: MINIO_IDENTITY_OPENID_CLIENT_SECRET
{{- if and $oidc.existingClientSecretName $oidc.existingClientSecretKey }}
valueFrom:
secretKeyRef:
name: {{ $oidc.existingClientSecretName | quote }}
key: {{ $oidc.existingClientSecretKey | quote }}
{{- else }}
value: {{ $oidc.clientSecret | quote }}
{{- end }}
- name: MINIO_IDENTITY_OPENID_CLAIM_NAME
value: {{ $oidc.claimName | quote }}
- name: MINIO_IDENTITY_OPENID_CLAIM_PREFIX
value: {{ $oidc.claimPrefix | quote }}
- name: MINIO_IDENTITY_OPENID_SCOPES
value: {{ tpl $oidc.scopes . | quote }}
- name: MINIO_IDENTITY_OPENID_COMMENT
value: {{ $oidc.comment | quote }}
{{- with $oidc.redirectUri }}
- name: MINIO_IDENTITY_OPENID_REDIRECT_URI
value: {{ tpl . $ | quote }}
{{- end }}
{{- if and $oidc.redirectUrl (not (hasKey (.Values.environment | default dict) "MINIO_BROWSER_REDIRECT_URL")) }}
- name: MINIO_BROWSER_REDIRECT_URL
value: {{ tpl $oidc.redirectUrl . | quote }}
{{- end }}
- name: MINIO_IDENTITY_OPENID_DISPLAY_NAME
value: {{ $oidc.displayName | quote }}
{{- end }}
{{- end -}}
{{/* Old releases can lack all probe settings on helm upgrade --reuse-values. */}}
{{- define "silo.probes" -}}
{{- range $name, $period := dict "startupProbe" 5 "livenessProbe" 30 "readinessProbe" 15 }}
{{- $settings := index $.Values $name | default dict }}
{{- $custom := index $.Values (printf "custom%s" (title $name)) }}
{{- if $custom }}
{{ $name }}: {{- toYaml $custom | nindent 2 }}
{{- else if $settings.enabled }}
{{ $name }}:
httpGet:
path: {{ ternary "/minio/health/ready" "/minio/health/live" (eq $name "readinessProbe") }}
port: {{ $.Values.minioAPIPort }}
scheme: {{ ternary "HTTPS" "HTTP" $.Values.tls.enabled }}
initialDelaySeconds: {{ $settings.initialDelaySeconds | default 0 | toJson }}
periodSeconds: {{ $settings.periodSeconds | default $period | toJson }}
timeoutSeconds: {{ $settings.timeoutSeconds | default 5 | toJson }}
successThreshold: {{ $settings.successThreshold | default 1 | toJson }}
failureThreshold: {{ $settings.failureThreshold | default (ternary 60 3 (eq $name "startupProbe")) | toJson }}
{{- end }}
{{- end }}
{{- end -}}
+3 -1
View File
@@ -31,7 +31,9 @@ spec:
{{- range .hosts }} {{- range .hosts }}
- {{ tpl . $ | quote }} - {{ tpl . $ | quote }}
{{- end }} {{- end }}
secretName: {{ tpl .secretName $ }} {{- with .secretName }}
secretName: {{ tpl . $ | quote }}
{{- end }}
{{- end }} {{- end }}
{{- end }} {{- end }}
rules: rules:
+3 -46
View File
@@ -69,7 +69,7 @@ spec:
{{- end }} {{- end }}
containers: containers:
- name: {{ include "silo.name" . }} - name: {{ include "silo.name" . }}
image: "{{ tpl .Values.image.repository . }}:{{ tpl .Values.image.tag . }}" image: "{{ tpl .Values.image.repository . }}:{{ tpl (.Values.image.tag | toString) . }}"
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pullPolicy }}
command: command:
- "/bin/sh" - "/bin/sh"
@@ -116,51 +116,7 @@ spec:
- name: MINIO_PROMETHEUS_AUTH_TYPE - name: MINIO_PROMETHEUS_AUTH_TYPE
value: "public" value: "public"
{{- end }} {{- end }}
{{- if .Values.oidc.enabled }} {{- include "silo.oidcEnv" . | nindent 12 }}
- name: MINIO_IDENTITY_OPENID_CONFIG_URL
{{- if and .Values.oidc.existingConfigMapName .Values.oidc.existingConfigUrlKey }}
valueFrom:
configMapKeyRef:
name: {{ .Values.oidc.existingConfigMapName }}
key: {{ .Values.oidc.existingConfigUrlKey }}
{{- else }}
value: {{ .Values.oidc.configUrl }}
{{- end }}
- name: MINIO_IDENTITY_OPENID_CLIENT_ID
{{- if and .Values.oidc.existingClientSecretName .Values.oidc.existingClientIdKey }}
valueFrom:
secretKeyRef:
name: {{ .Values.oidc.existingClientSecretName }}
key: {{ .Values.oidc.existingClientIdKey }}
{{- else }}
value: {{ .Values.oidc.clientId }}
{{- end }}
- name: MINIO_IDENTITY_OPENID_CLIENT_SECRET
{{- if and .Values.oidc.existingClientSecretName .Values.oidc.existingClientSecretKey }}
valueFrom:
secretKeyRef:
name: {{ .Values.oidc.existingClientSecretName }}
key: {{ .Values.oidc.existingClientSecretKey }}
{{- else }}
value: {{ .Values.oidc.clientSecret }}
{{- end }}
- name: MINIO_IDENTITY_OPENID_CLAIM_NAME
value: {{ .Values.oidc.claimName }}
- name: MINIO_IDENTITY_OPENID_CLAIM_PREFIX
value: {{ .Values.oidc.claimPrefix }}
- name: MINIO_IDENTITY_OPENID_SCOPES
value: {{ tpl .Values.oidc.scopes . }}
- name: MINIO_IDENTITY_OPENID_COMMENT
value: {{ .Values.oidc.comment }}
{{- if .Values.oidc.redirectUri }}
- name: MINIO_IDENTITY_OPENID_REDIRECT_URI
value: {{ tpl .Values.oidc.redirectUri . }}
{{- end }}
- name: MINIO_BROWSER_REDIRECT_URL
value: {{ tpl .Values.oidc.redirectUrl . }}
- name: MINIO_IDENTITY_OPENID_DISPLAY_NAME
value: {{ .Values.oidc.displayName }}
{{- end }}
{{- if .Values.etcd.endpoints }} {{- if .Values.etcd.endpoints }}
- name: MINIO_ETCD_ENDPOINTS - name: MINIO_ETCD_ENDPOINTS
value: {{ join "," .Values.etcd.endpoints | quote }} value: {{ join "," .Values.etcd.endpoints | quote }}
@@ -191,6 +147,7 @@ spec:
securityContext: {{ toYaml . | nindent 12}} securityContext: {{ toYaml . | nindent 12}}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- include "silo.probes" . | nindent 10 }}
{{- with .Values.extraContainers }} {{- with .Values.extraContainers }}
{{- if eq (typeOf .) "string" }} {{- if eq (typeOf .) "string" }}
{{- tpl . $ | nindent 8 }} {{- tpl . $ | nindent 8 }}
+3 -1
View File
@@ -31,7 +31,9 @@ spec:
{{- range .hosts }} {{- range .hosts }}
- {{ tpl . $ | quote }} - {{ tpl . $ | quote }}
{{- end }} {{- end }}
secretName: {{ tpl .secretName $ }} {{- with .secretName }}
secretName: {{ tpl . $ | quote }}
{{- end }}
{{- end }} {{- end }}
{{- end }} {{- end }}
rules: rules:
+3
View File
@@ -53,6 +53,9 @@ metadata:
chart: {{ template "silo.chart" . }} chart: {{ template "silo.chart" . }}
release: {{ .Release.Name }} release: {{ .Release.Name }}
heritage: {{ .Release.Service }} heritage: {{ .Release.Service }}
{{- with .Values.commonLabels }}
{{- tpl (toYaml .) $ | nindent 4 }}
{{- end }}
spec: spec:
podSelector: podSelector:
matchLabels: matchLabels:
+8 -8
View File
@@ -24,7 +24,7 @@ spec:
app: {{ template "silo.name" . }}-job app: {{ template "silo.name" . }}-job
release: {{ .Release.Name }} release: {{ .Release.Name }}
{{- if .Values.podLabels }} {{- if .Values.podLabels }}
{{- toYaml .Values.podLabels | nindent 8 }} {{- tpl (toYaml .Values.podLabels) $ | nindent 8 }}
{{- end }} {{- end }}
{{- with .Values.commonLabels }} {{- with .Values.commonLabels }}
{{- tpl (toYaml .) $ | nindent 8 }} {{- tpl (toYaml .) $ | nindent 8 }}
@@ -35,8 +35,8 @@ spec:
spec: spec:
restartPolicy: OnFailure restartPolicy: OnFailure
{{- include "silo.imagePullSecrets" . | indent 6 }} {{- include "silo.imagePullSecrets" . | indent 6 }}
{{- if or .Values.nodeSelector .Values.postJob.nodeSelector }} {{- with (.Values.postJob.nodeSelector | default .Values.nodeSelector) }}
nodeSelector: {{- tpl (toYaml .Values.postJob.nodeSelector | default .Values.nodeSelector) . | nindent 8 }} nodeSelector: {{- tpl (toYaml .) $ | nindent 8 }}
{{- end }} {{- end }}
{{- with .Values.postJob.affinity }} {{- with .Values.postJob.affinity }}
affinity: {{- toYaml . | nindent 8 }} affinity: {{- toYaml . | nindent 8 }}
@@ -94,7 +94,7 @@ spec:
{{- if .Values.policies }} {{- if .Values.policies }}
initContainers: initContainers:
- name: silo-make-policy - name: silo-make-policy
image: "{{ tpl .Values.mcImage.repository . }}:{{ tpl .Values.mcImage.tag . }}" image: "{{ tpl .Values.mcImage.repository . }}:{{ tpl (.Values.mcImage.tag | toString) . }}"
{{- if .Values.makePolicyJob.securityContext.enabled }} {{- if .Values.makePolicyJob.securityContext.enabled }}
{{- with .Values.makePolicyJob.containerSecurityContext | default .Values.postJob.containerSecurityContext }} {{- with .Values.makePolicyJob.containerSecurityContext | default .Values.postJob.containerSecurityContext }}
securityContext: {{ toYaml . | nindent 12 }} securityContext: {{ toYaml . | nindent 12 }}
@@ -128,7 +128,7 @@ spec:
containers: containers:
{{- if .Values.buckets }} {{- if .Values.buckets }}
- name: silo-make-bucket - name: silo-make-bucket
image: "{{ tpl .Values.mcImage.repository . }}:{{ tpl .Values.mcImage.tag . }}" image: "{{ tpl .Values.mcImage.repository . }}:{{ tpl (.Values.mcImage.tag | toString) . }}"
{{- if .Values.makeBucketJob.securityContext.enabled }} {{- if .Values.makeBucketJob.securityContext.enabled }}
{{- with .Values.makeBucketJob.containerSecurityContext | default .Values.postJob.containerSecurityContext }} {{- with .Values.makeBucketJob.containerSecurityContext | default .Values.postJob.containerSecurityContext }}
securityContext: {{ toYaml . | nindent 12 }} securityContext: {{ toYaml . | nindent 12 }}
@@ -161,7 +161,7 @@ spec:
{{- end }} {{- end }}
{{- if .Values.users }} {{- if .Values.users }}
- name: silo-make-user - name: silo-make-user
image: "{{ tpl .Values.mcImage.repository . }}:{{ tpl .Values.mcImage.tag . }}" image: "{{ tpl .Values.mcImage.repository . }}:{{ tpl (.Values.mcImage.tag | toString) . }}"
{{- if .Values.makeUserJob.securityContext.enabled }} {{- if .Values.makeUserJob.securityContext.enabled }}
{{- with .Values.makeUserJob.containerSecurityContext | default .Values.postJob.containerSecurityContext }} {{- with .Values.makeUserJob.containerSecurityContext | default .Values.postJob.containerSecurityContext }}
securityContext: {{ toYaml . | nindent 12 }} securityContext: {{ toYaml . | nindent 12 }}
@@ -194,7 +194,7 @@ spec:
{{- end }} {{- end }}
{{- if .Values.customCommands }} {{- if .Values.customCommands }}
- name: silo-custom-command - name: silo-custom-command
image: "{{ tpl .Values.mcImage.repository . }}:{{ tpl .Values.mcImage.tag . }}" image: "{{ tpl .Values.mcImage.repository . }}:{{ tpl (.Values.mcImage.tag | toString) . }}"
{{- if .Values.customCommandJob.securityContext.enabled }} {{- if .Values.customCommandJob.securityContext.enabled }}
{{- with .Values.customCommandJob.containerSecurityContext | default .Values.postJob.containerSecurityContext }} {{- with .Values.customCommandJob.containerSecurityContext | default .Values.postJob.containerSecurityContext }}
securityContext: {{ toYaml . | nindent 12 }} securityContext: {{ toYaml . | nindent 12 }}
@@ -230,7 +230,7 @@ spec:
{{- end }} {{- end }}
{{- if .Values.svcaccts }} {{- if .Values.svcaccts }}
- name: silo-make-svcacct - name: silo-make-svcacct
image: "{{ tpl .Values.mcImage.repository . }}:{{ tpl .Values.mcImage.tag . }}" image: "{{ tpl .Values.mcImage.repository . }}:{{ tpl (.Values.mcImage.tag | toString) . }}"
{{- if .Values.makeServiceAccountJob.securityContext.enabled }} {{- if .Values.makeServiceAccountJob.securityContext.enabled }}
{{- with .Values.makeServiceAccountJob.containerSecurityContext | default .Values.postJob.containerSecurityContext }} {{- with .Values.makeServiceAccountJob.containerSecurityContext | default .Values.postJob.containerSecurityContext }}
securityContext: {{ toYaml . | nindent 12 }} securityContext: {{ toYaml . | nindent 12 }}
+2 -6
View File
@@ -22,12 +22,8 @@ spec:
resources: resources:
requests: requests:
storage: {{ .Values.persistence.size | quote }} storage: {{ .Values.persistence.size | quote }}
{{- if or .Values.persistence.storageClass .Values.global.storageClass }} {{- with (include "silo.storageClass" .) }}
{{- if (eq "-" .Values.persistence.storageClass) }} {{- . | nindent 2 }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.persistence.storageClass | default .Values.global.storageClass }}"
{{- end }}
{{- end }} {{- end }}
{{- if .Values.persistence.volumeName }} {{- if .Values.persistence.volumeName }}
volumeName: "{{ .Values.persistence.volumeName }}" volumeName: "{{ .Values.persistence.volumeName }}"
+3
View File
@@ -80,6 +80,9 @@ metadata:
{{- with .Values.metrics.serviceMonitor.additionalLabels }} {{- with .Values.metrics.serviceMonitor.additionalLabels }}
{{- tpl (toYaml .) $ | nindent 4 }} {{- tpl (toYaml .) $ | nindent 4 }}
{{- end }} {{- end }}
{{- with .Values.commonLabels }}
{{- tpl (toYaml .) $ | nindent 4 }}
{{- end }}
spec: spec:
jobName: {{ template "silo.fullname" . }} jobName: {{ template "silo.fullname" . }}
{{- if .Values.tls.enabled }} {{- if .Values.tls.enabled }}
+9 -41
View File
@@ -9,7 +9,6 @@
{{ $subPath := .Values.persistence.subPath }} {{ $subPath := .Values.persistence.subPath }}
{{ $penabled := .Values.persistence.enabled }} {{ $penabled := .Values.persistence.enabled }}
{{ $accessMode := .Values.persistence.accessMode }} {{ $accessMode := .Values.persistence.accessMode }}
{{ $storageClass := .Values.persistence.storageClass }}
{{ $psize := .Values.persistence.size }} {{ $psize := .Values.persistence.size }}
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
@@ -100,7 +99,7 @@ spec:
{{- end }} {{- end }}
containers: containers:
- name: {{ include "silo.name" . }} - name: {{ include "silo.name" . }}
image: {{ tpl .Values.image.repository . }}:{{ tpl .Values.image.tag . }} image: {{ tpl .Values.image.repository . }}:{{ tpl (.Values.image.tag | toString) . }}
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pullPolicy }}
command: [ command: [
"/bin/sh", "/bin/sh",
@@ -157,40 +156,7 @@ spec:
- name: MINIO_PROMETHEUS_AUTH_TYPE - name: MINIO_PROMETHEUS_AUTH_TYPE
value: "public" value: "public"
{{- end }} {{- end }}
{{- if .Values.oidc.enabled }} {{- include "silo.oidcEnv" . | nindent 12 }}
- name: MINIO_IDENTITY_OPENID_CONFIG_URL
value: {{ .Values.oidc.configUrl }}
- name: MINIO_IDENTITY_OPENID_CLIENT_ID
{{- if and .Values.oidc.existingClientSecretName .Values.oidc.existingClientIdKey }}
valueFrom:
secretKeyRef:
name: {{ .Values.oidc.existingClientSecretName }}
key: {{ .Values.oidc.existingClientIdKey }}
{{- else }}
value: {{ .Values.oidc.clientId }}
{{- end }}
- name: MINIO_IDENTITY_OPENID_CLIENT_SECRET
{{- if and .Values.oidc.existingClientSecretName .Values.oidc.existingClientSecretKey }}
valueFrom:
secretKeyRef:
name: {{ .Values.oidc.existingClientSecretName }}
key: {{ .Values.oidc.existingClientSecretKey }}
{{- else }}
value: {{ .Values.oidc.clientSecret }}
{{- end }}
- name: MINIO_IDENTITY_OPENID_CLAIM_NAME
value: {{ .Values.oidc.claimName }}
- name: MINIO_IDENTITY_OPENID_CLAIM_PREFIX
value: {{ .Values.oidc.claimPrefix }}
- name: MINIO_IDENTITY_OPENID_SCOPES
value: {{ .Values.oidc.scopes }}
- name: MINIO_IDENTITY_OPENID_COMMENT
value: {{ .Values.oidc.comment }}
- name: MINIO_IDENTITY_OPENID_REDIRECT_URI
value: {{ .Values.oidc.redirectUri }}
- name: MINIO_IDENTITY_OPENID_DISPLAY_NAME
value: {{ .Values.oidc.displayName }}
{{- end }}
{{- range $key, $val := .Values.environment }} {{- range $key, $val := .Values.environment }}
- name: {{ $key }} - name: {{ $key }}
value: {{ tpl $val $ | quote }} value: {{ tpl $val $ | quote }}
@@ -201,6 +167,7 @@ spec:
securityContext: {{ toYaml . | nindent 12}} securityContext: {{ toYaml . | nindent 12}}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- include "silo.probes" . | nindent 10 }}
{{- with .Values.extraContainers }} {{- with .Values.extraContainers }}
{{- if eq (typeOf .) "string" }} {{- if eq (typeOf .) "string" }}
{{- tpl . $ | nindent 8 }} {{- tpl . $ | nindent 8 }}
@@ -209,7 +176,7 @@ spec:
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- with .Values.nodeSelector }} {{- with .Values.nodeSelector }}
nodeSelector: {{- toYaml . | nindent 8 }} nodeSelector: {{- tpl (toYaml .) $ | nindent 8 }}
{{- end }} {{- end }}
{{- include "silo.imagePullSecrets" . | indent 6 }} {{- include "silo.imagePullSecrets" . | indent 6 }}
{{- with .Values.affinity }} {{- with .Values.affinity }}
@@ -237,6 +204,7 @@ spec:
{{- toYaml .Values.extraVolumes | nindent 8 }} {{- toYaml .Values.extraVolumes | nindent 8 }}
{{- end }} {{- end }}
{{- if .Values.persistence.enabled }} {{- if .Values.persistence.enabled }}
{{- $storageClass := include "silo.storageClass" . }}
volumeClaimTemplates: volumeClaimTemplates:
{{- if gt $drivesPerNode 1 }} {{- if gt $drivesPerNode 1 }}
{{- range $diskId := until $drivesPerNode}} {{- range $diskId := until $drivesPerNode}}
@@ -249,8 +217,8 @@ spec:
{{- end }} {{- end }}
spec: spec:
accessModes: [ {{ $accessMode | quote }} ] accessModes: [ {{ $accessMode | quote }} ]
{{- if $storageClass }} {{- with $storageClass }}
storageClassName: {{ $storageClass }} {{- . | nindent 8 }}
{{- end }} {{- end }}
resources: resources:
requests: requests:
@@ -266,8 +234,8 @@ spec:
{{- end }} {{- end }}
spec: spec:
accessModes: [ {{ $accessMode | quote }} ] accessModes: [ {{ $accessMode | quote }} ]
{{- if $storageClass }} {{- with $storageClass }}
storageClassName: {{ $storageClass }} {{- . | nindent 8 }}
{{- end }} {{- end }}
resources: resources:
requests: requests:
+30 -6
View File
@@ -95,6 +95,8 @@ runtimeClassName: ""
## ##
rootUser: "" rootUser: ""
rootPassword: "" rootPassword: ""
## Evaluate rootUser and rootPassword as Helm templates when explicitly enabled.
tplRootCredentials: false
## Use existing Secret that store following variables: ## Use existing Secret that store following variables:
## ##
@@ -160,8 +162,8 @@ persistence:
## set, choosing the default provisioner. (gp2 on AWS, standard on ## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack) ## GKE, AWS & OpenStack)
## ##
## Storage class of PV to bind. By default it looks for standard storage class. ## An unset value inherits global.storageClass for new claims. During upgrade,
## If the PV uses a different storage class, specify that here. ## existing claims retain their provisioned class.
storageClass: "" storageClass: ""
volumeName: "" volumeName: ""
accessMode: ReadWriteOnce accessMode: ReadWriteOnce
@@ -299,6 +301,28 @@ resources:
requests: requests:
memory: 16Gi memory: 16Gi
## Each built-in probe uses the S3 API port and follows tls.enabled.
## All three accept initialDelaySeconds (default 0), timeoutSeconds (5),
## successThreshold (1), periodSeconds and failureThreshold.
startupProbe:
enabled: false
periodSeconds: 5
failureThreshold: 60
livenessProbe:
enabled: false
periodSeconds: 30
failureThreshold: 3
readinessProbe:
enabled: false
periodSeconds: 15
failureThreshold: 3
## A nonempty custom probe supplies the complete Kubernetes Probe and takes
## precedence over the corresponding built-in, including its enabled flag.
customStartupProbe: {}
customLivenessProbe: {}
customReadinessProbe: {}
## Policies to create after installing Silo. ## Policies to create after installing Silo.
## ##
## In addition to default policies [readonly|readwrite|writeonly|consoleAdmin|diagnostics] ## In addition to default policies [readonly|readwrite|writeonly|consoleAdmin|diagnostics]
@@ -552,10 +576,10 @@ oidc:
existingClientSecretKey: "" existingClientSecretKey: ""
claimName: "policy" claimName: "policy"
scopes: "openid,profile,email" scopes: "openid,profile,email"
# Deprecated: Use redirectUrl and set this to `false` or an empty string # Legacy callback URL, including /oauth_callback, for existing installations.
redirectUri: "https://console-endpoint-url/oauth_callback" redirectUri: ""
# Use in favor of `redirectUri` to set `MINIO_BROWSER_REDIRECT_URL` # Public Console base URL. An explicit environment.MINIO_BROWSER_REDIRECT_URL takes priority.
redirectUrl: "https://console-endpoint-url" redirectUrl: ""
# Can leave empty # Can leave empty
claimPrefix: "" claimPrefix: ""
comment: "" comment: ""