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

[kibana] feat: Add support to kibana 6.8 chart for deployment annotations #1754

Open
wants to merge 1 commit into
base: 6.8
Choose a base branch
from
Open
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 @@ -82,6 +82,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 $key, $value := .Values.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
spec:
replicas: {{ .Values.replicas }}
strategy:
Expand Down
11 changes: 11 additions & 0 deletions kibana/tests/kibana_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -756,3 +756,14 @@ def test_hostaliases():
r = helm_template(config)
hostAliases = r["deployment"][name]["spec"]["template"]["spec"]["hostAliases"]
assert {"ip": "127.0.0.1", "hostnames": ["foo.local", "bar.local"]} in hostAliases

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"
)
2 changes: 2 additions & 0 deletions kibana/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ imagePullPolicy: "IfNotPresent"
# additionals labels
labels: {}

annotations: {}

podAnnotations: {}
# iam.amazonaws.com/role: es-cluster

Expand Down