Skip to content

Commit

Permalink
Merge pull request #179 from grycap/longhorn
Browse files Browse the repository at this point in the history
Add support to longhorn CSI
  • Loading branch information
micafer authored May 7, 2024
2 parents b67dbc6 + 318315e commit 0ab8286
Show file tree
Hide file tree
Showing 3 changed files with 4,822 additions and 1 deletion.
11 changes: 11 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,14 @@ cilium_hubble_ui_ingress_enable: true
cilium_hubble_ui_ingress_host: ""
cilium_hubble_ui_ingress_tls_host: ""
cilium_hubble_ui_ingress_annotations: {}

# Longhorn support, if it is activated, the NFS client will be not installed
kube_install_longhorn: false
# Install ingress for Longhorn UI
kube_install_longhorn_ingress: false
# Default pass: longhorn_pass (openssl passwd -stdin -apr1)
kube_longhorn_ingress_auth: "longhorn:$apr1$e6BbrO3Q$llbCJ6cWJS/RWnLGYQhxX."
# Number of replicas for volumes in Longhorn
longhorn_num_replicas: 3
# Set reclaimPolicy of Longhorn StorageClass Delete or Retain
longhorn_reclaim_policy: Delete
11 changes: 10 additions & 1 deletion tasks/front.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,16 @@
command: kubectl apply -f /tmp/nfs-client.yaml
environment:
KUBECONFIG: "{{KUBECONFIG}}"
when: kube_install_nfs_client | bool
when: kube_install_nfs_client | bool and not kube_install_longhorn | bool

- block:
- name: Create longhorn.yaml
template: src=longhorn.j2 dest=/tmp/longhorn.yaml
- name: Apply longhorn.yaml
command: kubectl apply -f /tmp/longhorn.yaml
environment:
KUBECONFIG: "{{KUBECONFIG}}"
when: kube_install_longhorn | bool

- import_tasks: ingress.yaml
when: kube_install_ingress | bool
Expand Down
Loading

0 comments on commit 0ab8286

Please sign in to comment.