Complete longhorn uninstall

This commit is contained in:
Adrien Reslinger 2023-06-14 11:10:09 +02:00
parent 1b4b097f57
commit eaf9ae9d1a
Signed by: adrien
GPG key ID: DA7B27055C66D6DE

View file

@ -96,6 +96,27 @@
with_items: with_items:
# - "longhorn_ingressroute.yaml.j2" # - "longhorn_ingressroute.yaml.j2"
- "longhorn-namespace.yml.j2" - "longhorn-namespace.yml.j2"
- name: Remove longhorn-crypt StorageClass
kubernetes.core.k8s:
state: absent
context: "{{ my_context }}"
definition:
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: longhorn-crypt
# - name: Remove longhorn Recurring Jobs
# kubernetes.core.k8s:
# state: absent
# context: "{{ my_context }}"
# namespace: "{{ storage_longhorn_namespace }}"
# resource_definition: "{{ lookup('template', 'longhorn/longhorn_recurringjob.yml.j2') | from_yaml }}"
# with_items:
# - { name: "snapshot", cron: "1 * * * *", task: "snapshot", retain: 25 }
# - { name: "backup-daily", cron: "0 1 * * *", task: "backup", retain: 8 }
when: when:
- not storage_longhorn_enabled - not storage_longhorn_enabled
tags: tags: