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) (#1599)
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>

Co-authored-by: framsouza <francismara.souza@elastic.co>
  • Loading branch information
jmlrt and framsouza committed Mar 4, 2022
1 parent 59791af commit 2616ee6
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 3 deletions.
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 | `{}` |
| `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"
)
7 changes: 4 additions & 3 deletions kibana/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ imagePullPolicy: "IfNotPresent"
# additionals labels
labels: {}

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

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

resources:
requests:
Expand Down

0 comments on commit 2616ee6

Please sign in to comment.