mirror of
https://github.com/stefanprodan/podinfo.git
synced 2026-03-03 02:20:18 +00:00
Add pod annotations to chart options
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 }}
|
||||
|
||||
@@ -88,3 +88,4 @@ tolerations: []
|
||||
|
||||
affinity: {}
|
||||
|
||||
podAnnotations: {}
|
||||
|
||||
Reference in New Issue
Block a user