Skip to content

Commit b3f0f60

Browse files
authored
Merge pull request #296 from nginxinc/helm-improvements
Improve Helm Chart
2 parents 5f16c3e + adfa0fb commit b3f0f60

13 files changed

+292
-72
lines changed

helm-chart/Chart.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
name: nginx-ingress
2-
version: 0.0.1
3-
appVersion: 0.0.1
2+
version: 0.1.0
3+
appVersion: 1.2.0
44
description: NGINX Ingress Controller
5-
sources:
5+
sources:
66
- https://github.com/nginxinc/kubernetes-ingress/tree/master/helm-chart
77
keywords:
88
- ingress
99
- nginx
1010
maintainers:
1111
- name: Damian Curry
1212
13+
- name: Dean Coakley
14+
1315

helm-chart/README.md

Lines changed: 50 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,48 @@
22

33
## Introduction
44

5-
This chart deploys the NGINX Ingress controller in your Kubernetes cluster.
5+
This chart deploys the NGINX Ingress controller in your Kubernetes cluster.
66

77
## Prerequisites
88

99
- Kubernetes 1.6+.
10-
- If you’d like to use NGINX Plus, you need to build your own Docker image and push it to your private registry by following the instructions from [here](../nginx-controller/README.md).
10+
- Helm 2.8.x+.
11+
- Git.
12+
- If you’d like to use NGINX Plus:
13+
- Build an Ingress controller image with NGINX Plus and push it to your private registry by following the instructions from [here](../nginx-controller/README.md).
14+
- Update the `controller.image.repository` field of the `values-plus.yaml` accordingly.
1115

1216
## Installing the Chart
1317

14-
To install the chart with the release name my-release:
18+
1. Clone the Ingress controller repo:
19+
```
20+
$ git clone [email protected]:nginxinc/kubernetes-ingress.git
21+
```
22+
2. Change your working directory to /helm-chart:
23+
```
24+
$ cd kubernetes-ingress/helm-chart
25+
```
26+
3. To install the chart with the release name my-release (my-release is the name that you choose):
1527
16-
For NGINX:
17-
```console
18-
$ git clone [email protected]:nginxinc/kubernetes-ingress.git
19-
$ helm install --name my-release kubernetes-ingress/helm-chart/
20-
```
28+
For NGINX:
29+
```
30+
$ helm install --name my-release .
31+
```
2132
22-
For NGINX Plus:
23-
```console
24-
$ git clone [email protected]:nginxinc/kubernetes-ingress.git
25-
$ helm install --name my-release -f kubernetes-ingress/helm-chart/values-plus.yaml kubernetes-ingress/helm-chart/
26-
```
33+
For NGINX Plus:
34+
```
35+
$ helm install --name my-release -f values-plus.yaml .
36+
```
2737
28-
The command deploys the Ingress controller in your Kubernetes cluster in the default configuration. The configuration section lists the parameters that can be configured during installation.
38+
The command deploys the Ingress controller in your Kubernetes cluster in the default configuration. The configuration section lists the parameters that can be configured during installation.
2939
30-
> **Tip**: List all releases using helm list
40+
When deploying the Ingress controller, make sure to use your own TLS certificate and key for the default server rather than the default pre-generated ones. Read the [Configuration](#Configuration) section below to see how to configure a TLS certificate and key for the default server. Note that the default server returns the Not Found page with the 404 status code for all requests for domains for which there are no Ingress rules defined.
41+
42+
> **Tip**: List all releases using `helm list`
3143
3244
## Uninstalling the Chart
3345
34-
To uninstall/delete the my-release
46+
To uninstall/delete the release `my-release`
3547
3648
```console
3749
$ helm delete my-release
@@ -47,23 +59,31 @@ Parameter | Description | Default
4759
--- | --- | ---
4860
`controller.name` | The name of the Ingress controller daemon set or deployment. | nginx-ingress
4961
`controller.kind` | The kind of the Ingress controller installation - deployment or daemonset. | deployment
50-
`controller.nginxplus` | Should NGINX Plus be deployed. | false
51-
`controller.hostNetwork` | If the nginx deployment / daemonset should run on the host's network namespace. | false
62+
`controller.nginxplus` | Deploys the Ingress controller for NGINX Plus. | false
63+
`controller.hostNetwork` | Enables the Ingress controller pods to use the host's network namespace. | false
5264
`controller.image.repository` | The image repository of the Ingress controller. | nginx/nginx-ingress
5365
`controller.image.tag` | The tag of the Ingress controller image. | 1.2.0
5466
`controller.image.pullPolicy` | The pull policy for the Ingress controller image. | IfNotPresent
5567
`controller.config.entries` | The entries of the ConfigMap for customizing NGINX configuration. | { }
56-
`controller.defaultTLS.cert` | The TLS certificate for the default HTTPS server. | None
57-
`controller.defaultTLS.key` | The TLS key for the default HTTPS server. | None
58-
`controller.nodeselector` | The node selectorlabels for pod assignment for the Ingress controller pods. | { }
68+
`controller.defaultTLS.cert` | The base64-encoded TLS certificate for the default HTTPS server. If not specified, a pre-generated self-signed certificate is used. **Note:** It is recommended that you specify your own certificate. | A pre-generated self-signed certificate.
69+
`controller.defaultTLS.key` | The base64-encoded TLS key for the default HTTPS server. **Note:** If not specified, a pre-generated key is used. It is recommended that you specify your own key. | A pre-generated key.
70+
`controller.defaultTLS.secret` | The secret with a TLS certificate and key for the default HTTPS server. The value must follow the following format: `<namespace>/<name>`. Used as an alternative to specifiying a certifcate and key using `controller.defaultTLS.cert` and `controller.defaultTLS.key` parameters. | None
71+
`controller.nodeSelector` | The node selector for pod assignment for the Ingress controller pods. | { }
5972
`controller.terminationGracePeriodSeconds` | The termination grace period of the Ingress controller pod. | 30
60-
`controller.tolerations` | The tolerations required for the IBM Cloud Platform installation. | None
61-
62-
63-
64-
## Limitations
65-
66-
This is a preview version of our helm chart. It has limitations including support for cloud installations (except for the IBM Cloud Platform) and RBAC. This version is not suitable for using in production environments.
67-
68-
73+
`controller.tolerations` | The tolerations required for the IBM Cloud Private installation. | None
74+
`controller.replicaCount` | The number of replicas of the Ingress controller deployment. | 1
75+
`controller.service.create` | Creates a service to expose the Ingress controller pods. | true
76+
`controller.service.type` | The type of service to create for the Ingress controller. | LoadBalancer
77+
`controller.service.externalTrafficPolicy` | The externalTrafficPolicy of the service. The value Local preserves the client source IP. | Local
78+
`controller.service.annotations` | The annotations of the Ingress controller service. | {}
79+
`controller.serviceAccountName` | The serviceAccountName of the Ingress controller pods. Used for RBAC. | nginx-ingress
80+
`rbac.create` | Configures RBAC. | true
81+
82+
Example:
83+
```
84+
$ cd kubernetes-ingress/helm-chart
85+
$ helm install --name my-release . --set controller.replicaCount=5
86+
```
6987

88+
## Notes
89+
* The values-icp.yaml file is used for deploying the Ingress controller on IBM Cloud Private. See the [blog post](https://www.nginx.com/blog/nginx-ingress-controller-ibm-cloud-private/) for more details.

helm-chart/templates/NOTES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The NGINX Ingress Controller has been installed.

helm-chart/templates/controller-configmap.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ apiVersion: v1
22
kind: ConfigMap
33
metadata:
44
name: nginx-config
5+
labels:
6+
app: {{ .Values.controller.name | trunc 63 }}
7+
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
8+
heritage: {{ .Release.Service }}
9+
release: {{ .Release.Name }}
510
data:
611
{{- if .Values.controller.config.entries }}
712
{{ toYaml .Values.controller.config.entries | indent 2 }}

helm-chart/templates/controller-daemonset.yaml

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,26 @@
22
apiVersion: extensions/v1beta1
33
kind: DaemonSet
44
metadata:
5-
name: {{ .Values.controller.name }}
5+
name: {{ .Values.controller.name | trunc 63 }}
6+
labels:
7+
app: {{ .Values.controller.name | trunc 63 }}
8+
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
9+
heritage: {{ .Release.Service }}
10+
release: {{ .Release.Name }}
611
spec:
7-
selector:
8-
matchLabels:
9-
app: nginx-ingress
12+
selector:
13+
matchLabels:
14+
app: {{ .Values.controller.name | trunc 63 }}
1015
template:
1116
metadata:
1217
labels:
13-
app: nginx-ingress
18+
app: {{ .Values.controller.name | trunc 63 }}
1419
spec:
1520
{{- if .Values.controller.serviceAccountName }}
1621
serviceAccountName: {{ .Values.controller.serviceAccountName }}
1722
{{- end }}
18-
terminationGracePeriodSeconds: {{ .Values.controller.terminationGracePeriodSeconds | default 30 }}
19-
{{- if .Values.controller.nodeselector }}
23+
terminationGracePeriodSeconds: {{ .Values.controller.terminationGracePeriodSeconds }}
24+
{{- if .Values.controller.nodeSelector }}
2025
nodeSelector:
2126
{{ toYaml .Values.controller.nodeSelector | indent 8 }}
2227
{{- end }}
@@ -30,7 +35,7 @@ spec:
3035
{{- end }}
3136
hostNetwork: {{ .Values.controller.hostNetwork }}
3237
containers:
33-
- name: {{ .Values.controller.name }}
38+
- name: {{ .Values.controller.name | trunc 63 }}
3439
image: "{{ .Values.controller.image.repository }}:{{ .Values.controller.image.tag }}"
3540
imagePullPolicy: "{{ .Values.controller.image.pullPolicy }}"
3641
ports:
@@ -46,9 +51,25 @@ spec:
4651
fieldRef:
4752
fieldPath: metadata.namespace
4853
args:
49-
{{- if eq .Values.controller.nginxplus "true" }}
54+
{{- if .Values.controller.nginxplus }}
5055
- -nginx-plus
5156
{{- end }}
5257
- -nginx-configmaps=$(POD_NAMESPACE)/nginx-config
58+
{{- if .Values.controller.defaultTLS.secret }}
59+
- -default-server-tls-secret={{ .Values.controller.defaultTLS.secret }}
60+
{{ else }}
5361
- -default-server-tls-secret=$(POD_NAMESPACE)/default-server-secret
54-
{{- end }}
62+
{{- end }}
63+
{{- if .Values.controller.ingressClass }}
64+
- -ingress-class={{ .Values.controller.ingressClass }}
65+
{{- end }}
66+
{{- if .Values.controller.useIngressClassOnly }}
67+
- -use-ingress-class-only={{ .Values.controller.useIngressClassOnly }}
68+
{{- end }}
69+
{{- if .Values.controller.watchNamespace }}
70+
- -watch-namespace={{ .Values.controller.watchNamespace }}
71+
{{- end }}
72+
{{- if .Values.controller.healthStatus }}
73+
- -health-status
74+
{{- end }}
75+
{{- end }}

helm-chart/templates/controller-deployment.yaml

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,29 @@
22
apiVersion: extensions/v1beta1
33
kind: Deployment
44
metadata:
5-
name: {{ .Values.controller.name }}
5+
name: {{ .Values.controller.name | trunc 63 }}
6+
labels:
7+
app: {{ .Values.controller.name | trunc 63 }}
8+
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
9+
heritage: {{ .Release.Service }}
10+
release: {{ .Release.Name }}
611
spec:
7-
replicas: {{ .Values.controller.replicacount | default 1 }}
12+
replicas: {{ .Values.controller.replicaCount }}
813
selector:
914
matchLabels:
10-
app: nginx-ingress
15+
app: {{ .Values.controller.name | trunc 63 }}
1116
template:
1217
metadata:
1318
labels:
14-
app: nginx-ingress
19+
app: {{ .Values.controller.name | trunc 63 }}
1520
spec:
1621
{{- if .Values.controller.serviceAccountName }}
1722
serviceAccountName: {{ .Values.controller.serviceAccountName }}
1823
{{- end }}
1924
hostNetwork: {{ .Values.controller.hostNetwork }}
2025
containers:
2126
- image: "{{ .Values.controller.image.repository }}:{{ .Values.controller.image.tag }}"
22-
name: {{ .Values.controller.name }}
27+
name: {{ .Values.controller.name | trunc 63 }}
2328
imagePullPolicy: "{{ .Values.controller.image.pullPolicy }}"
2429
ports:
2530
- name: http
@@ -32,9 +37,25 @@ spec:
3237
fieldRef:
3338
fieldPath: metadata.namespace
3439
args:
35-
{{- if eq .Values.controller.nginxplus "true" }}
40+
{{- if .Values.controller.nginxplus }}
3641
- -nginx-plus
3742
{{- end }}
3843
- -nginx-configmaps=$(POD_NAMESPACE)/nginx-config
44+
{{- if .Values.controller.defaultTLS.secret }}
45+
- -default-server-tls-secret={{ .Values.controller.defaultTLS.secret }}
46+
{{ else }}
3947
- -default-server-tls-secret=$(POD_NAMESPACE)/default-server-secret
40-
{{- end }}
48+
{{- end }}
49+
{{- if .Values.controller.ingressClass }}
50+
- -ingress-class={{ .Values.controller.ingressClass }}
51+
{{- end }}
52+
{{- if .Values.controller.useIngressClassOnly }}
53+
- -use-ingress-class-only={{ .Values.controller.useIngressClassOnly }}
54+
{{- end }}
55+
{{- if .Values.controller.watchNamespace }}
56+
- -watch-namespace={{ .Values.controller.watchNamespace }}
57+
{{- end }}
58+
{{- if .Values.controller.healthStatus }}
59+
- -health-status
60+
{{- end }}
61+
{{- end }}
Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1+
{{ if not .Values.controller.defaultTLS.secret }}
12
apiVersion: v1
23
kind: Secret
34
metadata:
45
name: default-server-secret
6+
labels:
7+
app: {{ .Values.controller.name | trunc 63 }}
8+
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
9+
heritage: {{ .Release.Service }}
10+
release: {{ .Release.Name }}
511
type: Opaque
612
data:
7-
tls.crt: {{ .Values.controller.defaultTLS.cert | default "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURTVENDQWpHZ0F3SUJBZ0lKQUs5L2NDNWZocDJHTUEwR0NTcUdTSWIzRFFFQkJRVUFNQ0V4SHpBZEJnTlYKQkFNVEZrNUhTVTVZU1c1bmNtVnpjME52Ym5SeWIyeHNaWEl3SGhjTk1UY3dPRE14TVRBeE16UTRXaGNOTVRndwpPRE14TVRBeE16UTRXakFoTVI4d0hRWURWUVFERXhaT1IwbE9XRWx1WjNKbGMzTkRiMjUwY205c2JHVnlNSUlCCklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUF0bXhhMDhadExIaWxleWhOUWN5OUl4ankKWTBYdy9CRmZvM3duMDRsSXRoaGRxbkZ3NTZIVG1RVjIvbnEyRUxMdTNoejNjc3Urc3M5WFEzL3BrbXVwTEE5TApuaVVRZFVNcER4VlE1VFFKRW5CanJ5aXc4RWFlcEp4NUNCYVB5V3ZSZkpPb0pFSW56ZmNaYnE4OEVmQklYOHdtClFCa0xlcnFTVmRYWjBXR3FINVVQVlVZMVBqZXBqSXAyZ0NvbDRMUjM1aHRlSk9OMmZVTEF6cmRGMDBDT092WGsKUzgwRGw5eHdoUkVwVWVySGNuNXZod3BJazNkY3FNS3BxWTY2elF3dStMcFJEM3ZVWjR0eC9VYnlUdStkMkdhVwpWaG1RLy85RmtzUzVBS1d2ZXkrK3pPUTFDZTAxNzhDU0hRYXRDaWFuU2lTT3lwakZtTUZ0N1Mra25pbm9Xd0lECkFRQUJvNEdETUlHQU1CMEdBMVVkRGdRV0JCUlFUODVHRzV6a0QxV3FNSzZvOW8xWWFqUVBXVEJSQmdOVkhTTUUKU2pCSWd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RTM3aml0SUFRd3BHL3FiamQ3Y1ZaR2hlUkQyK3l4ClptTWU3c1BCZEVmcldmK1REYU9lT3B4L2RRcnFyTEc2UXo1ZHlQbXBBb0dBVmsyZ0VnU01wY0RjY253TzRtaXIKWW1zb2VpK0RhQXpISmZxc0JzWjJzNUd5REVteUxDWENDSzFua1FlSjVEV2xJOVZ1ZVRSZldkMHhzNDdxbFRhaApHcWt1eW9zRklSbXpuTjF2RFRtZDNkR1BSTjhqRmF6SWxndWtjTlQ2WkNwbG5oU3QzTjFEbWNvTDl5eGRiSVk2ClZIN2FGcmhFQWpBWDBNSzZMTlNaRFhVQ2dZQlRYc3JWeTBBbFBTY1g2b25XUm9Xb1drZlhBb1lhbDdZZCtyakcKVkZoODhyUnlnNk9YRmFqQTdNSUNjVERXQWFjcFRGdGhGaUtDWHV5Z3BjOXdpMEt2ZlErTU95SlpYRHBOZmNFcAo5OEtWbyt0ZzVQNlRnaXExUUpQNTArbUtqblBxMzhOR3R5UkZVZ2grS1BjWkZ2eUxkRzlwdjlLOCtNVnR5b2ZxCmJzRmhLUUtCZ0NvcEg5Wm95MjJBNStLcnJYZmQ0VXRBcndjN0dVanFUT1hhTzgyd3FpU0hZMndPTGdkWWw0L3kKSDJEYy9EMWxmWS9GL09sckNMZDNpL0lLc0wxNG13R2dxODZRdDhxeTIwcWw4RFNyWG91TmhsQTJmL1ZUTk1SMAp2OXAwU1JrQjI2UVYyUitndnNVYk9xb1lhMlVQVkNuQW9QeTYwTXlBaVJUR3cyeTExbm9lCi0tLS0tRU5EIFJTQSBQUklWQVRFIEtFWS0tLS0tCg==" }}
13+
tls.crt: {{ .Values.controller.defaultTLS.cert }}
14+
tls.key: {{ .Values.controller.defaultTLS.key }}
15+
{{- end }}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{{- if .Values.controller.service.create }}
2+
apiVersion: v1
3+
kind: Service
4+
metadata:
5+
name: nginx-ingress
6+
labels:
7+
app: {{ .Values.controller.name | trunc 63 }}
8+
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
9+
heritage: {{ .Release.Service }}
10+
release: {{ .Release.Name }}
11+
{{- if .Values.controller.service.annotations }}
12+
annotations:
13+
{{ toYaml .Values.controller.service.annotations | indent 4 }}
14+
{{- end }}
15+
spec:
16+
{{- if or (eq .Values.controller.service.type "LoadBalancer") (eq .Values.controller.service.type "NodePort") }}
17+
{{- if .Values.controller.service.externalTrafficPolicy }}
18+
externalTrafficPolicy: {{ .Values.controller.service.externalTrafficPolicy }}
19+
{{- end }}
20+
{{- end }}
21+
type: {{ .Values.controller.service.type }}
22+
ports:
23+
- port: 80
24+
targetPort: 80
25+
protocol: TCP
26+
name: http
27+
- port: 443
28+
targetPort: 443
29+
protocol: TCP
30+
name: https
31+
selector:
32+
app: {{ .Values.controller.name | trunc 63 }}
33+
{{- end }}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{{- if .Values.rbac.create }}
2+
apiVersion: v1
3+
kind: ServiceAccount
4+
metadata:
5+
name: {{ .Values.controller.serviceAccountName }}
6+
labels:
7+
app: {{ .Values.controller.name | trunc 63 }}
8+
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
9+
heritage: {{ .Release.Service }}
10+
release: {{ .Release.Name }}
11+
{{- end }}

0 commit comments

Comments
 (0)