From 41f85c2583656a12578348dd3aeaec84208d00a9 Mon Sep 17 00:00:00 2001 From: SeanOMik Date: Sat, 10 Feb 2024 12:35:15 -0500 Subject: [PATCH] feat(openebs): add openebs, use openebs hostpath provisioner for woodpecker --- cluster/apps/dev/woodpecker/helm-release.yaml | 4 ++-- cluster/core/storage/kustomization.yaml | 1 + .../core/storage/openebs/helm-release.yaml | 23 +++++++++++++++++++ .../core/storage/openebs/helm-repository.yaml | 8 +++++++ .../core/storage/openebs/kustomization.yaml | 6 +++++ cluster/core/storage/openebs/namespace.yaml | 6 +++++ 6 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 cluster/core/storage/openebs/helm-release.yaml create mode 100644 cluster/core/storage/openebs/helm-repository.yaml create mode 100644 cluster/core/storage/openebs/kustomization.yaml create mode 100644 cluster/core/storage/openebs/namespace.yaml diff --git a/cluster/apps/dev/woodpecker/helm-release.yaml b/cluster/apps/dev/woodpecker/helm-release.yaml index f89e2b7..32a5a63 100644 --- a/cluster/apps/dev/woodpecker/helm-release.yaml +++ b/cluster/apps/dev/woodpecker/helm-release.yaml @@ -26,9 +26,9 @@ spec: WOODPECKER_BACKEND: kubernetes WOODPECKER_SERVER: woodpecker-server.dev.svc.cluster.local:9000 WOODPECKER_BACKEND_K8S_NAMESPACE: dev - WOODPECKER_BACKEND_K8S_STORAGE_CLASS: longhorn + WOODPECKER_BACKEND_K8S_STORAGE_CLASS: openebs-hostpath WOODPECKER_BACKEND_K8S_VOLUME_SIZE: 5G - WOODPECKER_BACKEND_K8S_STORAGE_RWX: true + WOODPECKER_BACKEND_K8S_STORAGE_RWX: false WOODPECKER_BACKEND_K8S_POD_LABELS: "" WOODPECKER_BACKEND_K8S_POD_ANNOTATIONS: "" WOODPECKER_CONNECT_RETRY_COUNT: "1" diff --git a/cluster/core/storage/kustomization.yaml b/cluster/core/storage/kustomization.yaml index 48c8f6a..56090e7 100644 --- a/cluster/core/storage/kustomization.yaml +++ b/cluster/core/storage/kustomization.yaml @@ -2,4 +2,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - ./longhorn +- ./openebs #- ./local-path-provisioner \ No newline at end of file diff --git a/cluster/core/storage/openebs/helm-release.yaml b/cluster/core/storage/openebs/helm-release.yaml new file mode 100644 index 0000000..789c675 --- /dev/null +++ b/cluster/core/storage/openebs/helm-release.yaml @@ -0,0 +1,23 @@ +apiVersion: helm.toolkit.fluxcd.io/v2beta2 +kind: HelmRelease +metadata: + name: openebs + namespace: openebs +spec: + interval: 5m + chart: + spec: + chart: openebs + version: 3.10.0 + sourceRef: + kind: HelmRepository + name: openebs-charts + namespace: flux-system + + values: + ndm: + enabled: false + + localprovisioner: + deviceClass: + enabled: false \ No newline at end of file diff --git a/cluster/core/storage/openebs/helm-repository.yaml b/cluster/core/storage/openebs/helm-repository.yaml new file mode 100644 index 0000000..f1d031c --- /dev/null +++ b/cluster/core/storage/openebs/helm-repository.yaml @@ -0,0 +1,8 @@ +apiVersion: source.toolkit.fluxcd.io/v1beta2 +kind: HelmRepository +metadata: + name: openebs-charts + namespace: flux-system +spec: + interval: 1m + url: https://openebs.github.io/charts diff --git a/cluster/core/storage/openebs/kustomization.yaml b/cluster/core/storage/openebs/kustomization.yaml new file mode 100644 index 0000000..9e20722 --- /dev/null +++ b/cluster/core/storage/openebs/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- ./namespace.yaml +- ./helm-repository.yaml +- ./helm-release.yaml \ No newline at end of file diff --git a/cluster/core/storage/openebs/namespace.yaml b/cluster/core/storage/openebs/namespace.yaml new file mode 100644 index 0000000..ad0d51d --- /dev/null +++ b/cluster/core/storage/openebs/namespace.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: openebs + labels: + name: openebs \ No newline at end of file