chore: add volume snapshot crd+controller and configure longhorn

This commit is contained in:
shadowlegend 2025-04-09 16:35:38 +07:00
parent ff0e672bda
commit 578cd7b238
4 changed files with 95 additions and 0 deletions

View File

@ -94,3 +94,68 @@ spec:
server: https://kubernetes.default.svc server: https://kubernetes.default.svc
namespace: vector namespace: vector
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: ingress-apisix
namespace: argocd
spec:
syncPolicy:
automated:
selfHeal: true
syncOptions:
- CreateNamespace=true
project: default
sources:
- chart: apisix
repoURL: https://charts.apiseven.com
targetRevision: 2.10.0
helm:
values: |
ingress-controller:
enabled: true
config:
apisix:
adminAPIVersion: v3
serviceNamespace: ingress-apisix
destination:
server: https://kubernetes.default.svc
namespace: ingress-apisix
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: longhorn
namespace: argocd
spec:
syncPolicy:
automated:
selfHeal: true
syncOptions:
- CreateNamespace=true
project: default
sources:
- chart: longhorn
repoURL: https://charts.longhorn.io
targetRevision: v1.8.1
helm:
values: |
preUpgradeChecker:
jobEnabled: false
persistence:
defaultFsType: xfs
defaultDiskSelector:
enable: true
selector: "nvme"
defaultSettings:
createDefaultDiskLabeledNodes: true
storageReservedPercentageForDefaultDisk: 8
destination:
server: https://kubernetes.default.svc
namespace: longhorn-system

View File

@ -0,0 +1,12 @@
---
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshotClass
metadata:
name: longhorn
annotations:
snapshot.storage.kubernetes.io/is-default-class: "true"
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
driver: driver.longhorn.io
deletionPolicy: Delete
parameters:
type: bak

View File

@ -3,5 +3,9 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
resources: resources:
- https://github.com/kubernetes-csi/external-snapshotter/tree/v8.2.0/client/config/crd
- https://github.com/kubernetes-csi/external-snapshotter/tree/v8.2.0/deploy/kubernetes/snapshot-controller
- apps.yml - apps.yml
- https://raw.githubusercontent.com/dragonflydb/dragonfly-operator/main/manifests/dragonfly-operator.yaml - https://raw.githubusercontent.com/dragonflydb/dragonfly-operator/main/manifests/dragonfly-operator.yaml
- postgresql-image.yml
- default-volume-snapshot.yml

View File

@ -0,0 +1,14 @@
---
apiVersion: postgresql.cnpg.io/v1
kind: ClusterImageCatalog
metadata:
name: postgresql
namespace: default
annotations:
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
spec:
images:
- major: 16
image: ghcr.io/cloudnative-pg/postgresql:16.8
- major: 17
image: ghcr.io/cloudnative-pg/postgresql:17.4