feat: add snapshot-system and openebs mayastor

This commit is contained in:
SeanOMik 2024-09-13 22:38:01 -04:00
parent daa10b10e1
commit 3209590082
15 changed files with 319 additions and 1 deletions

View File

@ -7,7 +7,8 @@ resources:
- ./traefik - ./traefik
- ../../common/apps/cert-manager - ../../common/apps/cert-manager
# storage # storage
#- ../../common/apps/openebs - ./snapshot-system/ks.yaml
- ./openebs/ks.yaml
# hardware # hardware
- ../../common/apps/nfd/ks.yaml - ../../common/apps/nfd/ks.yaml
- ../../common/apps/intel-gpu/ks.yaml - ../../common/apps/intel-gpu/ks.yaml

View File

@ -0,0 +1,70 @@
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/helm.toolkit.fluxcd.io/helmrelease_v2.json
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: openebs
namespace: openebs
spec:
interval: 5m
chart:
spec:
chart: openebs
version: 4.1.0
sourceRef:
kind: HelmRepository
name: openebs
namespace: flux-system
values:
openebs-crds:
csi:
volumeSnapshots:
enabled: false
keep: false
# Refer to https://github.com/openebs/dynamic-localpv-provisioner/blob/HEAD/deploy/helm/charts/values.yaml for complete set of values.
localpv-provisioner:
rbac:
create: true
localpv:
enabled: true
hostpathClass:
enabled: true
# Refer to https://github.com/openebs/mayastor-extensions/blob/v2.7.0/chart/values.yaml for complete set of values.
mayastor:
enabled: true
nodeSelector:
kubernetes.io/arch: amd64
openebs.io/engine: mayastor
csi:
node:
initContainers:
enabled: true
etcd:
# -- Kubernetes Cluster Domain
clusterDomain: cluster.local
crds:
enabled: false
monitoring:
enabled: false
loki-stack:
enabled: false
storageClass:
nameSuffix: single
tolerations:
# tolerate control plane
- key: "node-role.kubernetes.io/control-plane"
operator: "Exists"
effect: "NoSchedule"
engines:
local:
lvm:
enabled: true
zfs:
enabled: true
replicated:
mayastor:
enabled: true

View File

@ -0,0 +1,17 @@
apiVersion: source.toolkit.fluxcd.io/v1
kind: HelmRepository
metadata:
name: openebs
namespace: flux-system
spec:
interval: 1m
url: https://openebs.github.io/openebs
---
apiVersion: source.toolkit.fluxcd.io/v1
kind: HelmRepository
metadata:
name: openebs-monitoring-charts
namespace: flux-system
spec:
interval: 1m
url: https://openebs.github.io/monitoring

View File

@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./namespace.yaml
- ./helm-repository.yaml
- ./helm-release.yaml
#- ./monitoring-helm-release.yaml

View File

@ -0,0 +1,41 @@
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/helm.toolkit.fluxcd.io/helmrelease_v2.json
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: openebs-monitoring
namespace: openebs
spec:
interval: 5m
chart:
spec:
chart: openebs-monitoring
version: 0.4.13
sourceRef:
kind: HelmRepository
name: openebs-monitoring-charts
namespace: flux-system
dependsOn:
- name: openebs
values:
kube-prometheus-stack:
install: false
openebsMonitoringAddon:
# this is the only provisioner enabled
localPV:
enabled: true
cStore:
enabled: false
jiva:
enabled: false
ndm:
enabled: false
npd:
enabled: false
deviceLocalPV:
enabled: false
lvmLocalPV:
enabled: false
zfsLocalPV:
enabled: false

View File

@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: openebs

View File

@ -0,0 +1,59 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: openebs
namespace: flux-system
spec:
timeout: 5m
interval: 10m
path: ./kubernetes/thin/apps/openebs/app
prune: true
sourceRef:
kind: GitRepository
name: home-cluster
decryption:
provider: sops
secretRef:
name: sops-gpg
dependsOn:
- name: snapshot-controller
namespace: flux-system
postBuild:
substitute: {}
substituteFrom:
- kind: ConfigMap
name: cluster-settings
- kind: Secret
name: cluster-secrets
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: openebs-sc
namespace: flux-system
spec:
timeout: 5m
interval: 10m
path: ./kubernetes/thin/apps/openebs/storage-class
prune: true
sourceRef:
kind: GitRepository
name: home-cluster
decryption:
provider: sops
secretRef:
name: sops-gpg
dependsOn:
- name: openebs
namespace: flux-system
postBuild:
substitute: {}
substituteFrom:
- kind: ConfigMap
name: cluster-settings
- kind: Secret
name: cluster-secrets

View File

@ -0,0 +1,8 @@
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: openebs-dual
parameters:
protocol: nvmf
repl: "2"
provisioner: io.openebs.csi-mayastor

View File

@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./pool.yaml
- ./dual-replica-sc.yaml

View File

@ -0,0 +1,39 @@
apiVersion: "openebs.io/v1beta2"
kind: DiskPool
metadata:
name: pool-dorm-controller-d52ycbgv
namespace: openebs
spec:
node: dorm-controller-d52ycbgv
disks:
- /dev/disk/by-id/nvme-SAMSUNG_MZVLB256HAHQ-000H1_S425NX1MA23444
---
apiVersion: "openebs.io/v1beta2"
kind: DiskPool
metadata:
name: pool-dorm-worker-3ssgwrlx
namespace: openebs
spec:
node: dorm-worker-3ssgwrlx
disks:
- /dev/disk/by-id/nvme-KXG60ZNV256G_TOSHIBA_69CA70CIK34N
---
apiVersion: "openebs.io/v1beta2"
kind: DiskPool
metadata:
name: pool-dorm-worker-hklqhcrv
namespace: openebs
spec:
node: dorm-worker-hklqhcrv
disks:
- /dev/disk/by-id/nvme-SAMSUNG_MZVLW256HEHP-000L7_S35ENX0K125956
---
apiVersion: "openebs.io/v1beta2"
kind: DiskPool
metadata:
name: pool-dorm-worker-kgoutccb
namespace: openebs
spec:
node: dorm-worker-kgoutccb
disks:
- /dev/disk/by-id/nvme-SAMSUNG_MZVLW256HEHP-000L7_S35ENX0K173346

View File

@ -0,0 +1,31 @@
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/helm.toolkit.fluxcd.io/helmrelease_v2.json
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: snapshot-controller
namespace: snapshot-system
spec:
interval: 30m
timeout: 15m
chart:
spec:
chart: snapshot-controller
version: 3.0.6
sourceRef:
kind: HelmRepository
name: piraeus
namespace: flux-system
install:
remediation:
retries: 3
upgrade:
cleanupOnFail: true
remediation:
strategy: rollback
retries: 3
values:
controller:
serviceMonitor:
create: false # TODO
webhook:
enabled: false

View File

@ -0,0 +1,8 @@
apiVersion: source.toolkit.fluxcd.io/v1
kind: HelmRepository
metadata:
name: piraeus
namespace: flux-system
spec:
interval: 1m
url: https://piraeus.io/helm-charts/

View File

@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./namespace.yaml
- ./helm-repo.yaml
- ./helm-release.yaml

View File

@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: snapshot-system

View File

@ -0,0 +1,18 @@
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: snapshot-controller
namespace: flux-system
spec:
timeout: 5m
interval: 10m
path: ./kubernetes/thin/apps/snapshot-controller/app
prune: true
sourceRef:
kind: GitRepository
name: home-cluster
decryption:
provider: sops
secretRef:
name: sops-gpg