diff --git a/argocd/templates/nfs-client.yaml b/argocd/templates/nfs-client.yaml new file mode 100644 index 0000000..5fb2f7a --- /dev/null +++ b/argocd/templates/nfs-client.yaml @@ -0,0 +1,21 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: nfs-client + namespace: argocd +spec: + project: default + source: + repoURL: https://github.com/DeveloperDurp/homelab.git + targetRevision: main + path: nfs-client + destination: + namespace: nfs-client + name: in-cluster + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=true + diff --git a/nfs-client/Chart.yml b/nfs-client/Chart.yml new file mode 100644 index 0000000..217f2c1 --- /dev/null +++ b/nfs-client/Chart.yml @@ -0,0 +1,8 @@ +apiVersion: v2 +name: nfs-client +description: A Helm chart for Kubernetes +type: application + +version: 0.1.0 +appVersion: "1.16.0" + diff --git a/nfs-client/templates/cluster-role-binding.yml b/nfs-client/templates/cluster-role-binding.yml new file mode 100644 index 0000000..427d8c6 --- /dev/null +++ b/nfs-client/templates/cluster-role-binding.yml @@ -0,0 +1,12 @@ +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: run-nfs-client-provisioner +subjects: + - kind: ServiceAccount + name: nfs-client-provisioner + namespace: nfs-client +roleRef: + kind: ClusterRole + name: nfs-client-provisioner-runner + apiGroup: rbac.authorization.k8s.io diff --git a/nfs-client/templates/cluster-role.yml b/nfs-client/templates/cluster-role.yml new file mode 100644 index 0000000..fa6ed20 --- /dev/null +++ b/nfs-client/templates/cluster-role.yml @@ -0,0 +1,20 @@ +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: nfs-client-provisioner-runner +rules: + - apiGroups: [""] + resources: ["persistentvolumes"] + verbs: ["get", "list", "watch", "create", "delete"] + - apiGroups: [""] + resources: ["persistentvolumeclaims"] + verbs: ["get", "list", "watch", "update"] + - apiGroups: ["storage.k8s.io"] + resources: ["storageclasses"] + verbs: ["get", "list", "watch"] + - apiGroups: [""] + resources: ["events"] + verbs: ["create", "update", "patch"] + - apiGroups: [""] + resources: ["endpoints"] + verbs: ["get", "list", "watch", "create", "update", "patch"] diff --git a/nfs-client/templates/provisioner.yml b/nfs-client/templates/provisioner.yml new file mode 100644 index 0000000..a0daa08 --- /dev/null +++ b/nfs-client/templates/provisioner.yml @@ -0,0 +1,42 @@ +kind: Deployment +apiVersion: apps/v1 +metadata: + name: nfs-client-provisioner + namespace: nfs-client +spec: + selector: + matchLabels: + app: nfs-client-provisioner + replicas: 1 + strategy: + type: Recreate + template: + metadata: + labels: + app: nfs-client-provisioner + spec: + serviceAccountName: nfs-client-provisioner + containers: + - name: nfs-client-provisioner + image: quay.io/external_storage/nfs-client-provisioner-arm:latest + resources: + requests: + cpu: 500m + memory: 512Mi + limits: + memory: 1Gi + volumeMounts: + - name: nfs-client-ssd + mountPath: /persistentvolumes + env: + - name: PROVISIONER_NAME + value: durp.info/nfs + - name: NFS_SERVER + value: 192.168.20.253 + - name: NFS_PATH + value: /mnt/user/k3s + volumes: + - name: nfs-client-ssd + nfs: + server: 192.168.20.253 + path: /mnt/user/k3s diff --git a/nfs-client/templates/role-binding.yml b/nfs-client/templates/role-binding.yml new file mode 100644 index 0000000..fb0f085 --- /dev/null +++ b/nfs-client/templates/role-binding.yml @@ -0,0 +1,13 @@ +kind: RoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: leader-locking-nfs-client-provisioner + namespace: nfs-client +subjects: + - kind: ServiceAccount + name: nfs-client-provisioner + namespace: nfs-client +roleRef: + kind: Role + name: leader-locking-nfs-client-provisioner + apiGroup: rbac.authorization.k8s.io diff --git a/nfs-client/templates/role.yml b/nfs-client/templates/role.yml new file mode 100644 index 0000000..910346d --- /dev/null +++ b/nfs-client/templates/role.yml @@ -0,0 +1,9 @@ +kind: Role +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: leader-locking-nfs-client-provisioner + namespace: nfs-client +rules: + - apiGroups: [""] + resources: ["endpoints"] + verbs: ["get", "list", "watch", "create", "update", "patch"] diff --git a/nfs-client/templates/service-account.yml b/nfs-client/templates/service-account.yml new file mode 100644 index 0000000..ef9b4d7 --- /dev/null +++ b/nfs-client/templates/service-account.yml @@ -0,0 +1,5 @@ +kind: ServiceAccount +apiVersion: v1 +metadata: + name: nfs-client-provisioner + namespace: nfs-client diff --git a/nfs-client/templates/storage-class.yml b/nfs-client/templates/storage-class.yml new file mode 100644 index 0000000..949a74b --- /dev/null +++ b/nfs-client/templates/storage-class.yml @@ -0,0 +1,7 @@ +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + name: nfs-storage +provisioner: durp.info/nfs +parameters: + archiveOnDelete: "false"