From d4b9a56a76985196bfb69ceacdbfaf0656c5978c Mon Sep 17 00:00:00 2001 From: Soufiane Jounaid Date: Wed, 17 Jan 2024 00:29:37 +0100 Subject: [PATCH] calico ip cleanup hammer --- roles/hammers/defaults/main.yml | 7 +++++++ roles/hammers/tasks/main.yml | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/roles/hammers/defaults/main.yml b/roles/hammers/defaults/main.yml index 3ec4ef8b..2d91626b 100644 --- a/roles/hammers/defaults/main.yml +++ b/roles/hammers/defaults/main.yml @@ -2,6 +2,7 @@ hammers_config_path: /etc/hammers hammers_docker_image: "ghcr.io/chameleoncloud/hammers:latest" hammers_env_file: /etc/hammers/hammers.env +hammers_kubeconfig_path: /etc/hammers/kubeconfig.yml hammers_mysql_user: cc_hammers hammers_mysql_host: "{{ database_address }}" @@ -62,4 +63,10 @@ hammers: calendar: hourly enabled: "{{ enable_blazar | bool }}" + # Kubernetes/Edge + calico_ip_cleanup: + cmd: "k8s-calico-ip-cleanup --kubeconfig_path {{ hammers_kubeconfig_path }} --dry-run" + calendar: daily + enabled: "{{ enable_k3s | bool}}" + hammers_slack_webhook: "{{ slack_api_url }}" diff --git a/roles/hammers/tasks/main.yml b/roles/hammers/tasks/main.yml index 33562536..ac73174e 100644 --- a/roles/hammers/tasks/main.yml +++ b/roles/hammers/tasks/main.yml @@ -12,6 +12,13 @@ path: "{{ hammers_config_path }}" state: directory +- name: Copy kubeconfig.yml file + become: yes + copy: + src: "{{ kubeconfig_path }}/kubeconfig.yml" + dest: "{{ hammers_kubeconfig_path }}" + mode: 0600 + - name: Configure Hammers docker bash wrapper become: yes template: