From bad5cce36d14567e65ac0e0095e0bf3707bd4d3f Mon Sep 17 00:00:00 2001 From: Matthew Rossi Date: Mon, 2 Dec 2024 01:16:06 +0100 Subject: [PATCH] Remove Local Path Provisioner --- base/apps/base/kustomization.yaml | 1 - base/apps/base/local-path-storage.yaml | 178 ------------------- overlays/integration/base/kustomization.yaml | 2 - overlays/integration/base/patch-waves.yaml | 24 --- overlays/validation/base/kustomization.yaml | 1 - overlays/validation/base/patch-waves.yaml | 24 --- 6 files changed, 230 deletions(-) delete mode 100644 base/apps/base/local-path-storage.yaml delete mode 100644 overlays/integration/base/patch-waves.yaml delete mode 100644 overlays/validation/base/patch-waves.yaml diff --git a/base/apps/base/kustomization.yaml b/base/apps/base/kustomization.yaml index 44d3ca8..6875c94 100644 --- a/base/apps/base/kustomization.yaml +++ b/base/apps/base/kustomization.yaml @@ -1,7 +1,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - - local-path-storage.yaml - nginx-ingress.yaml - jena-fuseki.yaml - longhorn.yaml diff --git a/base/apps/base/local-path-storage.yaml b/base/apps/base/local-path-storage.yaml deleted file mode 100644 index 9abeaa0..0000000 --- a/base/apps/base/local-path-storage.yaml +++ /dev/null @@ -1,178 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - name: local-path-storage - annotations: - argocd.argoproj.io/hook: PreSync - argocd.argoproj.io/sync-wave: "-10" ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: local-path-provisioner-service-account - namespace: local-path-storage - annotations: - argocd.argoproj.io/hook: PreSync - argocd.argoproj.io/sync-wave: "-10" ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: local-path-provisioner-role - namespace: local-path-storage - annotations: - argocd.argoproj.io/hook: PreSync - argocd.argoproj.io/sync-wave: "-10" -rules: - - apiGroups: [""] - resources: ["pods"] - verbs: ["get", "list", "watch", "create", "patch", "update", "delete"] ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: local-path-provisioner-role - annotations: - argocd.argoproj.io/hook: PreSync - argocd.argoproj.io/sync-wave: "-10" -rules: - - apiGroups: [""] - resources: ["nodes", "persistentvolumeclaims", "configmaps", "pods", "pods/log"] - verbs: ["get", "list", "watch"] - - apiGroups: [""] - resources: ["persistentvolumes"] - verbs: ["get", "list", "watch", "create", "patch", "update", "delete"] - - apiGroups: [""] - resources: ["events"] - verbs: ["create", "patch"] - - apiGroups: ["storage.k8s.io"] - resources: ["storageclasses"] - verbs: ["get", "list", "watch"] ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: local-path-provisioner-bind - namespace: local-path-storage - annotations: - argocd.argoproj.io/hook: PreSync - argocd.argoproj.io/sync-wave: "-10" -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: local-path-provisioner-role -subjects: - - kind: ServiceAccount - name: local-path-provisioner-service-account - namespace: local-path-storage ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: local-path-provisioner-bind - annotations: - argocd.argoproj.io/hook: PreSync - argocd.argoproj.io/sync-wave: "-10" -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: local-path-provisioner-role -subjects: - - kind: ServiceAccount - name: local-path-provisioner-service-account - namespace: local-path-storage ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: local-path-provisioner - namespace: local-path-storage - annotations: - argocd.argoproj.io/hook: Sync - argocd.argoproj.io/sync-wave: "-10" -spec: - replicas: 1 - selector: - matchLabels: - app: local-path-provisioner - template: - metadata: - labels: - app: local-path-provisioner - spec: - serviceAccountName: local-path-provisioner-service-account - containers: - - name: local-path-provisioner - image: rancher/local-path-provisioner:v0.0.26 - imagePullPolicy: IfNotPresent - command: - - local-path-provisioner - - --debug - - start - - --config - - /etc/config/config.json - volumeMounts: - - name: config-volume - mountPath: /etc/config/ - env: - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - volumes: - - name: config-volume - configMap: - name: local-path-config ---- -apiVersion: storage.k8s.io/v1 -kind: StorageClass -metadata: - name: local-path - annotations: - argocd.argoproj.io/hook: Sync - argocd.argoproj.io/sync-wave: "-10" -provisioner: rancher.io/local-path -volumeBindingMode: WaitForFirstConsumer -reclaimPolicy: Delete ---- -kind: ConfigMap -apiVersion: v1 -metadata: - name: local-path-config - namespace: local-path-storage - annotations: - argocd.argoproj.io/hook: PreSync - argocd.argoproj.io/sync-wave: "-10" -data: - config.json: |- - { - "nodePathMap":[ - { - "node":"DEFAULT_PATH_FOR_NON_LISTED_NODES", - "paths":["/opt/local-path-provisioner"] - } - ] - } - setup: |- - #!/bin/sh - set -eu - mkdir -m 0777 -p "$VOL_DIR" - teardown: |- - #!/bin/sh - set -eu - rm -rf "$VOL_DIR" - helperPod.yaml: |- - apiVersion: v1 - kind: Pod - metadata: - name: helper-pod - spec: - priorityClassName: system-node-critical - tolerations: - - key: node.kubernetes.io/disk-pressure - operator: Exists - effect: NoSchedule - containers: - - name: helper-pod - image: busybox - imagePullPolicy: IfNotPresent diff --git a/overlays/integration/base/kustomization.yaml b/overlays/integration/base/kustomization.yaml index 881b14a..4fe4fc9 100644 --- a/overlays/integration/base/kustomization.yaml +++ b/overlays/integration/base/kustomization.yaml @@ -3,5 +3,3 @@ kind: Kustomization resources: - ../../../base/argocd - ../../../base/apps/base -patches: - - path: patch-waves.yaml diff --git a/overlays/integration/base/patch-waves.yaml b/overlays/integration/base/patch-waves.yaml deleted file mode 100644 index a368870..0000000 --- a/overlays/integration/base/patch-waves.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - name: local-path-storage - annotations: - argocd.argoproj.io/hook: PreSync - argocd.argoproj.io/sync-wave: "-10" ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: local-path-provisioner-service-account - namespace: local-path-storage - annotations: - argocd.argoproj.io/hook: PreSync - argocd.argoproj.io/sync-wave: "-10" ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: local-path-provisioner - namespace: local-path-storage - annotations: - argocd.argoproj.io/sync-wave: "-9" \ No newline at end of file diff --git a/overlays/validation/base/kustomization.yaml b/overlays/validation/base/kustomization.yaml index 432b15e..b65e7fa 100644 --- a/overlays/validation/base/kustomization.yaml +++ b/overlays/validation/base/kustomization.yaml @@ -4,7 +4,6 @@ resources: - ../../../base/argocd - ../../../base/apps/base patches: - - path: patch-waves.yaml - path: patch-optional.yaml - patch: |- - op: replace diff --git a/overlays/validation/base/patch-waves.yaml b/overlays/validation/base/patch-waves.yaml deleted file mode 100644 index a368870..0000000 --- a/overlays/validation/base/patch-waves.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - name: local-path-storage - annotations: - argocd.argoproj.io/hook: PreSync - argocd.argoproj.io/sync-wave: "-10" ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: local-path-provisioner-service-account - namespace: local-path-storage - annotations: - argocd.argoproj.io/hook: PreSync - argocd.argoproj.io/sync-wave: "-10" ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: local-path-provisioner - namespace: local-path-storage - annotations: - argocd.argoproj.io/sync-wave: "-9" \ No newline at end of file