diff --git a/charts/podinfo/README.md b/charts/podinfo/README.md index 9aff83e..c1b5f2d 100644 --- a/charts/podinfo/README.md +++ b/charts/podinfo/README.md @@ -80,6 +80,7 @@ Parameter | Default | Description `nodeSelector` | `{}` | Node labels for pod assignment `tolerations` | `[]` | List of node taints to tolerate `affinity` | `None` | Node/pod affinities +`podAnnotations` | `{}` | Pod annotations Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, @@ -88,6 +89,13 @@ $ helm install my-release podinfo/podinfo \ --set=serviceMonitor.enabled=true,serviceMonitor.interval=5s ``` +To add custom annotations you need to escape the annotation key string: + +```console +$ helm upgrade -i my-release podinfo/podinfo \ +--set podAnnotations."appmesh\.k8s\.aws\/preview"=enabled +``` + Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example, ```console diff --git a/charts/podinfo/templates/deployment.yaml b/charts/podinfo/templates/deployment.yaml index 37dd23a..d53667a 100644 --- a/charts/podinfo/templates/deployment.yaml +++ b/charts/podinfo/templates/deployment.yaml @@ -25,6 +25,9 @@ spec: annotations: prometheus.io/scrape: "true" prometheus.io/port: "{{ .Values.service.httpPort }}" + {{- range $key, $value := .Values.podAnnotations }} + {{ $key }}: {{ $value | quote }} + {{- end }} spec: terminationGracePeriodSeconds: 30 {{- if .Values.serviceAccount.enabled }} diff --git a/charts/podinfo/values.yaml b/charts/podinfo/values.yaml index eeddb31..d87a7e4 100644 --- a/charts/podinfo/values.yaml +++ b/charts/podinfo/values.yaml @@ -88,3 +88,4 @@ tolerations: [] affinity: {} +podAnnotations: {}