Skip to content

Commit

Permalink
Add customConfigMap to helm charts (#3003)
Browse files Browse the repository at this point in the history
  • Loading branch information
coolbry95 authored Sep 21, 2022
1 parent 9316df6 commit d0a2e2e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions deployments/helm-chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ Parameter | Description | Default
`controller.image.tag` | The tag of the Ingress Controller image. | 2.3.0
`controller.image.pullPolicy` | The pull policy for the Ingress Controller image. | IfNotPresent
`controller.lifecycle` | The lifecycle of the Ingress Controller pods. | {}
`controller.customConfigMap` | The name of the custom ConfigMap used by the Ingress Controller. If set, then the default config is ignored. | ""
`controller.config.name` | The name of the ConfigMap used by the Ingress Controller. | Autogenerated
`controller.config.annotations` | The annotations of the Ingress Controller configmap. | {}
`controller.config.entries` | The entries of the ConfigMap for customizing NGINX configuration. See [ConfigMap resource docs](https://docs.nginx.com/nginx-ingress-controller/configuration/global-configuration/configmap-resource/) for the list of supported ConfigMap keys. | {}
Expand Down
4 changes: 4 additions & 0 deletions deployments/helm-chart/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@ app.kubernetes.io/instance: {{ .Release.Name }}
Expand the name of the configmap.
*/}}
{{- define "nginx-ingress.configName" -}}
{{- if .Values.controller.customConfigMap -}}
{{ .Values.controller.customConfigMap }}
{{- else -}}
{{- default (include "nginx-ingress.name" .) .Values.controller.config.name -}}
{{- end -}}
{{- end -}}

{{/*
Expand leader election lock name.
Expand Down
3 changes: 3 additions & 0 deletions deployments/helm-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ controller:
## The lifecycle of the Ingress Controller pods.
lifecycle: {}

## The custom ConfigMap to use instead of the one provided by default
customConfigMap: ""

config:
## The name of the ConfigMap used by the Ingress Controller.
## Autogenerated if not set or set to "".
Expand Down
1 change: 1 addition & 0 deletions docs/content/installation/installation-with-helm.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ The following tables lists the configurable parameters of the NGINX Ingress Cont
|``controller.image.tag`` | The tag of the Ingress Controller image. | 2.3.0 |
|``controller.image.pullPolicy`` | The pull policy for the Ingress Controller image. | IfNotPresent |
|``controller.lifecycle`` | The lifecycle of the Ingress Controller pods. | {} |
|``controller.customConfigMap`` | The name of the custom ConfigMap used by the Ingress Controller. If set, then the default config is ignored. | "" |
|``controller.config.name`` | The name of the ConfigMap used by the Ingress Controller. | Autogenerated |
|``controller.config.entries`` | The entries of the ConfigMap for customizing NGINX configuration. See [ConfigMap resource docs](/nginx-ingress-controller/configuration/global-configuration/configmap-resource/) for the list of supported ConfigMap keys. | {} |
|``controller.customPorts`` | A list of custom ports to expose on the NGINX ingress controller pod. Follows the conventional Kubernetes yaml syntax for container ports. | [] |
Expand Down

0 comments on commit d0a2e2e

Please sign in to comment.