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

Commit

Permalink
Support to add Kibana annotations at deployment level (#1417)
Browse files Browse the repository at this point in the history
* 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 <8582351+jmlrt@users.noreply.github.com>
  • Loading branch information
framsouza and jmlrt authored Mar 3, 2022
1 parent 7fbeaa7 commit e085818
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
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 | `{}` |
| `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 | `[]` |
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
12 changes: 12 additions & 0 deletions kibana/tests/kibana_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
2 changes: 2 additions & 0 deletions kibana/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ imagePullPolicy: "IfNotPresent"
# additionals labels
labels: {}

annotations: {}

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

Expand Down

0 comments on commit e085818

Please sign in to comment.