Skip to content

Commit ef6872b

Browse files
authored
Merge pull request #284 from openziti/controller-mgmt-alt-ingress
add alt ingress for mgmt api
2 parents aada251 + a18a0d3 commit ef6872b

File tree

3 files changed

+58
-1
lines changed

3 files changed

+58
-1
lines changed

charts/ziti-controller/README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,15 @@ For more information, please check [here](https://openziti.io/docs/learn/core-co
288288
| image.tag | string | `""` | override the container image tag specified in the chart |
289289
| ingress-nginx.controller.extraArgs.enable-ssl-passthrough | string | `"true"` | configure subchart ingress-nginx to enable the pass-through TLS feature |
290290
| ingress-nginx.enabled | bool | `false` | install the ingress-nginx subchart |
291-
| managementApi | object | `{"advertisedHost":"{{ .Values.clientApi.advertisedHost }}","advertisedPort":"{{ .Values.clientApi.advertisedPort }}","containerPort":"{{ .Values.clientApi.containerPort }}","dnsNames":[],"ingress":{"annotations":{},"enabled":false,"ingressClassName":"","labels":{},"tls":{}},"service":{"enabled":false,"type":"ClusterIP"}}` | by default, there's no need for a separate cluster service, ingress, or load balancer for the management API because it shares a TLS listener with the client API, and is reachable at the same address and presents the same web identity cert; you may configure a separate service, ingress, load balancer, etc. for the management API by setting managementApi.service.enabled=true |
291+
| managementApi | object | `{"advertisedHost":"{{ .Values.clientApi.advertisedHost }}","advertisedPort":"{{ .Values.clientApi.advertisedPort }}","altIngress":{"advertisedHost":"","annotations":{},"enabled":false,"ingressClassName":"","labels":{},"tls":{}},"containerPort":"{{ .Values.clientApi.containerPort }}","dnsNames":[],"ingress":{"annotations":{},"enabled":false,"ingressClassName":"","labels":{},"tls":{}},"service":{"enabled":false,"type":"ClusterIP"}}` | by default, there's no need for a separate cluster service, ingress, or load balancer for the management API because it shares a TLS listener with the client API, and is reachable at the same address and presents the same web identity cert; you may configure a separate service, ingress, load balancer, etc. for the management API by setting managementApi.service.enabled=true |
292292
| managementApi.advertisedHost | string | `"{{ .Values.clientApi.advertisedHost }}"` | global DNS name by which routers can resolve a reachable IP for this service |
293293
| managementApi.advertisedPort | string | `"{{ .Values.clientApi.advertisedPort }}"` | cluster service, node port, load balancer, and ingress port |
294+
| managementApi.altIngress.advertisedHost | string | `""` | alternative ingress host, e.g., ziti.example.com; must be distinct from managementApi.advertisedHost and all other advertised names |
295+
| managementApi.altIngress.annotations | object | `{}` | ingress annotations, e.g., to configure ingress-nginx |
296+
| managementApi.altIngress.enabled | bool | `false` | create an ingress for the client API's ClusterIP service with a trusted certificate, e.g., for BrowZer, ZAC |
297+
| managementApi.altIngress.ingressClassName | string | `""` | ingress class name, e.g., "nginx" |
298+
| managementApi.altIngress.labels | object | `{}` | ingress labels |
299+
| managementApi.altIngress.tls | object | `{}` | deprecated: tls passthrough is required; configure an alternative certificate to project into the container in webBindingPki.altServerCerts |
294300
| managementApi.containerPort | string | `"{{ .Values.clientApi.containerPort }}"` | cluster service target port on the container |
295301
| managementApi.dnsNames | list | `[]` | additional DNS SANs |
296302
| managementApi.ingress.annotations | object | `{}` | ingress annotations, e.g., to configure ingress-nginx |

charts/ziti-controller/templates/ingress.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,42 @@ spec:
110110
number: {{ .Values.clientApi.advertisedPort }}
111111
{{- end }}
112112

113+
{{- if .Values.managementApi.altIngress.enabled }}
114+
---
115+
apiVersion: networking.k8s.io/v1
116+
kind: Ingress
117+
metadata:
118+
name: {{ include "ziti-controller.fullname" . }}-alt-mgmt
119+
labels:
120+
{{- include "ziti-controller.labels" . | nindent 4 }}
121+
{{- with .Values.managementApi.altIngress.labels }}
122+
{{- toYaml . | nindent 4 }}
123+
{{- end }}
124+
{{- with .Values.managementApi.altIngress.annotations }}
125+
annotations:
126+
{{ toYaml . | nindent 4 }}
127+
{{- end }}
128+
spec:
129+
{{- if .Values.managementApi.altIngress.ingressClassName }}
130+
ingressClassName: {{ .Values.managementApi.altIngress.ingressClassName }}
131+
{{- end }}
132+
{{- if .Values.managementApi.altIngress.tls }}
133+
tls:
134+
{{- toYaml .Values.managementApi.altIngress.tls | nindent 4 }}
135+
{{- end }}
136+
rules:
137+
- host: {{ .Values.managementApi.altIngress.advertisedHost }}
138+
http:
139+
paths:
140+
- path: /
141+
pathType: Prefix
142+
backend:
143+
service:
144+
name: {{ include "ziti-controller.fullname" . }}-mgmt
145+
port:
146+
number: {{ .Values.managementApi.advertisedPort }}
147+
{{- end }}
148+
113149
{{- if .Values.managementApi.ingress.enabled }}
114150
---
115151
apiVersion: networking.k8s.io/v1

charts/ziti-controller/values.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,21 @@ managementApi:
7373
annotations: {}
7474
# -- deprecated: tls passthrough is required
7575
tls: {}
76+
altIngress:
77+
# -- create an ingress for the client API's ClusterIP service with a trusted certificate, e.g., for BrowZer, ZAC
78+
enabled: false
79+
# -- alternative ingress host, e.g., ziti.example.com; must be distinct from managementApi.advertisedHost and all
80+
# other advertised names
81+
advertisedHost: ""
82+
# -- ingress class name, e.g., "nginx"
83+
ingressClassName: ""
84+
# -- ingress labels
85+
labels: {}
86+
# -- ingress annotations, e.g., to configure ingress-nginx
87+
annotations: {}
88+
# -- deprecated: tls passthrough is required; configure an alternative
89+
# certificate to project into the container in webBindingPki.altServerCerts
90+
tls: {}
7691
# -- additional DNS SANs
7792
dnsNames: []
7893

0 commit comments

Comments
 (0)