From 4327e00fa90cff415a2b0db24270d5b3bced97c2 Mon Sep 17 00:00:00 2001 From: Ivan Panteleev Date: Tue, 26 May 2026 12:58:01 +0300 Subject: [PATCH 1/2] add extraIngress support --- charts/statefull/Chart.yaml | 2 +- charts/statefull/values.yaml | 2 + charts/stateless/Chart.yaml | 2 +- .../templates/extra-ingress-alb.yaml | 63 +++++++++++++++++++ charts/stateless/values.yaml | 2 + 5 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 charts/stateless/templates/extra-ingress-alb.yaml diff --git a/charts/statefull/Chart.yaml b/charts/statefull/Chart.yaml index 0be90b4..316477d 100644 --- a/charts/statefull/Chart.yaml +++ b/charts/statefull/Chart.yaml @@ -2,4 +2,4 @@ apiVersion: v1 appVersion: "1.0" description: A Helm chart for statefull vality services name: statefull -version: 1.0.30 \ No newline at end of file +version: 1.0.31 \ No newline at end of file diff --git a/charts/statefull/values.yaml b/charts/statefull/values.yaml index b91358e..9c81e1e 100644 --- a/charts/statefull/values.yaml +++ b/charts/statefull/values.yaml @@ -123,6 +123,8 @@ ingress: - host: chart-example.local paths: [] +extraIngress: [] + resources: {} # limits: # cpu: 100m diff --git a/charts/stateless/Chart.yaml b/charts/stateless/Chart.yaml index abbab1a..8edc8bd 100644 --- a/charts/stateless/Chart.yaml +++ b/charts/stateless/Chart.yaml @@ -2,4 +2,4 @@ apiVersion: v1 appVersion: "1.0" description: A Helm chart for stateless vality services name: stateless -version: 1.0.44 +version: 1.0.45 \ No newline at end of file diff --git a/charts/stateless/templates/extra-ingress-alb.yaml b/charts/stateless/templates/extra-ingress-alb.yaml new file mode 100644 index 0000000..2d93694 --- /dev/null +++ b/charts/stateless/templates/extra-ingress-alb.yaml @@ -0,0 +1,63 @@ +{{- range $entryIngress := .Values.extraIngress }} +{{- if and $entryIngress.enabled (eq $entryIngress.ingressClassName "alb") }} +{{- $fullName := include "stateless.fullname" $ }} +{{- $svcPort := $entryIngress.servicePort }} +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress + +metadata: + name: {{ $fullName }}-{{ $entryIngress.name }} + labels: +{{ include "stateless.labels" $ | indent 4 }} + annotations: + {{- with $entryIngress.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- if and $entryIngress.tls.enabled $entryIngress.tls.letsEncrypt.enabled }} + cert-manager.io/cluster-issuer: {{ $entryIngress.tls.letsEncrypt.issuer }} + {{- end }} + +spec: + ingressClassName: {{ $entryIngress.ingressClassName | quote }} + + {{- if $entryIngress.tls.enabled }} + tls: + - hosts: + {{- range $domain := $entryIngress.rootDomains }} + {{- $host := include "stateless.ingress.fqdn" (dict "ctx" $ "domain" $domain) }} + - {{ $host | quote }} + {{- end }} + secretName: {{ $entryIngress.tls.secretName | default (include "stateless.ingress.secretName" $) | quote }} + {{- end }} + + rules: + {{- range $domain := $entryIngress.rootDomains }} + {{- $host := include "stateless.ingress.fqdn" (dict "ctx" $ "domain" $domain) }} + - host: {{ $host | quote }} + http: + paths: + {{- range $entry := $entryIngress.paths }} + {{- $parsed := include "stateless.ingress.normalizePath" (dict "entry" $entry "fullName" $fullName "defaultPort" $svcPort) | fromYaml }} + {{- $path := index $parsed "path" }} + {{- $serviceName := index $parsed "serviceName" }} + {{- $portObj := index $parsed "port" }} + {{- $portNumber := index $portObj "number" }} + {{- $portName := index $portObj "name" }} + - path: {{ $path }} + pathType: Prefix + backend: + service: + name: {{ $serviceName }} + port: + {{- if $portNumber }} + number: {{ $portNumber }} + {{- else if $portName }} + name: {{ $portName }} + {{- else }} + number: {{ $svcPort }} + {{- end }} + {{- end }} + {{- end }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/stateless/values.yaml b/charts/stateless/values.yaml index 5083ee9..87327d0 100644 --- a/charts/stateless/values.yaml +++ b/charts/stateless/values.yaml @@ -129,6 +129,8 @@ ingress: - host: chart-example.local paths: [] +extraIngress: [] + resources: {} # limits: # cpu: 100m From 92bfe54c50e875e7a9fda7fd874e449449d7efdf Mon Sep 17 00:00:00 2001 From: Ivan Panteleev Date: Tue, 26 May 2026 12:58:44 +0300 Subject: [PATCH 2/2] add statefull extraIngress --- .../templates/extra-ingress-alb.yaml | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 charts/statefull/templates/extra-ingress-alb.yaml diff --git a/charts/statefull/templates/extra-ingress-alb.yaml b/charts/statefull/templates/extra-ingress-alb.yaml new file mode 100644 index 0000000..e07b665 --- /dev/null +++ b/charts/statefull/templates/extra-ingress-alb.yaml @@ -0,0 +1,63 @@ +{{- range $entryIngress := .Values.extraIngress }} +{{- if and $entryIngress.enabled (eq $entryIngress.ingressClassName "alb") }} +{{- $fullName := include "statefull.fullname" $ }} +{{- $svcPort := $entryIngress.servicePort }} +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress + +metadata: + name: {{ $fullName }}-{{ $entryIngress.name }} + labels: +{{ include "statefull.labels" $ | indent 4 }} + annotations: + {{- with $entryIngress.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- if and $entryIngress.tls.enabled $entryIngress.tls.letsEncrypt.enabled }} + cert-manager.io/cluster-issuer: {{ $entryIngress.tls.letsEncrypt.issuer }} + {{- end }} + +spec: + ingressClassName: {{ $entryIngress.ingressClassName | quote }} + + {{- if $entryIngress.tls.enabled }} + tls: + - hosts: + {{- range $domain := $entryIngress.rootDomains }} + {{- $host := include "statefull.ingress.fqdn" (dict "ctx" $ "domain" $domain) }} + - {{ $host | quote }} + {{- end }} + secretName: {{ $entryIngress.tls.secretName | default (include "statefull.ingress.secretName" $) | quote }} + {{- end }} + + rules: + {{- range $domain := $entryIngress.rootDomains }} + {{- $host := include "statefull.ingress.fqdn" (dict "ctx" $ "domain" $domain) }} + - host: {{ $host | quote }} + http: + paths: + {{- range $entry := $entryIngress.paths }} + {{- $parsed := include "statefull.ingress.normalizePath" (dict "entry" $entry "fullName" $fullName "defaultPort" $svcPort) | fromYaml }} + {{- $path := index $parsed "path" }} + {{- $serviceName := index $parsed "serviceName" }} + {{- $portObj := index $parsed "port" }} + {{- $portNumber := index $portObj "number" }} + {{- $portName := index $portObj "name" }} + - path: {{ $path }} + pathType: Prefix + backend: + service: + name: {{ $serviceName }} + port: + {{- if $portNumber }} + number: {{ $portNumber }} + {{- else if $portName }} + name: {{ $portName }} + {{- else }} + number: {{ $svcPort }} + {{- end }} + {{- end }} + {{- end }} +{{- end }} +{{- end }} \ No newline at end of file