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

Add https support to readinessProbe #17

Merged
merged 4 commits into from
Dec 31, 2018
Merged

Add https support to readinessProbe #17

merged 4 commits into from
Dec 31, 2018

Conversation

jordansissel
Copy link
Contributor

If server.ssl.enabled is set in Kibana (vi SERVER_SSL_ENABLED env var),
then the readinessProbe will use https to test for readiness.

Fixes #16

If server.ssl.enabled is set in Kibana (vi SERVER_SSL_ENABLED env var),
then the readinessProbe will use https to test for readiness.

Fixes #16
@jordansissel
Copy link
Contributor Author

Caveat: This is my first effort to do anything of substance with Helm.

Open questions:

  • Is kibanaSSLHostname the best value name?
  • Does the shell script need more comments?

@jordansissel
Copy link
Contributor Author

Test results:

% kubectl get pods -l app=kibana
NAME                            READY   STATUS    RESTARTS   AGE
xyz-kibana-5dfb9fcdb8-pfv6l   1/1     Running   0          15m
xyz-kibana-5dfb9fcdb8-s6zsq   1/1     Running   0          15m

(Without this patch, the READY state would forever be 0/1 as the check over http would always fail)

Copy link
Contributor

@Crazybus Crazybus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM apart from updating the readme! Thanks so much for picking this up.

Can you share the configuration you are using to test this? I will then be able to update the security example to make sure this configuration is part of the automated testing for this chart.

kibana/values.yaml Show resolved Hide resolved
@Crazybus
Copy link
Contributor

Is kibanaSSLHostname the best value name?

Sounds right to me and it is following the helm variable naming conventions.

Does the shell script need more comments?

The code is clear and logical to me, I didn't have any trouble understanding it without comments 👍

@jordansissel
Copy link
Contributor Author

Added an entry to the readme. I'll see about attaching the values.yaml I'm using.

@jordansissel
Copy link
Contributor Author

values.yaml for kibana:

elasticsearchURL: "https://redacted-data:9200"
replicas: 2 
kibanaSSLHostname: "redacted-kibana"

extraEnvs:
  - name: 'xpack.security.encryptionKey'
    valueFrom: { secretKeyRef: { name: kibana-encryption-key, key: key } } 
  - name: 'ELASTICSEARCH_SSL_CERTIFICATEAUTHORITIES'
    value: '/usr/share/kibana/config/certs/elastic-certificate.pem'
  - name: 'ELASTICSEARCH_SSL_VERIFICATIONMODE'
    value: 'certificate'

  - name: 'ELASTICSEARCH_USERNAME'
    valueFrom: { secretKeyRef: { name: elastic-credentials, key: username } } 
  - name: 'ELASTICSEARCH_PASSWORD'
    valueFrom: { secretKeyRef: { name: elastic-credentials, key: password } } 

  # Set these when Kibana needs to serve HTTPS to browsers.
  - name: 'SERVER_SSL_KEY'
    value: /usr/share/kibana/config/certs/kibana/kibana.key
  - name: 'SERVER_SSL_CERTIFICATE'
    value: /usr/share/kibana/config/certs/kibana/kibana.crt
  - name: 'SERVER_SSL_ENABLED'
    value: "true"

secretMounts:
  # Certificate for trusting Elasticsearch when Kibana talks to it over HTTPS.
  - name: elastic-certificate-pem
    secretName: elastic-certificate-pem
    path: /usr/share/kibana/config/certs
  # Kibana's SSL certificate and key live here.
  - name: kibana-certificate
    secretName: kibana-certificate
    path: /usr/share/kibana/config/certs/kibana

@Crazybus
Copy link
Contributor

jenkins test this please

@Crazybus Crazybus merged commit 6df2f3d into master Dec 31, 2018
@Crazybus Crazybus deleted the issue/16 branch December 31, 2018 14:57
@Crazybus
Copy link
Contributor

Thanks for adding your config! I'll update the integration test/example to use it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants