Skip to content
This repository was archived by the owner on May 16, 2023. It is now read-only.
Closed
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
8 changes: 4 additions & 4 deletions kibana/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ template "kibana.fullname" . }}
labels:
app: {{ .Chart.Name }}
release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service }}
labels: {{ include "kibana.labels" . | nindent 4 }}
Comment thread
alexgordonpandera marked this conversation as resolved.
{{- if .Values.service.labels }}
{{ toYaml .Values.service.labels | indent 4}}
{{- end }}
Expand All @@ -31,3 +28,6 @@ spec:
selector:
app: {{ .Chart.Name }}
release: {{ .Release.Name | quote }}
{{- if .Values.service.loadBalancerIP }}
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
{{- end }}
33 changes: 31 additions & 2 deletions kibana/tests/kibana_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,19 @@ def test_overriding_the_port():
assert r["service"][name]["spec"]["ports"][0]["targetPort"] == 5602


def test_adding_env_from():
Comment thread
alexgordonpandera marked this conversation as resolved.
config = """
envFrom:
- secretRef:
name: secret-name
"""
r = helm_template(config)
secretRef = r["deployment"][name]["spec"]["template"]["spec"]["containers"][0][
"envFrom"
][0]["secretRef"]
assert secretRef == {"name": "secret-name"}


def test_adding_image_pull_secrets():
config = """
imagePullSecrets:
Expand Down Expand Up @@ -299,7 +312,6 @@ def test_adding_in_kibana_config():
key:
nestedkey: value
dot.notation: test

other-config.yml: |
hello = world
"""
Expand Down Expand Up @@ -455,6 +467,23 @@ def test_adding_a_nodePort():
assert r["service"][name]["spec"]["ports"][0]["nodePort"] == 30001


def test_adding_a_loadBalancerIP():
config = ""

r = helm_template(config)

assert "loadBalancerIP" not in r["service"][name]["spec"]

config = """
service:
loadBalancerIP: 12.4.19.81
"""

r = helm_template(config)

assert r["service"][name]["spec"]["loadBalancerIP"] == "12.4.19.81"


def test_override_the_serverHost():
config = """
serverHost: "localhost"
Expand Down Expand Up @@ -601,4 +630,4 @@ def test_setting_fullnameOverride():
"name"
]
== "kibana"
)
)
15 changes: 12 additions & 3 deletions kibana/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---

elasticsearchURL: "" # "http://elasticsearch-master:9200"
elasticsearchHosts: "http://elasticsearch-master:9200"

replicas: 1
Expand All @@ -14,6 +12,13 @@ extraEnvs:
# - name: MY_ENVIRONMENT_VAR
# value: the_value_goes_here

# Allows you to load environment variables from kubernetes secret or config map
envFrom: []
# - secretRef:
# name: env-secret
# - configMapRef:
# name: config-map

# A list of secrets and their paths to mount inside the pod
# This is useful for mounting certificates for security and for mounting
# the X-Pack license
Expand All @@ -24,7 +29,7 @@ secretMounts: []
# subPath: kibana.keystore # optional

image: "docker.elastic.co/kibana/kibana"
imageTag: "7.6.2"
imageTag: "7.7.1"
imagePullPolicy: "IfNotPresent"

# additionals labels
Expand Down Expand Up @@ -101,6 +106,7 @@ service:
# service.beta.kubernetes.io/cce-load-balancer-internal-vpc: "true"
loadBalancerSourceRanges: []
# 0.0.0.0/0
loadBalancerIP: ""

ingress:
enabled: false
Expand Down Expand Up @@ -137,3 +143,6 @@ lifecycle: {}
# postStart:
# exec:
# command: ["/bin/sh", "-c", "echo Hello from the postStart handler > /usr/share/message"]

# Deprecated - use only with versions < 6.6
elasticsearchURL: "" # "http://elasticsearch-master:9200"