Skip to content
Snippets Groups Projects
Commit eb8fe6a2 authored by František Dvořák's avatar František Dvořák
Browse files

Enable regular cleaning of stuck kubernetes pods notebooks

parent b0a69478
No related branches found
No related tags found
No related merge requests found
......@@ -118,6 +118,19 @@
with_fileglob:
- "../extra/*.yaml"
when: true
# 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"
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
with_fileglob:
- "../deployments/*.yaml"
- hosts: nfs
become: true
tasks:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment