diff --git a/charts/compute-utility/Chart.yaml b/charts/compute-utility/Chart.yaml index 38ce55f1..36bb273f 100644 --- a/charts/compute-utility/Chart.yaml +++ b/charts/compute-utility/Chart.yaml @@ -13,4 +13,4 @@ apiVersion: v1 description: porthole Compute Client name: compute-utility -version: 0.1.0 +version: 0.1.1 diff --git a/charts/compute-utility/templates/deployment-utility.yaml b/charts/compute-utility/templates/deployment-utility.yaml index 173f48d0..b929717e 100644 --- a/charts/compute-utility/templates/deployment-utility.yaml +++ b/charts/compute-utility/templates/deployment-utility.yaml @@ -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 limitations under the License. */}} + +{{- define "readinessProbeTemplate" }} +exec: + command: + - cat + - /tmp/done +{{- end }} + +{{- define "livenessProbeTemplate" }} +exec: + command: + - utilscli +{{- end }} + {{- if .Values.manifests.deployment_utility }} {{- $envAll := . }} @@ -78,21 +92,10 @@ spec: {{ 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 }} {{ 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: - /tmp/bootstrap.sh - readinessProbe: - exec: - command: - - cat - - /tmp/done - initialDelaySeconds: 5 - periodSeconds: 15 - livenessProbe: - exec: - command: - - utilscli - initialDelaySeconds: 5 - periodSeconds: 15 volumeMounts: - name: compute-utility-bin-utilscli mountPath: /tmp/bootstrap.sh diff --git a/charts/compute-utility/values.yaml b/charts/compute-utility/values.yaml index 07ca3a0f..e9c4db96 100644 --- a/charts/compute-utility/values.yaml +++ b/charts/compute-utility/values.yaml @@ -56,6 +56,21 @@ pod: type: apparmor compute-utility: 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: enabled: false utility: diff --git a/charts/mysqlclient-utility/Chart.yaml b/charts/mysqlclient-utility/Chart.yaml index 352c44e1..4de8d3e2 100644 --- a/charts/mysqlclient-utility/Chart.yaml +++ b/charts/mysqlclient-utility/Chart.yaml @@ -13,4 +13,4 @@ apiVersion: v1 description: Porthole MySql Client name: mysqlclient-utility -version: 0.1.3 +version: 0.1.4 diff --git a/charts/mysqlclient-utility/templates/deployment-utility.yaml b/charts/mysqlclient-utility/templates/deployment-utility.yaml index e9b761cd..4b035a5b 100644 --- a/charts/mysqlclient-utility/templates/deployment-utility.yaml +++ b/charts/mysqlclient-utility/templates/deployment-utility.yaml @@ -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 limitations under the License. */}} + +{{- define "readinessProbeTemplate" }} +exec: + command: + - cat + - /tmp/done +{{- end }} + +{{- define "livenessProbeTemplate" }} +exec: + command: + - utilscli +{{- end }} + {{- if .Values.manifests.deployment_utility }} {{- $envAll := . }} @@ -107,21 +121,10 @@ spec: {{ 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 }} {{ 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: - /tmp/bootstrap.sh - readinessProbe: - exec: - command: - - cat - - /tmp/done - initialDelaySeconds: 5 - periodSeconds: 15 - livenessProbe: - exec: - command: - - utilscli - initialDelaySeconds: 5 - periodSeconds: 15 env: - name: BACKUP_RESTORE_NAMESPACE_LIST value: {{ .Values.conf.mariadb_backup_restore.enabled_namespaces | quote }} diff --git a/charts/mysqlclient-utility/values.yaml b/charts/mysqlclient-utility/values.yaml index 18e4169c..8aec8b8a 100644 --- a/charts/mysqlclient-utility/values.yaml +++ b/charts/mysqlclient-utility/values.yaml @@ -98,6 +98,21 @@ pod: mariadb-ondemand: ondemand-perms: 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: enabled: false utility: