fix(helm): merge customAnnotations with class-specific ingress annotations (#2161)

Signed-off-by: Philip Schmid <philip.schmid@protonmail.com>
Co-authored-by: houseme <housemecn@gmail.com>
This commit is contained in:
Philip Schmid
2026-03-15 02:22:12 +01:00
committed by GitHub
parent 7f1cdaedad
commit 9179fd5608
4 changed files with 11 additions and 7 deletions

View File

@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
### Fixed
- **Helm Ingress**: `customAnnotations` are now merged with class-specific annotations (nginx/traefik) instead of being ignored when `ingress.className` is set.
### Added ### Added
- **OpenStack Keystone Authentication Integration**: Full support for OpenStack Keystone authentication via X-Auth-Token headers - **OpenStack Keystone Authentication Integration**: Full support for OpenStack Keystone authentication via X-Auth-Token headers
- Tower-based middleware (`KeystoneAuthLayer`) self-contained within `rustfs-keystone` crate - Tower-based middleware (`KeystoneAuthLayer`) self-contained within `rustfs-keystone` crate

View File

@@ -71,7 +71,7 @@ RustFS helm chart supports **standalone and distributed mode**. For standalone m
| ingress.nginxAnnotations."nginx.ingress.kubernetes.io/session-cookie-hash" | string | `"sha1"` | | | ingress.nginxAnnotations."nginx.ingress.kubernetes.io/session-cookie-hash" | string | `"sha1"` | |
| ingress.nginxAnnotations."nginx.ingress.kubernetes.io/session-cookie-max-age" | string | `"3600"` | | | ingress.nginxAnnotations."nginx.ingress.kubernetes.io/session-cookie-max-age" | string | `"3600"` | |
| ingress.nginxAnnotations."nginx.ingress.kubernetes.io/session-cookie-name" | string | `"rustfs"` | | | ingress.nginxAnnotations."nginx.ingress.kubernetes.io/session-cookie-name" | string | `"rustfs"` | |
| ingress.customAnnotations | dict | `{}` |Customize annotations. | | ingress.customAnnotations | dict | `{}` | Additional custom annotations, merged with class-specific stickiness annotations. |
| ingress.traefikAnnotations."traefik.ingress.kubernetes.io/service.sticky.cookie" | string | `"true"` | | | ingress.traefikAnnotations."traefik.ingress.kubernetes.io/service.sticky.cookie" | string | `"true"` | |
| ingress.traefikAnnotations."traefik.ingress.kubernetes.io/service.sticky.cookie.httponly" | string | `"true"` | | | ingress.traefikAnnotations."traefik.ingress.kubernetes.io/service.sticky.cookie.httponly" | string | `"true"` | |
| ingress.traefikAnnotations."traefik.ingress.kubernetes.io/service.sticky.cookie.name" | string | `"rustfs"` | | | ingress.traefikAnnotations."traefik.ingress.kubernetes.io/service.sticky.cookie.name" | string | `"rustfs"` | |

View File

@@ -1,11 +1,12 @@
{{- if .Values.ingress.enabled -}} {{- if .Values.ingress.enabled -}}
{{- $ingressAnnotations := dict }} {{- $ingressAnnotations := dict }}
{{- if eq .Values.ingress.className "nginx" }} {{- if eq .Values.ingress.className "nginx" }}
{{- $ingressAnnotations = .Values.ingress.nginxAnnotations }} {{- $ingressAnnotations = deepCopy (default (dict) .Values.ingress.nginxAnnotations) }}
{{- else if eq .Values.ingress.className "traefik" }} {{- else if eq .Values.ingress.className "traefik" }}
{{- $ingressAnnotations = .Values.ingress.traefikAnnotations }} {{- $ingressAnnotations = deepCopy (default (dict) .Values.ingress.traefikAnnotations) }}
{{- else if eq .Values.ingress.className "" }} {{- end }}
{{- $ingressAnnotations = .Values.ingress.customAnnotations }} {{- with .Values.ingress.customAnnotations }}
{{- $ingressAnnotations = merge $ingressAnnotations . }}
{{- end }} {{- end }}
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
kind: Ingress kind: Ingress

View File

@@ -158,8 +158,8 @@ ingress:
nginx.ingress.kubernetes.io/session-cookie-hash: sha1 nginx.ingress.kubernetes.io/session-cookie-hash: sha1
nginx.ingress.kubernetes.io/session-cookie-max-age: "3600" nginx.ingress.kubernetes.io/session-cookie-max-age: "3600"
nginx.ingress.kubernetes.io/session-cookie-name: rustfs nginx.ingress.kubernetes.io/session-cookie-name: rustfs
customAnnotations: # Specify custom annotations customAnnotations: # Additional custom annotations (merged with class-specific annotations)
{} # Customize annotations {}
hosts: hosts:
- host: example.rustfs.com - host: example.rustfs.com
paths: paths: