folder structure. longhorn installation
This commit is contained in:
@@ -1,39 +0,0 @@
|
|||||||
clusters/
|
|
||||||
base/
|
|
||||||
namespaces/
|
|
||||||
vaultwarden.yaml
|
|
||||||
myai.yaml
|
|
||||||
shared.yaml
|
|
||||||
infra/
|
|
||||||
default-storageclass-patch.yaml
|
|
||||||
infra-apps/
|
|
||||||
metallb/
|
|
||||||
longhorn/
|
|
||||||
caddy/
|
|
||||||
mosquitto/
|
|
||||||
apps/
|
|
||||||
vaultwarden/
|
|
||||||
myai/
|
|
||||||
caldav-mcp/
|
|
||||||
|
|
||||||
home/
|
|
||||||
flux-system/ # bootstrap-managed, см. п.4
|
|
||||||
kustomization.yaml # explicit, см. выше
|
|
||||||
namespaces.yaml # Flux Kustomization CRD
|
|
||||||
namespaces/
|
|
||||||
kustomization.yaml # resources: [../../base/namespaces/*.yaml]
|
|
||||||
infra.yaml # Flux Kustomization CRD, dependsOn: namespaces
|
|
||||||
infra/
|
|
||||||
kustomization.yaml # resources: [../../base/infra/*.yaml]
|
|
||||||
infra-nodes.yaml # Flux Kustomization CRD, dependsOn: infra
|
|
||||||
infra-nodes/
|
|
||||||
node1/
|
|
||||||
kustomization.yaml
|
|
||||||
node2/
|
|
||||||
kustomization.yaml
|
|
||||||
infra-apps.yaml # Flux Kustomization CRD, dependsOn: infra-nodes
|
|
||||||
infra-apps/
|
|
||||||
kustomization.yaml # resources: [../../base/infra-apps/metallb, ...]
|
|
||||||
apps.yaml # Flux Kustomization CRD, dependsOn: infra-apps
|
|
||||||
apps/
|
|
||||||
kustomization.yaml # resources: [../../base/apps/vaultwarden, ...]
|
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: longhorn
|
||||||
|
namespace: longhorn-system
|
||||||
|
spec:
|
||||||
|
interval: 30m
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: longhorn
|
||||||
|
version: "1.9.x" # зафиксируй актуальную стабильную ветку
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: longhorn
|
||||||
|
namespace: longhorn-system
|
||||||
|
interval: 1h
|
||||||
|
install:
|
||||||
|
createNamespace: false # namespace создаём отдельным ресурсом с PSA-меткой
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
upgrade:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
values:
|
||||||
|
defaultSettings:
|
||||||
|
defaultReplicaCount: 3 # по числу нод control-plane
|
||||||
|
defaultDataPath: /var/lib/longhorn
|
||||||
|
guaranteedEngineManagerCPU: 12
|
||||||
|
guaranteedReplicaManagerCPU: 12
|
||||||
|
# если backup target ещё не настроен — оставь пустым, донастроишь позже через UI/CR
|
||||||
|
backupTarget: ""
|
||||||
|
# чтобы не разъезжались реплики при 3 нодах
|
||||||
|
replicaSoftAntiAffinity: false
|
||||||
|
persistence:
|
||||||
|
defaultClass: true
|
||||||
|
defaultClassReplicaCount: 3
|
||||||
|
defaultFsType: ext4
|
||||||
|
reclaimPolicy: Retain
|
||||||
|
csi:
|
||||||
|
attacherReplicaCount: 3
|
||||||
|
provisionerReplicaCount: 3
|
||||||
|
resizerReplicaCount: 3
|
||||||
|
snapshotterReplicaCount: 3
|
||||||
|
ingress:
|
||||||
|
enabled: false # у тебя уже есть Caddy/Traefik, заведёшь свой Ingress/IngressRoute отдельно
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
apiVersion: source.toolkit.fluxcd.io/v1
|
||||||
|
kind: HelmRepository
|
||||||
|
metadata:
|
||||||
|
name: longhorn
|
||||||
|
namespace: longhorn-system
|
||||||
|
spec:
|
||||||
|
interval: 1h
|
||||||
|
url: https://charts.longhorn.io
|
||||||
+3
-1
@@ -1,4 +1,6 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
resources:
|
resources:
|
||||||
- cert-manager-issuers.yaml
|
- helmrepository.yaml
|
||||||
|
- helmrelease.yaml
|
||||||
|
- secret.enc.yaml
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: longhorn-system
|
||||||
|
labels:
|
||||||
|
pod-security.kubernetes.io/enforce: privileged
|
||||||
@@ -13,7 +13,7 @@ spec:
|
|||||||
wait: true
|
wait: true
|
||||||
dependsOn:
|
dependsOn:
|
||||||
- name: namespaces
|
- name: namespaces
|
||||||
- name: infra-apps
|
- name: infra
|
||||||
decryption:
|
decryption:
|
||||||
provider: sops
|
provider: sops
|
||||||
secretRef:
|
secretRef:
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ spec:
|
|||||||
wait: true
|
wait: true
|
||||||
dependsOn:
|
dependsOn:
|
||||||
- name: namespaces
|
- name: namespaces
|
||||||
- name: infra-apps
|
- name: infra
|
||||||
decryption:
|
decryption:
|
||||||
provider: sops
|
provider: sops
|
||||||
secretRef:
|
secretRef:
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ spec:
|
|||||||
wait: true
|
wait: true
|
||||||
dependsOn:
|
dependsOn:
|
||||||
- name: namespaces
|
- name: namespaces
|
||||||
- name: infra-apps
|
- name: infra
|
||||||
decryption:
|
decryption:
|
||||||
provider: sops
|
provider: sops
|
||||||
secretRef:
|
secretRef:
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ spec:
|
|||||||
wait: true
|
wait: true
|
||||||
dependsOn:
|
dependsOn:
|
||||||
- name: namespaces
|
- name: namespaces
|
||||||
- name: infra-apps
|
- name: infra
|
||||||
decryption:
|
decryption:
|
||||||
provider: sops
|
provider: sops
|
||||||
secretRef:
|
secretRef:
|
||||||
|
|||||||
+2
-2
@@ -1,14 +1,14 @@
|
|||||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
metadata:
|
metadata:
|
||||||
name: cert-manager-issuers
|
name: cert-manager-certificate-issuers
|
||||||
namespace: flux-system
|
namespace: flux-system
|
||||||
spec:
|
spec:
|
||||||
interval: 10m
|
interval: 10m
|
||||||
sourceRef:
|
sourceRef:
|
||||||
kind: GitRepository
|
kind: GitRepository
|
||||||
name: flux-system
|
name: flux-system
|
||||||
path: ./clusters/base/infra-apps/cert-manager-issuers
|
path: ./clusters/base/infra/cert-manager/certificate-issuers
|
||||||
prune: true
|
prune: true
|
||||||
wait: true
|
wait: true
|
||||||
dependsOn:
|
dependsOn:
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
resources:
|
resources:
|
||||||
- storage-class-longhorn-no-retain.yaml
|
- longhorn/longhorn-system.yaml
|
||||||
|
- longhorn/storage-classes.yaml
|
||||||
|
- cert-manager/certificate-issuers.yaml
|
||||||
|
|||||||
+2
-2
@@ -1,13 +1,13 @@
|
|||||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
metadata:
|
metadata:
|
||||||
name: local-path
|
name: longhorn-system
|
||||||
namespace: flux-system
|
namespace: flux-system
|
||||||
spec:
|
spec:
|
||||||
interval: 10m
|
interval: 10m
|
||||||
sourceRef:
|
sourceRef:
|
||||||
kind: GitRepository
|
kind: GitRepository
|
||||||
name: flux-system
|
name: flux-system
|
||||||
path: ./clusters/base/infra/storage-class-longhorn-no-retain
|
path: ./clusters/base/infra/longhorn/longhorn-system
|
||||||
prune: true
|
prune: true
|
||||||
wait: true
|
wait: true
|
||||||
@@ -1,20 +1,15 @@
|
|||||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
metadata:
|
metadata:
|
||||||
name: infra-apps
|
name: longhorn-storage-classes
|
||||||
namespace: flux-system
|
namespace: flux-system
|
||||||
spec:
|
spec:
|
||||||
interval: 10m
|
interval: 10m
|
||||||
sourceRef:
|
sourceRef:
|
||||||
kind: GitRepository
|
kind: GitRepository
|
||||||
name: flux-system
|
name: flux-system
|
||||||
path: ./clusters/home/infra-apps
|
path: ./clusters/base/infra/longhorn-storage-classes
|
||||||
prune: true
|
prune: true
|
||||||
wait: true
|
wait: true
|
||||||
dependsOn:
|
dependsOn:
|
||||||
- name: namespaces
|
- name: longhorn-system
|
||||||
- name: infra
|
|
||||||
decryption:
|
|
||||||
provider: sops
|
|
||||||
secretRef:
|
|
||||||
name: sops-age
|
|
||||||
@@ -4,6 +4,4 @@ resources:
|
|||||||
- flux-system
|
- flux-system
|
||||||
- namespaces.yaml
|
- namespaces.yaml
|
||||||
- infra.yaml
|
- infra.yaml
|
||||||
# - infra-nodes.yaml
|
|
||||||
- infra-apps.yaml
|
|
||||||
- apps.yaml
|
- apps.yaml
|
||||||
|
|||||||
@@ -4,3 +4,4 @@ resources:
|
|||||||
- ../../base/namespaces/vaultwarden.yaml
|
- ../../base/namespaces/vaultwarden.yaml
|
||||||
- ../../base/namespaces/zigbee2mqtt.yaml
|
- ../../base/namespaces/zigbee2mqtt.yaml
|
||||||
- ../../base/namespaces/pim.yaml
|
- ../../base/namespaces/pim.yaml
|
||||||
|
- ../../base/namespaces/longhorn-system.yaml
|
||||||
|
|||||||
Reference in New Issue
Block a user