Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for custom annotations in configmaps #1003

Merged
merged 2 commits into from
Jul 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions deployments/helm-chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ Parameter | Description | Default
`controller.image.tag` | The tag of the Ingress controller image. | edge
`controller.image.pullPolicy` | The pull policy for the Ingress controller image. | IfNotPresent
`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. | {}
`controller.customPorts` | A list of custom ports to expose on the NGINX ingress controller pod. Follows the conventional Kubernetes yaml syntax for container ports. | []
`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.
Expand Down Expand Up @@ -176,6 +177,7 @@ Parameter | Description | Default
`controller.reportIngressStatus.externalService` | Specifies the name of the service with the type LoadBalancer through which the Ingress controller is exposed externally. The external address of the service is used when reporting the status of Ingress resources. `controller.reportIngressStatus.enable` must be set to `true`. The default is autogenerated and enabled when `controller.service.create` is set to `true` and `controller.service.type` is set to `LoadBalancer`. | Autogenerated
`controller.reportIngressStatus.enableLeaderElection` | Enable Leader election to avoid multiple replicas of the controller reporting the status of Ingress resources. `controller.reportIngressStatus.enable` must be set to `true`. | true
`controller.reportIngressStatus.leaderElectionLockName` | Specifies the name of the ConfigMap, within the same namespace as the controller, used as the lock for leader election. controller.reportIngressStatus.enableLeaderElection must be set to true. | Autogenerated
`controller.reportIngressStatus.annotations` | The annotations of the leader election configmap. | {}
`controller.pod.annotations` | The annotations of the Ingress Controller pod. | {}
`rbac.create` | Configures RBAC. | true
`prometheus.create` | Expose NGINX or NGINX Plus metrics in the Prometheus format. | false
Expand Down
4 changes: 4 additions & 0 deletions deployments/helm-chart/templates/controller-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
{{- include "nginx-ingress.labels" . | nindent 4 }}
{{- if .Values.controller.config.annotations }}
annotations:
{{ toYaml .Values.controller.config.annotations | indent 4 }}
{{- end }}
data:
{{- if .Values.controller.config.entries }}
{{ toYaml .Values.controller.config.entries | indent 2 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
{{- include "nginx-ingress.labels" . | nindent 4 }}
{{- if .Values.controller.reportIngressStatus.annotations }}
Rulox marked this conversation as resolved.
Show resolved Hide resolved
annotations:
{{ toYaml .Values.controller.reportIngressStatus.annotations | indent 4 }}
{{- end }}
6 changes: 6 additions & 0 deletions deployments/helm-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ controller:
## Autogenerated if not set or set to "".
# name: nginx-config

## The annotations of the Ingress Controller configmap.
annotations: {}

## The entries of the ConfigMap for customizing NGINX configuration.
entries: {}

Expand Down Expand Up @@ -220,6 +223,9 @@ controller:
## Autogenerated if not set or set to "".
# leaderElectionLockName: "nginx-ingress-leader-election"

## The annotations of the leader election configmap.
annotations: {}

pod:
## The annotations of the Ingress Controller pod.
annotations: {}
Expand Down