This repository has been archived by the owner on May 16, 2023. It is now read-only.
[kibana] Chart template to add custom readinessProbe methods #1722
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prerequisites
kibana/tests/*.py
kibana/examples/*/test/goss.yaml
(nothing to add)Description
This PR aims at templating readinessProbes fields giving the possibility to use either:
Context
Migration of our kubernetes deployments to Spinnaker including Kibana.
Kibana deployment with Spinnaker fails due to variable substitutions made by Orca over the Kibana helm chart corrupting Kibana's Helm chart. Here is a reference to that issue.. A fix on Spinnaker side should be made in a mid/long-term thanks to a code base refactoring ongoing + link.
As a work around to make our Kibana deployment work and as an improvement of the Kibana Helm chart, I suggest to add the option to customize readinessProbe.
Expected template behavior
List of the changes this PR will make in the possible use of the Kibana Helm chart.
Use Case 1 - No custom readinessProbe defined (default use case)
This use case aims at not breaking the already existing implementation everyone is probably using aka no custom readinessProbe exec nor httpGet.
If no readinessProbe.exec specified or empty nor readinessProbe.httpGet specified or empty it will take the default readinessProbe.exec specified in
templates/deployment.yaml
. ReadinessProbe deployment output will be the default one:Use Case 2 - Use custom readinessProbe exec
If the readinessProbe.exec field is specified in
values.yaml
, the specified probe will be included in the deployment.values.yaml
example:ReadinessProbe deployment output will be the specified one from values.yaml:
Use Case 3 - Use custom readinessProbe httpGet
If the readinessProbe.httpGet field is specified in
values.yaml
, the specified probe will be included in the deployment.values.yaml
example:ReadinessProbe deployment output will be the specified one from values.yaml:
Broken Use Case - Both custom readinessProbe httpGet and exec use
If both readinessProbe.httpGet and readinessProbe.httpGet fields are specified in
values.yaml
, the specified probes will be included in the deployment.This will trigger an error from Kubernetes at deployment time. Multiple defined probe methods cannot be used at the moment as defined by the Kubernetes spec. However, this might change with time. The non-definitive aspect of this implementation led me to NOT implement error management for such case.
Tests added in
kibana/tests/*.py