feat(storage): proxmox-csi-plugin + StorageClass на пулы Proxmox (rpool/local-zfs)
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
---
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: proxmox-csi-plugin
|
||||
spec:
|
||||
chartRef:
|
||||
kind: OCIRepository
|
||||
name: proxmox-csi-plugin
|
||||
interval: 1h
|
||||
maxHistory: 3
|
||||
install:
|
||||
crds: CreateReplace
|
||||
remediation:
|
||||
retries: 3
|
||||
upgrade:
|
||||
crds: CreateReplace
|
||||
cleanupOnFail: true
|
||||
remediation:
|
||||
retries: 3
|
||||
values:
|
||||
# Подключение к Proxmox (url/токен/region) и StorageClass'ы: сам конфиг лежит
|
||||
# в Secret'е proxmox-csi-config (файл secret.sops.yaml рядом, шифруется sops).
|
||||
existingConfigSecret: proxmox-csi-config
|
||||
existingConfigSecretKey: config.yaml
|
||||
storageClass:
|
||||
# local-zfs = пул rpool (зеркало 2x NVMe) — дефолтный класс: сюда идут
|
||||
# Vault, базы и всё, что требует избыточности на уровне дисков.
|
||||
- name: proxmox-local-zfs
|
||||
storage: local-zfs
|
||||
fstype: ext4
|
||||
ssd: true
|
||||
reclaimPolicy: Delete
|
||||
annotations:
|
||||
storageclass.kubernetes.io/is-default-class: "true"
|
||||
# ssd = большой пул (2 TB, одиночный NVMe) — под bulk-данные.
|
||||
- name: proxmox-ssd
|
||||
storage: ssd
|
||||
fstype: ext4
|
||||
ssd: true
|
||||
reclaimPolicy: Delete
|
||||
controller:
|
||||
# Все три ноды — control-plane, поэтому контроллер цепляем туда же
|
||||
# (и терпим taint control-plane).
|
||||
nodeSelector:
|
||||
node-role.kubernetes.io/control-plane: ""
|
||||
tolerations:
|
||||
- key: node-role.kubernetes.io/control-plane
|
||||
effect: NoSchedule
|
||||
node:
|
||||
tolerations:
|
||||
- key: node-role.kubernetes.io/control-plane
|
||||
effect: NoSchedule
|
||||
- key: karpenter.sh/disrupted
|
||||
operator: Exists
|
||||
effect: NoSchedule
|
||||
- key: node.kubernetes.io/unschedulable
|
||||
operator: Exists
|
||||
effect: NoSchedule
|
||||
- key: node.kubernetes.io/disk-pressure
|
||||
operator: Exists
|
||||
effect: NoSchedule
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ./ocirepository.yaml
|
||||
- ./helmrelease.yaml
|
||||
- ./secret.sops.yaml
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: OCIRepository
|
||||
metadata:
|
||||
name: proxmox-csi-plugin
|
||||
spec:
|
||||
interval: 12h
|
||||
layerSelector:
|
||||
mediaType: application/vnd.cncf.helm.chart.content.v1.tar+gzip
|
||||
operation: copy
|
||||
ref:
|
||||
tag: 0.20.0
|
||||
url: oci://ghcr.io/sergelogvinov/charts/proxmox-csi-plugin
|
||||
@@ -0,0 +1,18 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: proxmox-csi-config
|
||||
stringData:
|
||||
config.yaml: |-
|
||||
clusters:
|
||||
- url: https://pve.grachevko.ru:8006/api2/json
|
||||
# PVE отдаёт самоподписанный сертификат — проверку отключаем.
|
||||
insecure: true
|
||||
token_id: kubernetes-csi@pve!csi
|
||||
# TODO: вписать секрет токена из `pveum user token add kubernetes-csi@pve csi`
|
||||
# и зашифровать файл: sops -e -i kubernetes/apps/storage/proxmox-csi/app/secret.sops.yaml
|
||||
token_secret: REPLACE_WITH_PVE_TOKEN_SECRET
|
||||
# region = имя Proxmox-кластера (pvecm create home-ops),
|
||||
# zone (имя узла PVE) приходит из метки topology.kubernetes.io/zone.
|
||||
region: home-ops
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: proxmox-csi
|
||||
spec:
|
||||
interval: 1h
|
||||
path: ./kubernetes/apps/storage/proxmox-csi/app
|
||||
prune: true
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: flux-system
|
||||
namespace: flux-system
|
||||
targetNamespace: storage
|
||||
wait: true
|
||||
healthChecks:
|
||||
- apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
name: proxmox-csi-plugin
|
||||
namespace: storage
|
||||
Reference in New Issue
Block a user