Skip to content

Commit

Permalink
make some changes for best practices (#298)
Browse files Browse the repository at this point in the history
* add terminationMessagePolicy, set to FallbackToLogsOnError

* probes
  • Loading branch information
jmazzitelli authored Nov 12, 2024
1 parent ed4cd84 commit 67f5eda
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
19 changes: 19 additions & 0 deletions kiali-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,25 @@ spec:
- "--zap-log-level=info"
- "--leader-election-id={{ include "kiali-operator.fullname" . }}"
- "--watches-file=./$(WATCHES_FILE)"
- "--health-probe-bind-address=:6789"
terminationMessagePolicy: FallbackToLogsOnError
readinessProbe:
httpGet:
path: /readyz
port: 6789
periodSeconds: 30
livenessProbe:
httpGet:
path: /healthz
port: 6789
periodSeconds: 30
startupProbe:
httpGet:
path: /healthz
port: 6789
initialDelaySeconds: 30
periodSeconds: 10
failureThreshold: 6
securityContext:
{{- if .Values.securityContext }}
{{- toYaml .Values.securityContext | nindent 10 }}
Expand Down
15 changes: 14 additions & 1 deletion kiali-server/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ spec:
- "/opt/kiali/kiali"
- "-config"
- "/kiali-configuration/config.yaml"
terminationMessagePolicy: FallbackToLogsOnError
securityContext:
{{- if .Values.deployment.security_context}}
{{- toYaml .Values.deployment.security_context | nindent 10 }}
Expand Down Expand Up @@ -113,6 +114,18 @@ spec:
{{- end }}
initialDelaySeconds: 5
periodSeconds: 30
startupProbe:
httpGet:
path: {{ include "kiali-server.server.web_root" . | trimSuffix "/" }}/healthz
port: api-port
{{- if (include "kiali-server.identity.cert_file" .) }}
scheme: HTTPS
{{- else }}
scheme: HTTP
{{- end }}
initialDelaySeconds: 30
periodSeconds: 10
failureThreshold: 6
env:
- name: ACTIVE_NAMESPACE
valueFrom:
Expand Down Expand Up @@ -227,4 +240,4 @@ spec:
{{- toYaml .Values.deployment.node_selector | nindent 8 }}
{{- end }}
...
{{- end }}
{{- end }}

0 comments on commit 67f5eda

Please sign in to comment.