Deploy local-path 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
fdbebb2d57
commit
74333953a8
18 changed files with 211 additions and 224 deletions
|
|
@ -4,26 +4,6 @@
|
|||
# Run from files directory
|
||||
#
|
||||
|
||||
wget https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml
|
||||
kubernetes-split-yaml local-path-storage.yaml > generated.log
|
||||
mv files/local{,.old}
|
||||
mv generated files/local
|
||||
echo -e "---\nstorage_localpath_files_list:" > vars/local.yaml
|
||||
cat generated.log | while read LIGNE; do if [ $(echo "${LIGNE}" | grep -c ^File) -eq 1 ]; then echo -n "${LIGNE} "; else echo "${LIGNE}"; fi; done | grep ^File | sort -V | sed 's|.*\(generated/\)\(.*\.yaml\)| - "\2"|' >> vars/local.yaml
|
||||
sed 's|/opt/local-path-provisioner|/mnt/local|' -i files/local/local-path-config-ConfigMap.yaml
|
||||
#mv local-path-storage.yaml local-path-storage_$(date +%Y%m%d).yaml
|
||||
rm -fr files/local.old generated.log local-path-storage.yaml
|
||||
|
||||
wget https://raw.githubusercontent.com/longhorn/longhorn/master/deploy/longhorn.yaml
|
||||
kubernetes-split-yaml longhorn.yaml > generated.log
|
||||
mv files/longhorn{,.old}
|
||||
mv generated files/longhorn
|
||||
echo -e "---\nstorage_longhorn_files_list:" > vars/longhorn.yaml
|
||||
cat generated.log | while read LIGNE; do if [ $(echo "${LIGNE}" | grep -c ^File) -eq 1 ]; then echo -n "${LIGNE} "; else echo "${LIGNE}"; fi; done | grep ^File | sort -V | sed 's|.*\(generated/\)\(.*\.yaml\)| - "\2"|' >> vars/longhorn.yaml
|
||||
sed '/numberOfReplicas/ s/3/2/' -i files/longhorn/longhorn-storageclass-ConfigMap.yaml
|
||||
sed '/default-data-path/ s|:.*$|: "/var/lib/longhorn/"|' -i files/longhorn/longhorn-default-setting-ConfigMap.yaml
|
||||
rm -fr files/longhorn.old generated.log longhorn.yaml
|
||||
|
||||
#git clone https://github.com/linode/linode-blockstorage-csi-driver.git
|
||||
#mv linode{,.old}
|
||||
#mv linode-blockstorage-csi-driver/pkg/linode-bs/deploy/kubernetes linode
|
||||
|
|
@ -57,30 +37,6 @@ done
|
|||
rm -fr files/digitalocean.old
|
||||
|
||||
|
||||
# https://github.com/kubernetes-incubator/external-storage/tree/master/nfs
|
||||
NFS_FILE=vars/nfs.yml
|
||||
echo -e "---\nstore_nfs_files:" > "${NFS_FILE}"
|
||||
mv files/nfs{,.old}
|
||||
mkdir files/nfs
|
||||
for FICHIER in psp.yaml rbac.yaml deployment.yaml class.yaml; do
|
||||
wget https://github.com/kubernetes-incubator/external-storage/raw/master/nfs/deploy/kubernetes/$FICHIER
|
||||
kubernetes-split-yaml $FICHIER >> generated.log
|
||||
mv generated/* files/nfs/
|
||||
cat generated.log | while read LIGNE; do if [ $(echo "${LIGNE}" | grep -c ^File) -eq 1 ]; then echo -n "${LIGNE} "; else echo "${LIGNE}"; fi; done | grep ^File | sort -V | sed 's|.*\(generated/\)\(.*\.yaml\)| - "\2"|' >> "${NFS_FILE}"
|
||||
rm -f $FICHIER generated.log
|
||||
done
|
||||
for i in nfs-provisioner-runner-ClusterRole.yaml run-nfs-provisioner-ClusterRoleBinding.yaml leader-locking-nfs-provisioner-Role.yaml leader-locking-nfs-provisioner-RoleBinding.yaml; do
|
||||
sed "s/namespace:.*/namespace: nfs-provisioner/g" -i files/nfs/$i
|
||||
done
|
||||
sed 's|^\(apiVersion:\).*|\1 policy/v1beta1|' -i files/nfs/nfs-provisioner-PodSecurityPolicy.yaml
|
||||
sed 's|\(.*-provisioner=\).*"|\1reslinger.net/nfs"|' -i files/nfs/nfs-provisioner-Deployment.yaml
|
||||
sed 's/example-nfs-//' -i "${NFS_FILE}"
|
||||
mv files/nfs/example-nfs-StorageClass.yaml files/nfs/StorageClass.yaml
|
||||
sed 's|example-nfs|nfs|' -i files/nfs/StorageClass.yaml
|
||||
sed 's|example.com/nfs|reslinger.net/nfs|' -i files/nfs/StorageClass.yaml
|
||||
rm -fr files/nfs.old
|
||||
|
||||
|
||||
|
||||
#https://github.com/scaleway/scaleway-csi
|
||||
#https://github.com/kubernetes-sigs/alibaba-cloud-csi-driver
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue