Fix indentation & add longhorn-crypt StorageClass
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
b231db641a
commit
fe7ec521f2
1 changed files with 32 additions and 21 deletions
|
|
@ -39,28 +39,39 @@
|
|||
namespace: "{{ storage_longhorn_namespace }}"
|
||||
resource_definition: "{{ lookup('template', 'longhorn/longhorn_recurringjob.yml.j2') | from_yaml }}"
|
||||
with_items:
|
||||
- {
|
||||
name: "snapshot",
|
||||
ansible.builtin.cron: "1 * * * *",
|
||||
task: "snapshot",
|
||||
retain: 25
|
||||
}
|
||||
- {
|
||||
name: "backup-daily",
|
||||
ansible.builtin.cron: "0 1 * * *",
|
||||
task: "backup",
|
||||
retain: 8
|
||||
}
|
||||
- { name: "snapshot", cron: "1 * * * *", task: "snapshot", retain: 25 }
|
||||
- { name: "backup-daily", cron: "0 1 * * *", task: "backup", retain: 8 }
|
||||
|
||||
- name: Add longhorn-crypt StorageClass
|
||||
kubernetes.core.k8s:
|
||||
state: present
|
||||
context: "{{ my_context }}"
|
||||
definition:
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
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:
|
||||
- storage_longhorn_enabled
|
||||
tags:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue