Use our own install of local path
This commit is contained in:
		| @@ -5,7 +5,7 @@ metadata: | |||||||
| spec: | spec: | ||||||
|   accessModes: |   accessModes: | ||||||
|     - ReadWriteOncePod |     - ReadWriteOncePod | ||||||
|   storageClassName: local-storage |   storageClassName: local-path | ||||||
|   resources: |   resources: | ||||||
|     requests: |     requests: | ||||||
|       storage: 5Gi |       storage: 5Gi | ||||||
							
								
								
									
										25
									
								
								clusters/kairos/local-path-provisioner/helmrelease.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								clusters/kairos/local-path-provisioner/helmrelease.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,25 @@ | |||||||
|  |  | ||||||
|  | apiVersion: helm.toolkit.fluxcd.io/v2 | ||||||
|  | kind: HelmRelease | ||||||
|  | metadata: | ||||||
|  |   name: local-path-repo | ||||||
|  |   namespace: kube-system | ||||||
|  | spec: | ||||||
|  |   interval: 5m | ||||||
|  |   releaseName: local-path-repo | ||||||
|  |   chart: | ||||||
|  |     spec: | ||||||
|  |       chart: local-path-provisioner | ||||||
|  |       sourceRef: | ||||||
|  |         kind: GitRepository | ||||||
|  |         name: local-path-repo | ||||||
|  |   values: | ||||||
|  |     storageClass: | ||||||
|  |       defaultClass: true | ||||||
|  |       reclaimPolicy: Retain | ||||||
|  |     nodePathMap: [ | ||||||
|  |       { | ||||||
|  |         node: DEFAULT_PATH_FOR_NON_LISTED_NODES, | ||||||
|  |         paths: [/usr/local] | ||||||
|  |       } | ||||||
|  |     ] | ||||||
							
								
								
									
										15
									
								
								clusters/kairos/local-path-provisioner/helmrepo.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								clusters/kairos/local-path-provisioner/helmrepo.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,15 @@ | |||||||
|  | apiVersion: source.toolkit.fluxcd.io/v1 | ||||||
|  | kind: GitRepository | ||||||
|  | metadata: | ||||||
|  |   name: local-path-repo | ||||||
|  |   namespace: kube-system | ||||||
|  | spec: | ||||||
|  |   interval: 15m | ||||||
|  |   url: https://github.com/rancher/local-path-provisioner | ||||||
|  |   ref: | ||||||
|  |     branch: main | ||||||
|  |   ignore: |- | ||||||
|  |     # exclude all | ||||||
|  |     /* | ||||||
|  |     # include charts directory | ||||||
|  |     !/deploy/chart/ | ||||||
| @@ -1,5 +1,5 @@ | |||||||
| apiVersion: kustomize.config.k8s.io/v1beta1 | apiVersion: kustomize.config.k8s.io/v1beta1 | ||||||
| kind: Kustomization | kind: Kustomization | ||||||
| resources: | resources: | ||||||
| - localstorageconfigmap.yaml | - helmrelease.yaml | ||||||
| - storageclass.yaml | - helmrepo.yaml | ||||||
| @@ -16,4 +16,4 @@ spec: | |||||||
|   values: |   values: | ||||||
|     persistence: |     persistence: | ||||||
|       enabled: true |       enabled: true | ||||||
|       storageClassName: local-storage |       storageClassName: local-path | ||||||
| @@ -45,7 +45,7 @@ spec: | |||||||
|     minio: |     minio: | ||||||
|       enabled: true |       enabled: true | ||||||
|       persistence: |       persistence: | ||||||
|         storageClass: local-storage |         storageClass: local-path | ||||||
|  |  | ||||||
|     # Zero out replica counts of other deployment modes |     # Zero out replica counts of other deployment modes | ||||||
|     singleBinary: |     singleBinary: | ||||||
|   | |||||||
| @@ -1,34 +0,0 @@ | |||||||
| kind: ConfigMap |  | ||||||
| apiVersion: v1 |  | ||||||
| metadata: |  | ||||||
|   name: local-path-config |  | ||||||
|   namespace: kube-system |  | ||||||
| data: |  | ||||||
|   config.json: |- |  | ||||||
|     { |  | ||||||
|       "nodePathMap":[ |  | ||||||
|       { |  | ||||||
|         "node":"DEFAULT_PATH_FOR_NON_LISTED_NODES", |  | ||||||
|         "paths":["/usr/local"] |  | ||||||
|       } |  | ||||||
|       ] |  | ||||||
|     } |  | ||||||
|   helperPod.yaml: |- |  | ||||||
|     apiVersion: v1 |  | ||||||
|     kind: Pod |  | ||||||
|     metadata: |  | ||||||
|       name: helper-pod |  | ||||||
|     spec: |  | ||||||
|       containers: |  | ||||||
|       - name: helper-pod |  | ||||||
|         image: "rancher/mirrored-library-busybox:1.36.1" |  | ||||||
|         imagePullPolicy: IfNotPresent |  | ||||||
|   setup: |- |  | ||||||
|     #!/bin/sh |  | ||||||
|     set -eu |  | ||||||
|     mkdir -m 0777 -p "${VOL_DIR}" |  | ||||||
|     chmod 700 "${VOL_DIR}/.." |  | ||||||
|   teardown: |- |  | ||||||
|     #!/bin/sh |  | ||||||
|     set -eu |  | ||||||
|     rm -rf "${VOL_DIR}" |  | ||||||
| @@ -1,11 +0,0 @@ | |||||||
| apiVersion: storage.k8s.io/v1 |  | ||||||
| kind: StorageClass |  | ||||||
| metadata: |  | ||||||
|   name: local-storage |  | ||||||
|   annotations: |  | ||||||
|     storageclass.kubernetes.io/is-default-class: "true" |  | ||||||
| provisioner: rancher.io/local-path |  | ||||||
| parameters: |  | ||||||
|   nodePath: /usr/local |  | ||||||
|   pathPattern: "{{ .PVC.Namespace }}/{{ .PVC.Name }}" |  | ||||||
| reclaimPolicy: Retain |  | ||||||
| @@ -12,6 +12,8 @@ users: | |||||||
| # Enable K3s on the node. | # Enable K3s on the node. | ||||||
| k3s: | k3s: | ||||||
|   enabled: true                         # Set to true to enable K3s. |   enabled: true                         # Set to true to enable K3s. | ||||||
|  |   args: | ||||||
|  |   - --disable=local-storage | ||||||
|  |  | ||||||
| stages: | stages: | ||||||
|   boot: |   boot: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user