From e8f81ee93dac53eb6b2f4a43a6d9369ea9d259ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Fri, 12 May 2023 14:28:23 +0200 Subject: [PATCH] Revert "kata-deploy: Use readinessProbe to ensure everything is ready" This reverts commit 5ec9ae0f0498b7366fc85ed1448d36e3c9b6ac35, for two main reasons: * The readinessProbe was misintepreted by myself when working on the original PR * It's actually causing issues, as the pod ends up marked as not healthy. --- .../packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml | 3 --- tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml | 3 --- tools/packaging/kata-deploy/scripts/kata-deploy.sh | 2 -- 3 files changed, 8 deletions(-) diff --git a/tools/packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml b/tools/packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml index 23c3efe02..095876b73 100644 --- a/tools/packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml +++ b/tools/packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml @@ -21,9 +21,6 @@ spec: image: quay.io/kata-containers/kata-deploy:latest imagePullPolicy: Always command: [ "bash", "-c", "/opt/kata-artifacts/scripts/kata-deploy.sh reset" ] - readinessProbe: - exec: - command: [ "bash", "-c", "[ -f /opt/kata/kata-deployed ]", "&&", "bash", "-c", "[ $? == 1 ]" ] env: - name: NODE_NAME valueFrom: diff --git a/tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml b/tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml index 5b5d835b6..97e98ee74 100644 --- a/tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml +++ b/tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml @@ -18,9 +18,6 @@ spec: - name: kube-kata image: quay.io/kata-containers/kata-deploy:latest imagePullPolicy: Always - readinessProbe: - exec: - command: [ "bash", "-c", "[ -f /opt/kata/kata-deployed ]", "&&", "bash", "-c", "[ $? == 0 ]" ] lifecycle: preStop: exec: diff --git a/tools/packaging/kata-deploy/scripts/kata-deploy.sh b/tools/packaging/kata-deploy/scripts/kata-deploy.sh index d6be5019f..7e9841ad8 100755 --- a/tools/packaging/kata-deploy/scripts/kata-deploy.sh +++ b/tools/packaging/kata-deploy/scripts/kata-deploy.sh @@ -325,13 +325,11 @@ function main() { install_artifacts configure_cri_runtime "$runtime" kubectl label node "$NODE_NAME" --overwrite katacontainers.io/kata-runtime=true - touch /opt/kata/kata-deployed ;; cleanup) cleanup_cri_runtime "$runtime" kubectl label node "$NODE_NAME" --overwrite katacontainers.io/kata-runtime=cleanup remove_artifacts - rm /opt/kata/kata-deployed ;; reset) reset_runtime $runtime