Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to longhorn CSI #179

Merged
merged 2 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading