feat: add $pod.podAnnotations

This commit is contained in:
Chi-En Wu
2020-04-27 09:40:34 +08:00
parent a9680a40cf
commit dd6822704c
2 changed files with 5 additions and 0 deletions

View File

@ -1054,6 +1054,7 @@ It also uses the following configuration from the `$pod`:
| Value | Description | | Value | Description |
| ----- | ----------- | | ----- | ----------- |
| `$pod.imagePullSecrets` | Names of secrets containing private registry credentials | | `$pod.imagePullSecrets` | Names of secrets containing private registry credentials |
| `$pod.podAnnotations` | Pod annotations |
| `$pod.podSecurityContext` | Security options | | `$pod.podSecurityContext` | Security options |
| `$pod.nodeSelector ` | Node labels for pod assignment | | `$pod.nodeSelector ` | Node labels for pod assignment |
| `$pod.affinity ` | Expressions for affinity | | `$pod.affinity ` | Expressions for affinity |

View File

@ -5,6 +5,10 @@
{{- $pod := index . 1 -}} {{- $pod := index . 1 -}}
{{- $serviceAccount := index . 2 -}} {{- $serviceAccount := index . 2 -}}
metadata: metadata:
{{- with $pod.podAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
labels: labels:
{{- include "common.selectorLabels" $top | nindent 4 }} {{- include "common.selectorLabels" $top | nindent 4 }}
spec: spec: