<commit_before>helm repo add nfs-subdir-external-provisioner https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner/
helm install nfs-subdir-external-provisioner nfs-subdir-external-provisioner/nfs-subdir-external-provisioner \
    --set nfs.server=192.168.50.142 \
    --set nfs.path=/volumeUSB1/usbshare \
    --namespace nfs-subdir-external-provisioner \
    --create-namespace<commit_msg>Add nfs setup script for K8s cluster<commit_after>#!/bin/bash
#
# Instructions from: https://benyoung.blog/persistent-storage-class-in-kubernetes-backed-by-synology-nfs/
#
echo "Installing NFS subdir external provisioner."
helm repo add nfs-subdir-external-provisioner https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner/
helm install nfs-subdir-external-provisioner nfs-subdir-external-provisioner/nfs-subdir-external-provisioner \
    --set nfs.server=192.168.50.142 \
    --set nfs.path=/volumeUSB1/usbshare \
    --namespace nfs-subdir-external-provisioner \
    --create-namespace

# Set as default storage provider
echo "Setting provisioner as default"
kubectl patch storageclass nfs-client -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'

# Verify
echo "Verify that (default) is shown below"
kubectl get storageclass

echo "Showing all current PVCs"
kubectl describe pvc -A

# Verify that claims are successful
echo "Applying test pod with a pvc claim."
kubectl create -f https://raw.githubusercontent.com/kubernetes-sigs/nfs-subdir-external-provisioner/master/deploy/test-claim.yaml -f https://raw.githubusercontent.com/kubernetes-sigs/nfs-subdir-external-provisioner/master/deploy/test-pod.yaml

echo "Check that the PVC claim is successful"
kubectl describe pvc -A

echo "Clean up."
kubectl delete -f https://raw.githubusercontent.com/kubernetes-sigs/nfs-subdir-external-provisioner/master/deploy/test-claim.yaml -f https://raw.githubusercontent.com/kubernetes-sigs/nfs-subdir-external-provisioner/master/deploy/test-pod.yaml


{'fraction_non_alphanumeric': 0.12224448897795591, 'fraction_numerical': 0.012525050100200401, 'mean_word_length': 4.531855955678671, 'pattern_counts': {'":': 3, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 7, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4455277', 'n_tokens_mistral': 694, 'n_tokens_neox': 661, 'n_words': 124}