Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Allow to specify kibana deploy annotations #1383

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions kibana/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 | `{}`
| `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 | `[]` |
| `extraContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` |
Expand Down
6 changes: 6 additions & 0 deletions kibana/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ kind: Deployment
metadata:
name: {{ template "kibana.fullname" . }}
labels: {{ include "kibana.labels" . | nindent 4 }}
{{- if .Values.annotations }}
annotations:
{{- range $anKey, $anVal := .Values.annotations }}
{{ $anKey }}: {{ $anVal | quote }}
{{- end }}
{{- end }}
spec:
replicas: {{ .Values.replicas }}
strategy:
Expand Down
14 changes: 14 additions & 0 deletions kibana/tests/kibana_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,20 @@ def test_overriding_the_port():
assert r["service"][name]["spec"]["ports"][0]["targetPort"] == 5602


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"
)


def test_adding_env_from():
config = """
envFrom:
Expand Down
2 changes: 2 additions & 0 deletions kibana/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ elasticsearchHosts: "http://elasticsearch-master:9200"

replicas: 1

annotations: {}

# Extra environment variables to append to this nodeGroup
# This will be appended to the current 'env:' key. You can use any of the kubernetes env
# syntax here
Expand Down