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

Commit

Permalink
a bit of refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
jmlrt committed Sep 7, 2022
1 parent 451ea40 commit d463940
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
2 changes: 0 additions & 2 deletions kibana/examples/security/test/goss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ file:
/usr/share/kibana/config/kibana.yml:
exists: true
contains:
- 'elasticsearch.ssl.certificateAuthorities: ["/usr/share/kibana/config/certs/elastic-certificate.pem"]'
- "elasticsearch.ssl.verificationMode: certificate"
- "server.ssl.certificate: /usr/share/kibana/config/certs/elastic-certificate.pem"
- "server.ssl.enabled: true"
- "server.ssl.key: /usr/share/kibana/config/certs/elastic-certificate.pem"
Expand Down
2 changes: 0 additions & 2 deletions kibana/examples/security/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ extraEnvs:

kibanaConfig:
kibana.yml: |
elasticsearch.ssl.certificateAuthorities: ["/usr/share/kibana/config/certs/elastic-certificate.pem"]
elasticsearch.ssl.verificationMode: certificate
server.ssl.certificate: /usr/share/kibana/config/certs/elastic-certificate.pem
server.ssl.enabled: true
server.ssl.key: /usr/share/kibana/config/certs/elastic-certificate.pem
Expand Down
6 changes: 6 additions & 0 deletions kibana/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,12 @@ spec:
- name: ELASTICSEARCH_HOSTS
value: "{{ .Values.elasticsearchHosts }}"
{{- end }}
- name: ELASTICSEARCH_SSL_CERTIFICATE
value: "{{ template "kibana.home_dir" . }}/config/certs/tls.crt"
- name: ELASTICSEARCH_SSL_KEY
value: "{{ template "kibana.home_dir" . }}/config/certs/tls.key"
- name: ELASTICSEARCH_SSL_CERTIFICATEAUTHORITIES
value: "{{ template "kibana.home_dir" . }}/config/certs/ca.crt"
- name: SERVER_HOST
value: "{{ .Values.serverHost }}"
{{- if .Values.extraEnvs }}
Expand Down
9 changes: 4 additions & 5 deletions kibana/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,10 @@ healthCheckPath: "/app/kibana"

# Allows you to add any config files in /usr/share/kibana/config/
# such as kibana.yml
kibanaConfig:
kibana.yml: |
elasticsearch.ssl.certificate: /usr/share/kibana/config/certs/tls.crt
elasticsearch.ssl.key: /usr/share/kibana/config/certs/tls.key
elasticsearch.ssl.certificateAuthorities: ["/usr/share/kibana/config/certs/ca.crt"]
kibanaConfig: {}
# kibana.yml: |
# key:
# nestedkey: value

# If Pod Security Policy in use it may be required to specify security context as well as service account

Expand Down

0 comments on commit d463940

Please sign in to comment.