From 44ed5055ec3c87ba5f93f8622b852e8d259fd6c1 Mon Sep 17 00:00:00 2001 From: Tristan Date: Tue, 3 Sep 2024 16:09:32 -0400 Subject: [PATCH] Allow defining additional ingress paths (#68) --- charts/aspnetcore/Chart.yaml | 2 +- charts/aspnetcore/templates/ingress.yaml | 9 +++++++++ charts/aspnetcore/values.yaml | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/charts/aspnetcore/Chart.yaml b/charts/aspnetcore/Chart.yaml index 55039d8..ef0c009 100644 --- a/charts/aspnetcore/Chart.yaml +++ b/charts/aspnetcore/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: aspnetcore description: A generic Helm chart for ASP.NET Core services -version: 2.0.0 +version: 2.1.0 home: https://github.com/gsoft-inc/gsoft-helm-charts sources: - https://github.com/gsoft-inc/gsoft-helm-charts diff --git a/charts/aspnetcore/templates/ingress.yaml b/charts/aspnetcore/templates/ingress.yaml index 364159b..8f6ce9c 100644 --- a/charts/aspnetcore/templates/ingress.yaml +++ b/charts/aspnetcore/templates/ingress.yaml @@ -34,4 +34,13 @@ spec: name: {{ .Release.Name }}-service port: number: {{ .Values.service.port }} + {{- range .Values.ingress.additionalPaths }} + - path: {{ . }} + pathType: {{ $.Values.ingress.pathType }} + backend: + service: + name: {{ $.Release.Name }}-service + port: + number: {{ $.Values.service.port }} + {{- end }} {{- end }} diff --git a/charts/aspnetcore/values.yaml b/charts/aspnetcore/values.yaml index 3217d8d..80edf43 100644 --- a/charts/aspnetcore/values.yaml +++ b/charts/aspnetcore/values.yaml @@ -42,6 +42,7 @@ service: ## @param ingress.className IngressClass that will be be used to implement the Ingress ## @param ingress.hostname Default host for the ingress resource, a host pointing to this will be created ## @param ingress.path Default path for the ingress record +## @param ingress.additionalPaths Additional paths pointing to the same service for the ingress record ## @param ingress.pathType Ingress path type ## @param ingress.annotations Additional annotations for the Ingress resource, for example nginx ingress annotations ## @param ingress.tls.enabled Enable TLS configuration for the host defined at `ingress.hostname` parameter @@ -53,6 +54,7 @@ ingress: className: nginx hostname: aspnetcore.example.local path: / + additionalPaths: [] pathType: Prefix annotations: {} tls: