diff --git a/cesnet-central/playbooks/k8s.yaml b/cesnet-central/playbooks/k8s.yaml index 28d0277980bcd89a724243f9601d0f9e23298b7e..26daba2a6ce0c491beecb566efb487450f4c2bca 100644 --- a/cesnet-central/playbooks/k8s.yaml +++ b/cesnet-central/playbooks/k8s.yaml @@ -167,11 +167,6 @@ dest: /etc/profile.d/k8s-cheats.sh src: files//etc/profile.d/k8s-cheats.sh mode: preserve - - name: K8s pods cleaner - copy: - dest: /usr/local/bin/k8s-pods-cleaner.sh - src: files/usr/local/bin/k8s-pods-cleaner.sh - mode: preserve - name: K8s network deployment hosts: master diff --git a/cesnet-central/playbooks/notebooks.yaml b/cesnet-central/playbooks/notebooks.yaml index 119e6769b10647df1919b624f5e611318dd902f4..5da0f74fd74b4ff48fc36ca02951175a0a6f43bd 100644 --- a/cesnet-central/playbooks/notebooks.yaml +++ b/cesnet-central/playbooks/notebooks.yaml @@ -119,13 +119,19 @@ - "../extra/*.yaml" when: true # Workaround for pods stuck in "Terminating" state + - name: K8s pods cleaner script + copy: + dest: /usr/local/bin/k8s-pods-cleaner.sh + src: files/usr/local/bin/k8s-pods-cleaner.sh + mode: preserve + # Workaround for pods stuck in "Terminating" state - name: Regular cleanup of failed user notebooks pods vars: name: "{{ item | basename | splitext | first }}" cron: cron_file: "notebooks-{{ name }}-cleaner" name: "Notebooks {{ name }} cleanup" - minute: "*/2" + minute: "*" hour: "*" job: "KUBECONFIG=$HOME/.kube/config /usr/local/bin/k8s-pods-cleaner.sh '{{ name }}' app=jupyterhub,component=singleuser-server --yes >/dev/null 2>&1" user: egi