feat: create a openebs hostpath storage class with its base path on the zfs pool

This commit is contained in:
SeanOMik 2024-06-17 16:24:50 -04:00
parent dcea64de1c
commit d002d884da
Signed by: SeanOMik
GPG Key ID: FEC9E2FC15235964
7 changed files with 22 additions and 7 deletions

View File

@ -29,7 +29,7 @@ spec:
persistence: persistence:
enabled: true enabled: true
storageClass: openebs-hostpath storageClass: mainpool-hostpath
size: 8Gi size: 8Gi
replica: replica:
@ -43,5 +43,5 @@ spec:
persistence: persistence:
enabled: true enabled: true
storageClass: openebs-hostpath storageClass: mainpool-hostpath
size: 8Gi size: 8Gi

View File

@ -13,7 +13,7 @@ spec:
- metadata: - metadata:
name: runner-work name: runner-work
spec: spec:
storageClassName: openebs-hostpath storageClassName: mainpool-hostpath
accessModes: accessModes:
- ReadWriteOnce - ReadWriteOnce
resources: resources:

View File

@ -29,7 +29,7 @@ spec:
WOODPECKER_BACKEND: kubernetes WOODPECKER_BACKEND: kubernetes
WOODPECKER_SERVER: woodpecker-server.dev.svc.cluster.local:9000 WOODPECKER_SERVER: woodpecker-server.dev.svc.cluster.local:9000
WOODPECKER_BACKEND_K8S_NAMESPACE: dev WOODPECKER_BACKEND_K8S_NAMESPACE: dev
WOODPECKER_BACKEND_K8S_STORAGE_CLASS: openebs-hostpath WOODPECKER_BACKEND_K8S_STORAGE_CLASS: mainpool-hostpath
WOODPECKER_BACKEND_K8S_VOLUME_SIZE: 5G WOODPECKER_BACKEND_K8S_VOLUME_SIZE: 5G
WOODPECKER_BACKEND_K8S_STORAGE_RWX: false WOODPECKER_BACKEND_K8S_STORAGE_RWX: false
WOODPECKER_BACKEND_K8S_POD_LABELS: "" WOODPECKER_BACKEND_K8S_POD_LABELS: ""
@ -53,7 +53,7 @@ spec:
enabled: true enabled: true
size: 10Gi size: 10Gi
mountPath: '/var/lib/woodpecker' mountPath: '/var/lib/woodpecker'
storageClass: openebs-hostpath storageClass: mainpool-hostpath
prometheus: prometheus:
podmonitor: podmonitor:

View File

@ -63,7 +63,7 @@ spec:
metadata: metadata:
type: persistentVolumeClaim type: persistentVolumeClaim
size: 12Gi size: 12Gi
storageClass: openebs-hostpath storageClass: mainpool-hostpath
accessMode: ReadWriteOnce accessMode: ReadWriteOnce
globalMounts: globalMounts:
- path: /metadata - path: /metadata

View File

@ -68,7 +68,7 @@ spec:
storageSpec: storageSpec:
volumeClaimTemplate: volumeClaimTemplate:
spec: spec:
storageClassName: openebs-hostpath storageClassName: mainpool-hostpath
resources: resources:
requests: requests:
storage: 40Gi storage: 40Gi

View File

@ -4,4 +4,5 @@ resources:
- ./namespace.yaml - ./namespace.yaml
- ./helm-repository.yaml - ./helm-repository.yaml
- ./helm-release.yaml - ./helm-release.yaml
- ./mainpool-sc.yaml
- ./monitoring-helm-release.yaml - ./monitoring-helm-release.yaml

View File

@ -0,0 +1,14 @@
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: mainpool-hostpath
annotations:
openebs.io/cas-type: local
cas.openebs.io/config: |
- name: StorageType
value: hostpath
- name: BasePath
value: /mnt/MainPool/Kubernetes/openebs-hostpath
provisioner: openebs.io/local
reclaimPolicy: Retain
volumeBindingMode: WaitForFirstConsumer