---
# Source: local-path-provisioner/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  name: local-path-provisioner
  labels:
    app.kubernetes.io/name: local-path-provisioner
    helm.sh/chart: local-path-provisioner-0.0.24
    app.kubernetes.io/instance: local-path-provisioner
    app.kubernetes.io/version: "v0.0.24"
    app.kubernetes.io/managed-by: Helm
imagePullSecrets:
---
# Source: local-path-provisioner/templates/configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: local-path-config
  labels:
    app.kubernetes.io/name: local-path-provisioner
    helm.sh/chart: local-path-provisioner-0.0.24
    app.kubernetes.io/instance: local-path-provisioner
    app.kubernetes.io/version: "v0.0.24"
    app.kubernetes.io/managed-by: Helm
data:
  config.json: |-
    {
      "nodePathMap": 
        [
          {
            "node": "DEFAULT_PATH_FOR_NON_LISTED_NODES",
            "paths": [
              "/data/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:
      containers:
        - name: helper-pod
          image: registry.cn-shenzhen.aliyuncs.com/shuhui/busybox:1.36-glibc
          imagePullPolicy: IfNotPresent
---
# Source: local-path-provisioner/templates/storageclass.yaml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: local-path
  labels:
    app.kubernetes.io/name: local-path-provisioner
    helm.sh/chart: local-path-provisioner-0.0.24
    app.kubernetes.io/instance: local-path-provisioner
    app.kubernetes.io/version: "v0.0.24"
    app.kubernetes.io/managed-by: Helm
provisioner: cluster.local/local-path-provisioner
volumeBindingMode: WaitForFirstConsumer
reclaimPolicy: Delete
allowVolumeExpansion: true
---
# Source: local-path-provisioner/templates/clusterrole.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: local-path-provisioner
  labels:
    app.kubernetes.io/name: local-path-provisioner
    helm.sh/chart: local-path-provisioner-0.0.24
    app.kubernetes.io/instance: local-path-provisioner
    app.kubernetes.io/version: "v0.0.24"
    app.kubernetes.io/managed-by: Helm
rules:
- apiGroups: [""]
  resources: ["nodes", "persistentvolumeclaims", "configmaps"]
  verbs: ["get", "list", "watch"]
- apiGroups: [""]
  resources: ["endpoints", "persistentvolumes", "pods"]
  verbs: ["*"]
- apiGroups: [""]
  resources: ["events"]
  verbs: ["create", "patch"]
- apiGroups: ["storage.k8s.io"]
  resources: ["storageclasses"]
  verbs: ["get", "list", "watch"]
---
# Source: local-path-provisioner/templates/clusterrolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: local-path-provisioner
  labels:
    app.kubernetes.io/name: local-path-provisioner
    helm.sh/chart: local-path-provisioner-0.0.24
    app.kubernetes.io/instance: local-path-provisioner
    app.kubernetes.io/version: "v0.0.24"
    app.kubernetes.io/managed-by: Helm
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: local-path-provisioner
subjects:
  - kind: ServiceAccount
    name: local-path-provisioner
    namespace: kube-system
---
# Source: local-path-provisioner/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: local-path-provisioner
  labels:
    app.kubernetes.io/name: local-path-provisioner
    helm.sh/chart: local-path-provisioner-0.0.24
    app.kubernetes.io/instance: local-path-provisioner
    app.kubernetes.io/version: "v0.0.24"
    app.kubernetes.io/managed-by: Helm
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: local-path-provisioner
      app.kubernetes.io/instance: local-path-provisioner
  template:
    metadata:
      labels:
        app.kubernetes.io/name: local-path-provisioner
        app.kubernetes.io/instance: local-path-provisioner
    spec:
      serviceAccountName: local-path-provisioner
      containers:
        - name: local-path-provisioner
          image: "registry.cn-shenzhen.aliyuncs.com/shuhui/local-path-provisioner:v0.0.24"
          imagePullPolicy: IfNotPresent
          command:
            - local-path-provisioner
            - --debug
            - start
            - --config
            - /etc/config/config.json
            - --service-account-name
            - local-path-provisioner
            - --provisioner-name
            - cluster.local/local-path-provisioner
            - --helper-image
            - "registry.cn-shenzhen.aliyuncs.com/shuhui/busybox:1.36-glibc"
            - --configmap-name
            - local-path-config
          volumeMounts:
            - name: config-volume
              mountPath: /etc/config/
          env:
            - name: POD_NAMESPACE
              value: kube-system
          resources:
            requests:
              cpu: 200m
              memory: 256Mi
            limits:
              cpu: 200m
              memory: 256Mi
      volumes:
        - name: config-volume
          configMap:
            name: local-path-config

# kubectl patch storageclass local-path -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
