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

Commit

Permalink
Fixed default values and ingress. Reformatted test file.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnbelo committed Oct 14, 2020
1 parent 9f9b55a commit 18ae49c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 17 deletions.
1 change: 0 additions & 1 deletion logstash/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "logstash.fullname" . -}}
{{- $ingressPath := .Values.ingress.path -}}
apiVersion: {{ template "logstash.ingress.apiVersion" . }}
kind: Ingress
metadata:
Expand Down
24 changes: 9 additions & 15 deletions logstash/tests/logstash_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,9 +540,9 @@ def test_adding_a_node_affinity():
- myvalue
"""
r = helm_template(config)
assert r["statefulset"][name]["spec"]["template"]["spec"][
"affinity"
]["nodeAffinity"] == {
assert r["statefulset"][name]["spec"]["template"]["spec"]["affinity"][
"nodeAffinity"
] == {
"preferredDuringSchedulingIgnoredDuringExecution": [
{
"weight": 100,
Expand Down Expand Up @@ -580,10 +580,9 @@ def test_adding_in_logstash_config():

s = r["statefulset"][name]["spec"]["template"]["spec"]

assert {
"configMap": {"name": name + "-config"},
"name": "logstashconfig",
} in s["volumes"]
assert {"configMap": {"name": name + "-config"}, "name": "logstashconfig",} in s[
"volumes"
]
assert {
"mountPath": "/usr/share/logstash/config/logstash.yml",
"name": "logstashconfig",
Expand Down Expand Up @@ -877,6 +876,7 @@ def test_setting_fullnameOverride():
== "logstash"
)


def test_adding_an_ingress():
config = """
ingress:
Expand All @@ -896,13 +896,7 @@ def test_adding_an_ingress():
"host": "logstash.local",
"http": {
"paths": [
{
"path": "/logs",
"backend": {
"serviceName": name,
"servicePort": 8080
}
}
{"path": "/logs", "backend": {"serviceName": name, "servicePort": 8080}}
]
}
},
}
2 changes: 1 addition & 1 deletion logstash/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ service: {}
# targetPort: 8080

ingress:
enabled: true
enabled: false
# annotations: {}
# hosts:
# - host: logstash.local
Expand Down

0 comments on commit 18ae49c

Please sign in to comment.