Skip to content

Commit

Permalink
make some changes for best practices (#843)
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 b5a3fe1 commit a0a43e1
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 0 deletions.
19 changes: 19 additions & 0 deletions manifests/kiali-ossm/manifests/kiali.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,25 @@ spec:
- "--zap-log-level=info"
- "--leader-election-id=kiali-operator"
- "--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:
allowPrivilegeEscalation: false
privileged: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,25 @@ spec:
- "--zap-log-level=info"
- "--leader-election-id=kiali-operator"
- "--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:
allowPrivilegeEscalation: false
privileged: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ spec:
- "/opt/kiali/kiali"
- "-config"
- "/kiali-configuration/config.yaml"
terminationMessagePolicy: FallbackToLogsOnError
securityContext:
{% if kiali_vars.deployment.security_context|length > 0 %}
{{ kiali_vars.deployment.security_context | to_nice_yaml(indent=0) | trim | indent(10) }}
Expand Down Expand Up @@ -100,6 +101,14 @@ spec:
scheme: {{ 'HTTP' if kiali_vars.identity.cert_file == "" else 'HTTPS' }}
initialDelaySeconds: 5
periodSeconds: 30
startupProbe:
httpGet:
path: {{ kiali_vars.server.web_root | regex_replace('\\/$', '') }}/healthz
port: api-port
scheme: {{ 'HTTP' if kiali_vars.identity.cert_file == "" else 'HTTPS' }}
initialDelaySeconds: 30
periodSeconds: 10
failureThreshold: 6
env:
- name: ACTIVE_NAMESPACE
valueFrom:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ spec:
- "/opt/kiali/kiali"
- "-config"
- "/kiali-configuration/config.yaml"
terminationMessagePolicy: FallbackToLogsOnError
securityContext:
{% if kiali_vars.deployment.security_context|length > 0 %}
{{ kiali_vars.deployment.security_context | to_nice_yaml(indent=0) | trim | indent(10) }}
Expand Down Expand Up @@ -100,6 +101,14 @@ spec:
scheme: {{ 'HTTP' if kiali_vars.identity.cert_file == "" else 'HTTPS' }}
initialDelaySeconds: 5
periodSeconds: 30
startupProbe:
httpGet:
path: {{ kiali_vars.server.web_root | regex_replace('\\/$', '') }}/healthz
port: api-port
scheme: {{ 'HTTP' if kiali_vars.identity.cert_file == "" else 'HTTPS' }}
initialDelaySeconds: 30
periodSeconds: 10
failureThreshold: 6
env:
- name: ACTIVE_NAMESPACE
valueFrom:
Expand Down

0 comments on commit a0a43e1

Please sign in to comment.