8000 Support TransportServer in Helm · nginx/kubernetes-ingress@75e4970 · GitHub
[go: up one dir, main page]

Skip to content

Commit 75e4970

Browse files
committed
Support TransportServer in Helm
* Register TransportServer CRD * Add controller.enableTLSPassthrough parameter
1 parent c16942b commit 75e4970

File tree

7 files changed

+93
-0
lines changed

7 files changed

+93
-0
lines changed

deployments/helm-chart/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ Parameter | Description | Default
146146
`controller.useIngressClassOnly` | Ignore Ingress resources without the `"kubernetes.io/ingress.class"` annotation. | false
147147
`controller.watchNamespace` | Namespace to watch for Ingress resources. By default the Ingress controller watches all namespaces. | ""
148148
`controller.enableCustomResources` | Enable the custom resources. | true
149+
`controller.enableTLSPassthrough` | Enable TLS Passthrough on port 443. Requires `controller.enableCustomResources`. | false
149150
`controller.healthStatus` | Add a location "/nginx-health" to the default server. The location responds with the 200 status code for any request. Useful for external health-checking of the Ingress controller. | false
150151
`controller.healthStatusURI` | Sets the URI of health status location in the default server. Requires `contoller.healthStatus`. | "/nginx-health"
151152
`controller.nginxStatus.enable` | Enable the NGINX stub_status, or the NGINX Plus API. | true

deployments/helm-chart/templates/controller-daemonset.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,4 +128,7 @@ spec:
128128
- -enable-prometheus-metrics={{ .Values.prometheus.create }}
129129
- -prometheus-metrics-listen-port={{ .Values.prometheus.port }}
130130
- -enable-custom-resources={{ .Values.controller.enableCustomResources }}
131+
{{- if .Values.controller.enableCustomResources }}
132+
- -enable-tls-passthrough={{ .Values.controller.enableTLSPassthrough }}
133+
{{- end }}
131134
{{- end }}

deployments/helm-chart/templates/controller-deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,4 +126,7 @@ spec:
126126
- -enable-prometheus-metrics={{ .Values.prometheus.create }}
127127
- -prometheus-metrics-listen-port={{ .Values.prometheus.port }}
128128
- -enable-custom-resources={{ .Values.controller.enableCustomResources }}
129+
{{- if .Values.controller.enableCustomResources }}
130+
- -enable-tls-passthrough={{ .Values.controller.enableTLSPassthrough }}
131+
{{- end }}
129132
{{- end }}
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{{- if .Values.controller.enableCustomResources }}
2+
apiVersion: apiextensions.k8s.io/v1beta1
3+
kind: CustomResourceDefinition
4+
metadata:
5+
name: transportservers.k8s.nginx.org
6+
labels:
7+
{{- include "nginx-ingress.labels" . | nindent 4 }}
8+
spec:
9+
group: k8s.nginx.org
10+
versions:
11+
- name: v1alpha1
12+
served: true
13+
storage: true
14+
scope: Namespaced
15+
names:
16+
plural: transportservers
17+
singular: transportserver
18+
kind: TransportServer
19+
shortNames:
20+
- ts
21+
preserveUnknownFields: false
22+
validation:
23+
openAPIV3Schema:
24+
description: TransportServer defines the TransportServer resource.
25+
type: object
26+
properties:
27+
apiVersion:
28+
description: 'APIVersion defines the versioned schema of this representation
29+
of an object. Servers should convert recognized schemas to the latest
30+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
31+
type: string
32+
kind:
33+
description: 'Kind is a string value representing the REST resource this
34+
object represents. Servers may infer this from the endpoint the client
35+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
36+
type: string
37+
metadata:
38+
type: object
39+
spec:
40+
description: TransportServerSpec is the spec of the TransportServer resource.
41+
type: object
42+
properties:
43+
action:
44+
description: Action defines an action.
45+
type: object
46+
properties:
47+
pass:
48+
type: string
49+
host:
50+
type: string
51+
listener:
52+
description: TransportServerListener defines a listener for a TransportServer.
53+
type: object
54+
properties:
55+
name:
56+
type: string
57+
protocol:
58+
type: string
59+
upstreamParameters:
60+
description: UpstreamParameters defines parameters for an upstream.
61+
type: object
62+
properties:
63+
udpRequests:
64+
type: integer
65+
udpResponses:
66+
type: integer
67+
upstreams:
68+
type: array
69+
items:
70+
description: Upstream defines an upstream.
71+
type: object
72+
properties:
73+
name:
74+
type: string
75+
port:
76+
type: integer
77+
service:
78+
type: string
79+
{{- end }}

deployments/helm-chart/templates/rbac.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ rules:
7171
resources:
7272
- virtualservers
7373
- virtualserverroutes
74+
- transportservers
7475
verbs:
7576
- list
7677
- watch

deployments/helm-chart/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ controller:
118118
## Enable the custom resources.
119119
enableCustomResources: true
120120

121+
## Enable TLS Passthrough on port 443. Requires controller.enableCustomResources.
122+
enableTLSPassthrough: false
123+
121124
## Add a location based on the value of health-status-uri to the default server. The location responds with the 200 status code for any request.
122125
## Useful for external health-checking of the Ingress controller.
123126
healthStatus: false

docs-web/installation/installation-with-helm.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,9 @@ The following tables lists the configurable parameters of the NGINX Ingress cont
208208
* - ``controller.enableCustomResources``
209209
- Enable the custom resources.
210210
- true
211+
* - ``controller.enableTLSPassthrough``
212+
- Enable TLS Passthrough on port 443. Requires ``controller.enableCustomResources``.
213+
- false
211214
* - ``controller.healthStatus``
212215
- Add a location "/nginx-health" to the default server. The location responds with the 200 status code for any request. Useful for external health-checking of the Ingress controller.
213216
- false

0 commit comments

Comments
 (0)
0