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

Commit e085818

Browse files
framsouzajmlrt
andauthored
Support to add Kibana annotations at deployment level (#1417)
* Adding support to Ingress networking.k8s.io/v1 * Adjusting ES service name * Removing ingress typo & adjusting python test * Adjusting python tests to use the new ingress version * fixing conflict * Adding support to kubernetes ingress v1 & ClassName * Adding reformatted files * fixing conflict * Adding ClassName & Pathtype on ingress settings * Performing syntax adjustments and removing comments * Adding support to annotation on Kibana deploymet * fixing syntax * Fixing as per reviewer request * Adding kibana tests & annotations at README Co-authored-by: jmlrt <[email protected]>
1 parent 7fbeaa7 commit e085818

File tree

4 files changed

+21
-0
lines changed

4 files changed

+21
-0
lines changed

kibana/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ as a reference. They are also used in the automated testing of this chart.
8080
| Parameter | Description | Default |
8181
|-----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------|
8282
| `affinity` | Configurable [affinity][] | `{}` |
83+
| `annotations` | Configurable [annotations][] on the deployment object | `{}` |
8384
| `automountToken` | Whether or not to automount the service account token in the Pod | `true` |
8485
| `elasticsearchHosts` | The URLs used to connect to Elasticsearch | `http://elasticsearch-master:9200` |
8586
| `envFrom` | Templatable string to be passed to the [environment from variables][] which will be appended to the `envFrom:` definition for the container | `[]` |

kibana/templates/deployment.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ kind: Deployment
33
metadata:
44
name: {{ template "kibana.fullname" . }}
55
labels: {{ include "kibana.labels" . | nindent 4 }}
6+
{{- if .Values.annotations }}
7+
annotations:
8+
{{- range $key, $value := .Values.annotations }}
9+
{{ $key }}: {{ $value | quote }}
10+
{{- end }}
11+
{{- end }}
612
spec:
713
replicas: {{ .Values.replicas }}
814
strategy:

kibana/tests/kibana_test.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -836,3 +836,15 @@ def test_disable_automount_sa_token():
836836
]
837837
== False
838838
)
839+
840+
841+
def test_adding_annotations():
842+
config = """
843+
annotations:
844+
iam.amazonaws.com/role: es-role
845+
"""
846+
r = helm_template(config)
847+
assert (
848+
r["deployment"][name]["metadata"]["annotations"]["iam.amazonaws.com/role"]
849+
== "es-role"
850+
)

kibana/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ imagePullPolicy: "IfNotPresent"
5151
# additionals labels
5252
labels: {}
5353

54+
annotations: {}
55+
5456
podAnnotations: {}
5557
# iam.amazonaws.com/role: es-cluster
5658

0 commit comments

Comments
 (0)