Fix indentation & add longhorn-crypt StorageClass
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Adrien Reslinger 2022-11-30 07:08:16 +01:00
parent b231db641a
commit fe7ec521f2
Signed by: adrien
GPG key ID: DA7B27055C66D6DE

View file

@ -39,28 +39,39 @@
namespace: "{{ storage_longhorn_namespace }}" namespace: "{{ storage_longhorn_namespace }}"
resource_definition: "{{ lookup('template', 'longhorn/longhorn_recurringjob.yml.j2') | from_yaml }}" resource_definition: "{{ lookup('template', 'longhorn/longhorn_recurringjob.yml.j2') | from_yaml }}"
with_items: with_items:
- { - { name: "snapshot", cron: "1 * * * *", task: "snapshot", retain: 25 }
name: "snapshot", - { name: "backup-daily", cron: "0 1 * * *", task: "backup", retain: 8 }
ansible.builtin.cron: "1 * * * *",
task: "snapshot", - name: Add longhorn-crypt StorageClass
retain: 25 kubernetes.core.k8s:
} state: present
- { context: "{{ my_context }}"
name: "backup-daily", definition:
ansible.builtin.cron: "0 1 * * *", apiVersion: storage.k8s.io/v1
task: "backup", kind: StorageClass
retain: 8 metadata:
} annotations:
storageclass.kubernetes.io/is-default-class: "false"
name: longhorn-crypt
provisioner: driver.longhorn.io
reclaimPolicy: Delete
volumeBindingMode: Immediate
allowVolumeExpansion: true
parameters:
numberOfReplicas: "3"
staleReplicaTimeout: "2880"
dataLocality: best-effort
fromBackup: ""
encrypted: "true"
csi.storage.k8s.io/provisioner-secret-name: "longhorn-crypto"
csi.storage.k8s.io/provisioner-secret-namespace: ${pvc.namespace}
csi.storage.k8s.io/node-publish-secret-name: "longhorn-crypto"
csi.storage.k8s.io/node-publish-secret-namespace: ${pvc.namespace}
csi.storage.k8s.io/node-stage-secret-name: "longhorn-crypto"
csi.storage.k8s.io/node-stage-secret-namespace: ${pvc.namespace}
csi.storage.k8s.io/fsType: ext4
recurringJobSelector: '[{"name":"snapshot","isGroup":true}, {"name":"backup-daily","isGroup":true}]'
# - name: Install longhorn UI Ingress
# kubernetes.core.k8s:
# state: present
# context: "{{ my_context }}"
# apply: true
# namespace: "{{ storage_longhorn_namespace }}"
# resource_definition: "{{ lookup('template', 'longhorn/' + item) | from_yaml }}"
# with_items:
# - "longhorn_ingressroute.yaml.j2"
when: when:
- storage_longhorn_enabled - storage_longhorn_enabled
tags: tags: