diff --git a/standard-app/Chart.yaml b/standard-app/Chart.yaml index e7b6f5c..9434b66 100644 --- a/standard-app/Chart.yaml +++ b/standard-app/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: standard-app description: A Helm chart library by Cloudkite type: application -version: 0.4.8 +version: 0.4.9 maintainters: - email: hello@cloudkite.io name: cloudkite diff --git a/standard-app/example.values.yaml b/standard-app/example.values.yaml index 3a0c982..e4cb156 100644 --- a/standard-app/example.values.yaml +++ b/standard-app/example.values.yaml @@ -12,6 +12,20 @@ ingress: cert-manager.io/cluster-issuer: letsencrypt-prod nginx.ingress.kubernetes.io/configuration-snippet: | rewrite ^(/api)(.*) $2 break; + # hostPaths: + # - host: "my.domain.name.com" + # servicePort: 3000 + # serviceName: cloudkite-app-1 + # path: "/" + # - host: "my-other.domain.name.com" + # servicePort: 3000 + # serviceName: cloudkite-app-1 + # path: "/someprefix" + # tls: + # - secretName: my-domain-name-com-tls + # hosts: + # - "my.domain.name.com" + # - "my-other.domain.name.com" hosts: - test.dev.someorg.com - other.domain.name.com diff --git a/standard-app/templates/network/ingress.yaml b/standard-app/templates/network/ingress.yaml index 58b4f2f..5189d52 100644 --- a/standard-app/templates/network/ingress.yaml +++ b/standard-app/templates/network/ingress.yaml @@ -16,6 +16,20 @@ metadata: spec: ingressClassName: {{ .Values.ingress.className | default "nginx" }} rules: + {{- if .Values.ingress.hostPaths }} + {{- range .Values.ingress.hostPaths }} + - host: {{ .host | quote }} + http: + paths: + - path: {{ .path }} + pathType: Prefix + backend: + service: + name: {{ .serviceName }} + port: + number: {{ .servicePort }} + {{- end }} + {{- else if .Values.ingress.hosts }} {{- range .Values.ingress.hosts }} - host: {{ . | quote }} http: @@ -30,6 +44,7 @@ spec: number: {{ .servicePort }} {{- end }} {{- end }} + {{- end }} tls: {{- if .Values.ingress.tls }} {{- toYaml .Values.ingress.tls | nindent 4 }}