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

Commit 2616ee6

Browse files
jmlrtframsouza
andauthored
Support to add Kibana annotations at deployment level (#1417) (#1599)
* 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]> Co-authored-by: framsouza <[email protected]>
1 parent 59791af commit 2616ee6

File tree

4 files changed

+23
-3
lines changed

4 files changed

+23
-3
lines changed

kibana/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ as a reference. They are also used in the automated testing of this chart.
8282
| Parameter | Description | Default |
8383
|-----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------|
8484
| `affinity` | Configurable [affinity][] | `{}` |
85+
| `annotations` | Configurable [annotations][] on the deployment object | `{}` |
8586
| `automountToken` | Whether or not to automount the service account token in the Pod | `true` |
8687
| `elasticsearchHosts` | The URLs used to connect to Elasticsearch | `http://elasticsearch-master:9200` |
8788
| `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: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@ imagePullPolicy: "IfNotPresent"
4141
# additionals labels
4242
labels: {}
4343

44-
podAnnotations:
45-
{}
46-
# iam.amazonaws.com/role: es-cluster
44+
annotations: {}
45+
46+
podAnnotations: {}
47+
# iam.amazonaws.com/role: es-cluster
4748

4849
resources:
4950
requests:

0 commit comments

Comments
 (0)