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

Adding annotations support to helm chart configmaps #5178

Merged
merged 2 commits into from
Feb 26, 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
3 changes: 3 additions & 0 deletions charts/ingress-nginx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Parameter | Description | Default
`controller.containerPort.http` | The port that the controller container listens on for http connections. | `80`
`controller.containerPort.https` | The port that the controller container listens on for https connections. | `443`
`controller.config` | nginx [ConfigMap](https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/configmap.md) entries | none
`controller.configAnnotations` | annotations to be added to controller custom configuration configmap | `{}`
`controller.hostNetwork` | If the nginx deployment / daemonset should run on the host's network namespace. Do not set this when `controller.service.externalIPs` is set and `kube-proxy` is used as there will be a port-conflict for port `80` | false
`controller.defaultBackendService` | default 404 backend service; needed only if `defaultBackend.enabled = false` and version < 0.21.0| `""`
`controller.dnsPolicy` | If using `hostNetwork=true`, change to `ClusterFirstWithHostNet`. See [pod's dns policy](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy) for details | `ClusterFirst`
Expand Down Expand Up @@ -179,7 +180,9 @@ Parameter | Description | Default
`controller.updateStrategy` | allows setting of RollingUpdate strategy | `{}`
`controller.configMapNamespace` | The nginx-configmap namespace name | `""`
`controller.tcp.configMapNamespace` | The tcp-services-configmap namespace name | `""`
`controller.tcp.annotations` | annotations to be added to tcp configmap | `{}`
`controller.udp.configMapNamespace` | The udp-services-configmap namespace name | `""`
`controller.udp.annotations` | annotations to be added to udp configmap | `{}`
`defaultBackend.enabled` | Use default backend component | `true`
`defaultBackend.name` | name of the default backend component | `default-backend`
`defaultBackend.image.repository` | default backend container image repository | `k8s.gcr.io/defaultbackend-amd64`
Expand Down
2 changes: 2 additions & 0 deletions charts/ingress-nginx/templates/controller-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ metadata:
component: "{{ .Values.controller.name }}"
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
annotations:
{{ toYaml .Values.controller.configAnnotations | indent 4}}
name: {{ template "nginx-ingress.controller.fullname" . }}
data:
{{- if .Values.controller.addHeaders }}
Expand Down
2 changes: 2 additions & 0 deletions charts/ingress-nginx/templates/tcp-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ metadata:
component: "{{ .Values.controller.name }}"
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
annotations:
{{ toYaml .Values.controller.tcp.annotations | indent 4}}
name: {{ template "nginx-ingress.fullname" . }}-tcp
data:
{{ tpl (toYaml .Values.tcp) . | indent 2 }}
Expand Down
2 changes: 2 additions & 0 deletions charts/ingress-nginx/templates/udp-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ metadata:
component: "{{ .Values.controller.name }}"
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
annotations:
{{ toYaml .Values.controller.udp.annotations | indent 4}}
name: {{ template "nginx-ingress.fullname" . }}-udp
data:
{{ tpl (toYaml .Values.udp) . | indent 2 }}
Expand Down
12 changes: 10 additions & 2 deletions charts/ingress-nginx/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ controller:
# Will add custom configuration options to Nginx https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/
config: {}

## Annotations to be added to the controller config configuration configmap
##
configAnnotations: {}

# Will add custom headers before sending traffic to backends according to https://github.com/kubernetes/ingress-nginx/tree/master/docs/examples/customization/custom-headers
proxySetHeaders: {}

Expand Down Expand Up @@ -92,15 +96,19 @@ controller:
##
configMapNamespace: "" # defaults to .Release.Namespace

## Allows customization of the tcp-services-configmap namespace
## Allows customization of the tcp-services-configmap
##
tcp:
configMapNamespace: "" # defaults to .Release.Namespace
## Annotations to be added to the tcp config configmap
annotations: {}

## Allows customization of the udp-services-configmap namespace
## Allows customization of the udp-services-configmap
##
udp:
configMapNamespace: "" # defaults to .Release.Namespace
## Annotations to be added to the udp config configmap
annotations: {}

## Additional command line arguments to pass to nginx-ingress-controller
## E.g. to specify the default SSL certificate you can use
Expand Down