diff --git a/bitnami/nginx/README.md b/bitnami/nginx/README.md index bc086a547..3d68db0a9 100644 --- a/bitnami/nginx/README.md +++ b/bitnami/nginx/README.md @@ -66,6 +66,7 @@ The following tables lists the configurable parameters of the NGINX Open Source | `service.nodePorts.http` | Kubernetes http node port | `""` | | `service.externalTrafficPolicy` | Enable client source IP preservation | `Cluster` | | `service.loadBalancerIP` | LoadBalancer service IP address | `""` | +| `service.annotations` | Service annotations | `{}` | Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, diff --git a/bitnami/nginx/templates/svc.yaml b/bitnami/nginx/templates/svc.yaml index 8c7493ac6..fb6b9b613 100644 --- a/bitnami/nginx/templates/svc.yaml +++ b/bitnami/nginx/templates/svc.yaml @@ -7,6 +7,10 @@ metadata: chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" +{{- with .Values.service.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} spec: type: {{ .Values.service.type }} {{- if (or (eq .Values.service.type "LoadBalancer") (eq .Values.service.type "NodePort")) }} diff --git a/bitnami/nginx/values.yaml b/bitnami/nginx/values.yaml index a3f81418c..4c70c2084 100644 --- a/bitnami/nginx/values.yaml +++ b/bitnami/nginx/values.yaml @@ -31,7 +31,11 @@ image: ## service: type: LoadBalancer - # HTTP Port + ## Provide optional annotations to the service i.e. for external-dns + # annotations: + # external-dns.alpha.kubernetes.io/hostname: yourservicename.k8s.yourcompany.com + ## + ## HTTP Port port: 80 ## ## loadBalancerIP: