* Automatically generate electionID from the fullname or use the set value. * Updated the chart readme to include the new empty default. * Rebuilt the Helm readme with helm-docs.
This commit is contained in:
parent
499dbf57af
commit
249780737c
5 changed files with 16 additions and 6 deletions
|
@ -291,7 +291,7 @@ Kubernetes: `>=1.20.0-0`
|
||||||
| controller.customTemplate.configMapName | string | `""` | |
|
| controller.customTemplate.configMapName | string | `""` | |
|
||||||
| controller.dnsConfig | object | `{}` | Optionally customize the pod dnsConfig. |
|
| controller.dnsConfig | object | `{}` | Optionally customize the pod dnsConfig. |
|
||||||
| controller.dnsPolicy | string | `"ClusterFirst"` | Optionally change this to ClusterFirstWithHostNet in case you have 'hostNetwork: true'. By default, while using host network, name resolution uses the host's DNS. If you wish nginx-controller to keep resolving names inside the k8s network, use ClusterFirstWithHostNet. |
|
| controller.dnsPolicy | string | `"ClusterFirst"` | Optionally change this to ClusterFirstWithHostNet in case you have 'hostNetwork: true'. By default, while using host network, name resolution uses the host's DNS. If you wish nginx-controller to keep resolving names inside the k8s network, use ClusterFirstWithHostNet. |
|
||||||
| controller.electionID | string | `"ingress-controller-leader"` | Election ID to use for status update |
|
| controller.electionID | string | `""` | Election ID to use for status update, by default it uses the controller name combined with a suffix of 'leader' |
|
||||||
| controller.enableMimalloc | bool | `true` | Enable mimalloc as a drop-in replacement for malloc. # ref: https://github.com/microsoft/mimalloc # |
|
| controller.enableMimalloc | bool | `true` | Enable mimalloc as a drop-in replacement for malloc. # ref: https://github.com/microsoft/mimalloc # |
|
||||||
| controller.existingPsp | string | `""` | Use an existing PSP instead of creating one |
|
| controller.existingPsp | string | `""` | Use an existing PSP instead of creating one |
|
||||||
| controller.extraArgs | object | `{}` | Additional command line arguments to pass to nginx-ingress-controller E.g. to specify the default SSL certificate you can use |
|
| controller.extraArgs | object | `{}` | Additional command line arguments to pass to nginx-ingress-controller E.g. to specify the default SSL certificate you can use |
|
||||||
|
|
|
@ -85,6 +85,16 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
|
||||||
{{- printf "%s-%s" (include "ingress-nginx.fullname" .) .Values.controller.name | trunc 63 | trimSuffix "-" -}}
|
{{- printf "%s-%s" (include "ingress-nginx.fullname" .) .Values.controller.name | trunc 63 | trimSuffix "-" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Construct a unique electionID.
|
||||||
|
Users can provide an override for an explicit electionID if they want via `.Values.controller.electionID`
|
||||||
|
*/}}
|
||||||
|
{{- define "ingress-nginx.controller.electionID" -}}
|
||||||
|
{{- $defElectionID := printf "%s-leader" (include "ingress-nginx.fullname" .) -}}
|
||||||
|
{{- $electionID := default $defElectionID .Values.controller.electionID -}}
|
||||||
|
{{- print $electionID -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
Construct the path for the publish-service.
|
Construct the path for the publish-service.
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
- --publish-service={{ template "ingress-nginx.controller.publishServicePath" . }}-internal
|
- --publish-service={{ template "ingress-nginx.controller.publishServicePath" . }}-internal
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
- --election-id={{ .Values.controller.electionID }}
|
- --election-id={{ include "ingress-nginx.controller.electionID" . }}
|
||||||
- --controller-class={{ .Values.controller.ingressClassResource.controllerValue }}
|
- --controller-class={{ .Values.controller.ingressClassResource.controllerValue }}
|
||||||
{{- if .Values.controller.ingressClass }}
|
{{- if .Values.controller.ingressClass }}
|
||||||
- --ingress-class={{ .Values.controller.ingressClass }}
|
- --ingress-class={{ .Values.controller.ingressClass }}
|
||||||
|
|
|
@ -68,7 +68,7 @@ rules:
|
||||||
resources:
|
resources:
|
||||||
- configmaps
|
- configmaps
|
||||||
resourceNames:
|
resourceNames:
|
||||||
- {{ .Values.controller.electionID }}
|
- {{ include "ingress-nginx.controller.electionID" . }}
|
||||||
verbs:
|
verbs:
|
||||||
- get
|
- get
|
||||||
- update
|
- update
|
||||||
|
@ -83,7 +83,7 @@ rules:
|
||||||
resources:
|
resources:
|
||||||
- leases
|
- leases
|
||||||
resourceNames:
|
resourceNames:
|
||||||
- {{ .Values.controller.electionID }}
|
- {{ include "ingress-nginx.controller.electionID" . }}
|
||||||
verbs:
|
verbs:
|
||||||
- get
|
- get
|
||||||
- update
|
- update
|
||||||
|
|
|
@ -99,8 +99,8 @@ controller:
|
||||||
# -- 'hostPort' https port
|
# -- 'hostPort' https port
|
||||||
https: 443
|
https: 443
|
||||||
|
|
||||||
# -- Election ID to use for status update
|
# -- Election ID to use for status update, by default it uses the controller name combined with a suffix of 'leader'
|
||||||
electionID: ingress-controller-leader
|
electionID: ""
|
||||||
|
|
||||||
## This section refers to the creation of the IngressClass resource
|
## This section refers to the creation of the IngressClass resource
|
||||||
## IngressClass resources are supported since k8s >= 1.18 and required since k8s >= 1.19
|
## IngressClass resources are supported since k8s >= 1.18 and required since k8s >= 1.19
|
||||||
|
|
Loading…
Reference in a new issue