@@ -5,7 +5,7 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteOncePod
|
- ReadWriteOncePod
|
||||||
storageClassName: longhorn
|
storageClassName: local-storage
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: 5Gi
|
storage: 5Gi
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: longhorn
|
|
||||||
spec:
|
|
||||||
chart:
|
|
||||||
spec:
|
|
||||||
chart: longhorn
|
|
||||||
reconcileStrategy: ChartVersion
|
|
||||||
sourceRef:
|
|
||||||
kind: HelmRepository
|
|
||||||
name: longhorn-repo
|
|
||||||
version: 1.6.2
|
|
||||||
interval: 1m0s
|
|
||||||
targetNamespace: longhorn
|
|
||||||
values:
|
|
||||||
defaultSettings:
|
|
||||||
defaultReplicaCount: 1
|
|
||||||
defaultDataPath: /usr/local/longhorn/
|
|
||||||
longhornUI:
|
|
||||||
replicas: 1
|
|
||||||
persistence:
|
|
||||||
defaultClassReplicaCount: 1
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
apiVersion: source.toolkit.fluxcd.io/v1
|
|
||||||
kind: HelmRepository
|
|
||||||
metadata:
|
|
||||||
name: longhorn-repo
|
|
||||||
spec:
|
|
||||||
interval: 1m0s
|
|
||||||
url: https://charts.longhorn.io
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
apiVersion: traefik.io/v1alpha1
|
|
||||||
kind: IngressRoute
|
|
||||||
metadata:
|
|
||||||
name: longhorn
|
|
||||||
spec:
|
|
||||||
entryPoints:
|
|
||||||
- web
|
|
||||||
routes:
|
|
||||||
- match: Host(`longhorn.k3s`)
|
|
||||||
kind: Rule
|
|
||||||
services:
|
|
||||||
- name: longhorn-frontend
|
|
||||||
namespace: longhorn
|
|
||||||
nativeLB: true
|
|
||||||
kind: Service
|
|
||||||
port: 80
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
namespace: longhorn
|
|
||||||
resources:
|
|
||||||
- namespace.yaml
|
|
||||||
- helmrepo.yaml
|
|
||||||
- helmrelease.yaml
|
|
||||||
- ingress.yaml
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Namespace
|
|
||||||
metadata:
|
|
||||||
name: longhorn
|
|
||||||
@@ -16,4 +16,4 @@ spec:
|
|||||||
values:
|
values:
|
||||||
persistence:
|
persistence:
|
||||||
enabled: true
|
enabled: true
|
||||||
storageClassName: longhorn
|
storageClassName: local-storage
|
||||||
@@ -45,7 +45,7 @@ spec:
|
|||||||
minio:
|
minio:
|
||||||
enabled: true
|
enabled: true
|
||||||
persistence:
|
persistence:
|
||||||
storageClass: longhorn
|
storageClass: local-storage
|
||||||
|
|
||||||
# Zero out replica counts of other deployment modes
|
# Zero out replica counts of other deployment modes
|
||||||
singleBinary:
|
singleBinary:
|
||||||
|
|||||||
5
clusters/kairos/storage/kustomization.yaml
Normal file
5
clusters/kairos/storage/kustomization.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- localstorageconfigmap.yaml
|
||||||
|
- storageclass.yaml
|
||||||
34
clusters/kairos/storage/localstorageconfigmap.yaml
Normal file
34
clusters/kairos/storage/localstorageconfigmap.yaml
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
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}"
|
||||||
11
clusters/kairos/storage/storageclass.yaml
Normal file
11
clusters/kairos/storage/storageclass.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
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
|
||||||
Reference in New Issue
Block a user