diff --git a/kibana/README.md b/kibana/README.md index df1f03ef7..5ad8ee162 100644 --- a/kibana/README.md +++ b/kibana/README.md @@ -80,6 +80,7 @@ as a reference. They are also used in the automated testing of this chart. | Parameter | Description | Default | |-----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------| | `affinity` | Configurable [affinity][] | `{}` | +| `annotations` | Configurable [annotations][] on the deployment object | `{}` | | `automountToken` | Whether or not to automount the service account token in the Pod | `true` | | `elasticsearchHosts` | The URLs used to connect to Elasticsearch | `http://elasticsearch-master:9200` | | `envFrom` | Templatable string to be passed to the [environment from variables][] which will be appended to the `envFrom:` definition for the container | `[]` | diff --git a/kibana/templates/deployment.yaml b/kibana/templates/deployment.yaml index 0d8b46ba0..13332e0ac 100644 --- a/kibana/templates/deployment.yaml +++ b/kibana/templates/deployment.yaml @@ -3,6 +3,12 @@ kind: Deployment metadata: name: {{ template "kibana.fullname" . }} labels: {{ include "kibana.labels" . | nindent 4 }} + {{- if .Values.annotations }} + annotations: + {{- range $key, $value := .Values.annotations }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- end }} spec: replicas: {{ .Values.replicas }} strategy: diff --git a/kibana/tests/kibana_test.py b/kibana/tests/kibana_test.py index fd76eb83b..47aa2575e 100644 --- a/kibana/tests/kibana_test.py +++ b/kibana/tests/kibana_test.py @@ -836,3 +836,15 @@ def test_disable_automount_sa_token(): ] == False ) + + +def test_adding_annotations(): + config = """ + annotations: + iam.amazonaws.com/role: es-role + """ + r = helm_template(config) + assert ( + r["deployment"][name]["metadata"]["annotations"]["iam.amazonaws.com/role"] + == "es-role" + ) diff --git a/kibana/values.yaml b/kibana/values.yaml index 028fbcfa1..1b2d0e244 100644 --- a/kibana/values.yaml +++ b/kibana/values.yaml @@ -51,6 +51,8 @@ imagePullPolicy: "IfNotPresent" # additionals labels labels: {} +annotations: {} + podAnnotations: {} # iam.amazonaws.com/role: es-cluster