Deploy NFS provisioner with helm
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
f2ec497c75
commit
f0baecfec6
12 changed files with 26 additions and 241 deletions
|
|
@ -2,26 +2,42 @@
|
|||
# https://github.com/kubernetes-incubator/external-storage/blob/master/nfs/docs/deployment.md
|
||||
# Ne pas oublier de "sudo chcon -Rt svirt_sandbox_file_t /srv" pour le stockage
|
||||
# ou alors tourner le container en privileged
|
||||
- name: Include file list
|
||||
include_vars: "nfs.yaml"
|
||||
|
||||
- name: Defined nfs-provisioner state to present
|
||||
check_mode: false
|
||||
set_fact:
|
||||
storage_nfs_state: present
|
||||
when:
|
||||
- storage_nfs|bool
|
||||
|
||||
- name: find state of nfs-provisioner
|
||||
check_mode: false
|
||||
set_fact:
|
||||
storage_nfs_state: absent
|
||||
when:
|
||||
- not storage_nfs|bool
|
||||
|
||||
- name: nfs-provisioner need to be {{ storage_nfs_state }}
|
||||
k8s:
|
||||
state: "{{ storage_nfs_state }}"
|
||||
# https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner/blob/master/charts/nfs-subdir-external-provisioner/README.md
|
||||
- name: Defined NFS Provisioner repository
|
||||
community.kubernetes.helm_repository:
|
||||
name: nfs-subdir-external-provisioner
|
||||
repo_url: "https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner"
|
||||
|
||||
- name: Deploy latest version of NFS Provisioner
|
||||
community.kubernetes.helm:
|
||||
context: "{{ my_context }}"
|
||||
merge_type: merge
|
||||
resource_definition: "{{ lookup('file', 'nfs/' + item) | from_yaml }}"
|
||||
with_items:
|
||||
- "{{ store_nfs_files }}"
|
||||
state: "{{ storage_nfs_state }}"
|
||||
name: nfs-subdir-external-provisioner
|
||||
chart_ref: nfs-subdir-external-provisioner/nfs-subdir-external-provisioner
|
||||
create_namespace: yes
|
||||
release_namespace: "{{ storage_nfs_namespace }}"
|
||||
values:
|
||||
nfs:
|
||||
server: x.x.x.x
|
||||
path: /exported/path
|
||||
podSecurityPolicy:
|
||||
enabled: true
|
||||
# storageClass:
|
||||
# name: nfs-client
|
||||
# defaultClass: false
|
||||
# provisionerName: ""
|
||||
# accessModes: ReadWriteOnce
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue