Update compute-utility and mysqlclient-utility probes

Move liveness/readiness params to values.yaml
for compute-utility and mysqlclient-utility charts

Change-Id: I2140bc5a0cef1c28e3d4bbc79f2b06de8ca22a12
This commit is contained in:
SPEARS, DUSTIN (ds443n) 2023-08-22 15:15:27 -04:00
parent bd95b13d2b
commit aa66dfafa3
6 changed files with 64 additions and 28 deletions

View File

@ -13,4 +13,4 @@
apiVersion: v1 apiVersion: v1
description: porthole Compute Client description: porthole Compute Client
name: compute-utility name: compute-utility
version: 0.1.0 version: 0.1.1

View File

@ -11,6 +11,20 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/}} */}}
{{- define "readinessProbeTemplate" }}
exec:
command:
- cat
- /tmp/done
{{- end }}
{{- define "livenessProbeTemplate" }}
exec:
command:
- utilscli
{{- end }}
{{- if .Values.manifests.deployment_utility }} {{- if .Values.manifests.deployment_utility }}
{{- $envAll := . }} {{- $envAll := . }}
@ -78,21 +92,10 @@ spec:
{{ tuple $envAll "compute_utility" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "compute_utility" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ tuple $envAll $envAll.Values.pod.resources.compute_utility | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} {{ tuple $envAll $envAll.Values.pod.resources.compute_utility | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
{{ dict "envAll" $envAll "application" "compute" "container" "compute_utility" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }} {{ dict "envAll" $envAll "application" "compute" "container" "compute_utility" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
{{ dict "envAll" $envAll "component" "utility" "container" "compute-utility" "type" "readiness" "probeTemplate" (include "readinessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
{{ dict "envAll" $envAll "component" "utility" "container" "compute-utility" "type" "liveness" "probeTemplate" (include "livenessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
command: command:
- /tmp/bootstrap.sh - /tmp/bootstrap.sh
readinessProbe:
exec:
command:
- cat
- /tmp/done
initialDelaySeconds: 5
periodSeconds: 15
livenessProbe:
exec:
command:
- utilscli
initialDelaySeconds: 5
periodSeconds: 15
volumeMounts: volumeMounts:
- name: compute-utility-bin-utilscli - name: compute-utility-bin-utilscli
mountPath: /tmp/bootstrap.sh mountPath: /tmp/bootstrap.sh

View File

@ -56,6 +56,21 @@ pod:
type: apparmor type: apparmor
compute-utility: compute-utility:
compute-utility: runtime/default compute-utility: runtime/default
probes:
utility:
compute-utility:
readiness:
enabled: true
params:
periodSeconds: 15
timeoutSeconds: 10
initialDelaySeconds: 5
liveness:
enabled: true
params:
periodSeconds: 15
timeoutSeconds: 10
initialDelaySeconds: 5
resources: resources:
enabled: false enabled: false
utility: utility:

View File

@ -13,4 +13,4 @@
apiVersion: v1 apiVersion: v1
description: Porthole MySql Client description: Porthole MySql Client
name: mysqlclient-utility name: mysqlclient-utility
version: 0.1.3 version: 0.1.4

View File

@ -11,6 +11,20 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/}} */}}
{{- define "readinessProbeTemplate" }}
exec:
command:
- cat
- /tmp/done
{{- end }}
{{- define "livenessProbeTemplate" }}
exec:
command:
- utilscli
{{- end }}
{{- if .Values.manifests.deployment_utility }} {{- if .Values.manifests.deployment_utility }}
{{- $envAll := . }} {{- $envAll := . }}
@ -107,21 +121,10 @@ spec:
{{ tuple $envAll "mysqlclient_utility" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "mysqlclient_utility" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ tuple $envAll $envAll.Values.pod.resources.mysql_utility | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} {{ tuple $envAll $envAll.Values.pod.resources.mysql_utility | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
{{ dict "envAll" $envAll "application" "mysqlclient" "container" "mysqlclient_utility" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }} {{ dict "envAll" $envAll "application" "mysqlclient" "container" "mysqlclient_utility" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
{{ dict "envAll" $envAll "component" "utility" "container" "mysqlclient-utility" "type" "readiness" "probeTemplate" (include "readinessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
{{ dict "envAll" $envAll "component" "utility" "container" "mysqlclient-utility" "type" "liveness" "probeTemplate" (include "livenessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
command: command:
- /tmp/bootstrap.sh - /tmp/bootstrap.sh
readinessProbe:
exec:
command:
- cat
- /tmp/done
initialDelaySeconds: 5
periodSeconds: 15
livenessProbe:
exec:
command:
- utilscli
initialDelaySeconds: 5
periodSeconds: 15
env: env:
- name: BACKUP_RESTORE_NAMESPACE_LIST - name: BACKUP_RESTORE_NAMESPACE_LIST
value: {{ .Values.conf.mariadb_backup_restore.enabled_namespaces | quote }} value: {{ .Values.conf.mariadb_backup_restore.enabled_namespaces | quote }}

View File

@ -98,6 +98,21 @@ pod:
mariadb-ondemand: mariadb-ondemand:
ondemand-perms: runtime/default ondemand-perms: runtime/default
mariadb-ondemand: runtime/default mariadb-ondemand: runtime/default
probes:
utility:
mysqlclient-utility:
readiness:
enabled: true
params:
periodSeconds: 15
timeoutSeconds: 10
initialDelaySeconds: 5
liveness:
enabled: true
params:
periodSeconds: 15
timeoutSeconds: 10
initialDelaySeconds: 5
resources: resources:
enabled: false enabled: false
utility: utility: