Merge "Actually add Kibana Liveness Probe"
This commit is contained in:
commit
89bc837094
@ -14,6 +14,19 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/}}
|
*/}}
|
||||||
|
|
||||||
|
{{- define "kibanaProbeTemplate" }}
|
||||||
|
{{- $kibanaPort := tuple "kibana" "internal" "http" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||||
|
{{- $esUser := .Values.endpoints.elasticsearch.auth.admin.username }}
|
||||||
|
{{- $esPass := .Values.endpoints.elasticsearch.auth.admin.password }}
|
||||||
|
{{- $authHeader := printf "%s:%s" $esUser $esPass | b64enc }}
|
||||||
|
httpGet:
|
||||||
|
path: /status
|
||||||
|
port: {{ $kibanaPort }}
|
||||||
|
httpHeaders:
|
||||||
|
- name: Authorization
|
||||||
|
value: Basic {{ $authHeader }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
{{- if .Values.manifests.deployment }}
|
{{- if .Values.manifests.deployment }}
|
||||||
{{- $envAll := . }}
|
{{- $envAll := . }}
|
||||||
|
|
||||||
@ -28,6 +41,8 @@ limitations under the License.
|
|||||||
|
|
||||||
{{- $serviceAccountName := "kibana" }}
|
{{- $serviceAccountName := "kibana" }}
|
||||||
{{ tuple $envAll "kibana" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
{{ tuple $envAll "kibana" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
||||||
|
|
||||||
|
{{- $kibanaPort := tuple "kibana" "internal" "http" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||||
---
|
---
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
@ -70,15 +85,10 @@ spec:
|
|||||||
- start
|
- start
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
containerPort: {{ tuple "kibana" "internal" "http" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
containerPort: {{ $kibanaPort }}
|
||||||
livenessProbe:
|
|
||||||
tcpSocket:
|
|
||||||
port: {{ tuple "kibana" "internal" "http" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
|
||||||
initialDelaySeconds: 180
|
|
||||||
periodSeconds: 60
|
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
tcpSocket:
|
tcpSocket:
|
||||||
port: {{ tuple "kibana" "internal" "http" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
port: {{ $kibanaPort }}
|
||||||
initialDelaySeconds: 20
|
initialDelaySeconds: 20
|
||||||
periodSeconds: 30
|
periodSeconds: 30
|
||||||
env:
|
env:
|
||||||
@ -113,15 +123,8 @@ spec:
|
|||||||
ports:
|
ports:
|
||||||
- name: kibana
|
- name: kibana
|
||||||
containerPort: {{ tuple "kibana" "internal" "kibana" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
containerPort: {{ tuple "kibana" "internal" "kibana" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||||
readinessProbe:
|
{{ dict "envAll" . "component" "kibana" "container" "kibana" "type" "liveness" "probeTemplate" (include "kibanaProbeTemplate" . | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
|
||||||
httpGet:
|
{{ dict "envAll" . "component" "kibana" "container" "kibana" "type" "readiness" "probeTemplate" (include "kibanaProbeTemplate" . | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
|
||||||
path: /status
|
|
||||||
port: {{ tuple "kibana" "internal" "http" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
|
||||||
httpHeaders:
|
|
||||||
- name: Authorization
|
|
||||||
value: Basic {{ $authHeader }}
|
|
||||||
initialDelaySeconds: 20
|
|
||||||
periodSeconds: 10
|
|
||||||
env:
|
env:
|
||||||
- name: ELASTICSEARCH_HOSTS
|
- name: ELASTICSEARCH_HOSTS
|
||||||
value: {{ $esHosts }}
|
value: {{ $esHosts }}
|
||||||
|
@ -104,7 +104,19 @@ pod:
|
|||||||
limits:
|
limits:
|
||||||
memory: "1024Mi"
|
memory: "1024Mi"
|
||||||
cpu: "2000m"
|
cpu: "2000m"
|
||||||
|
probes:
|
||||||
|
kibana:
|
||||||
|
kibana:
|
||||||
|
liveness:
|
||||||
|
enabled: true
|
||||||
|
params:
|
||||||
|
initialDelaySeconds: 180
|
||||||
|
periodSeconds: 60
|
||||||
|
readiness:
|
||||||
|
enabled: true
|
||||||
|
params:
|
||||||
|
initialDelaySeconds: 20
|
||||||
|
periodSeconds: 30
|
||||||
network_policy:
|
network_policy:
|
||||||
kibana:
|
kibana:
|
||||||
ingress:
|
ingress:
|
||||||
|
Loading…
Reference in New Issue
Block a user