Skip to content
Snippets Groups Projects
Commit 122fce02 authored by František Dvořák's avatar František Dvořák
Browse files

Local path provisioner in Kubernetes to implement ephemeral volumes

parent 40d6416d
No related branches found
No related tags found
No related merge requests found
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
- atop - atop
- cron-apt - cron-apt
- fail2ban - fail2ban
- git
- mc - mc
- vim - vim
- postfix - postfix
...@@ -262,6 +263,44 @@ ...@@ -262,6 +263,44 @@
KUBECONFIG: /etc/kubernetes/admin.conf KUBECONFIG: /etc/kubernetes/admin.conf
PATH: /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin PATH: /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
when: true when: true
- name: Git clone local-path-provisioner
git:
repo: https://github.com/rancher/local-path-provisioner.git
dest: "/root/git-local-path-provisioner"
clone: yes
update: no
version: v0.0.26
- name: Local path provisioner configuration
copy:
dest: /tmp/local-path-provisioner.yaml
mode: 0644
content: |
storageClass:
defaultClass: false
defaultVolumeType: hostPath
name: local-path
nodePathMap:
- node: DEFAULT_PATH_FOR_NON_LISTED_NODES
paths:
- /scratch
- name: Local path provisioner deployment
vars:
config: >-
--namespace local-path-storage
-f /tmp/local-path-provisioner.yaml
local-path-storage
/root/git-local-path-provisioner/deploy/chart/local-path-provisioner/
shell: |-
helm status --namespace local-path-storage local-path-storage
if [ $? -ne 0 ]; then
helm install {{ config }}
else
helm upgrade {{ config }}
fi
environment:
KUBECONFIG: /etc/kubernetes/admin.conf
PATH: /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
when: true
- name: Helm repo add ingress-nginx - name: Helm repo add ingress-nginx
shell: |- shell: |-
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment