From 01b16cd60cf6639a068e80755bf4e871865b3ae4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E6=8C=AF=E5=AE=87?= <> Date: Sun, 12 Jan 2025 15:57:02 +0800 Subject: [PATCH] feat(manifests): add OpenEBS storage system manifests and initialization script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 孙振宇 <> --- .../freeleaps-storage-system/README.md | 2 + .../freeleaps-storage-system/namespace.yaml | 6 ++ .../open-ebs/.gitkeep | 0 .../open-ebs/values.yaml | 66 +++++++++++++++++++ cluster/manifests/helm-repos/REPO.list | 3 - cluster/manifests/init-helm-repos.sh | 28 ++++++++ 6 files changed, 102 insertions(+), 3 deletions(-) create mode 100644 cluster/manifests/freeleaps-storage-system/README.md create mode 100644 cluster/manifests/freeleaps-storage-system/namespace.yaml delete mode 100644 cluster/manifests/freeleaps-storage-system/open-ebs/.gitkeep create mode 100644 cluster/manifests/freeleaps-storage-system/open-ebs/values.yaml create mode 100755 cluster/manifests/init-helm-repos.sh diff --git a/cluster/manifests/freeleaps-storage-system/README.md b/cluster/manifests/freeleaps-storage-system/README.md new file mode 100644 index 00000000..a850fcab --- /dev/null +++ b/cluster/manifests/freeleaps-storage-system/README.md @@ -0,0 +1,2 @@ +Please check prerequisties before install OpenEBS: +https://openebs.io/docs/user-guides/replicated-storage-user-guide/replicated-pv-mayastor/rs-installation#verifyenable-huge-page-support \ No newline at end of file diff --git a/cluster/manifests/freeleaps-storage-system/namespace.yaml b/cluster/manifests/freeleaps-storage-system/namespace.yaml new file mode 100644 index 00000000..c1c88251 --- /dev/null +++ b/cluster/manifests/freeleaps-storage-system/namespace.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: freeleaps-storage-system + labels: + name: freeleaps-storage-system \ No newline at end of file diff --git a/cluster/manifests/freeleaps-storage-system/open-ebs/.gitkeep b/cluster/manifests/freeleaps-storage-system/open-ebs/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/cluster/manifests/freeleaps-storage-system/open-ebs/values.yaml b/cluster/manifests/freeleaps-storage-system/open-ebs/values.yaml new file mode 100644 index 00000000..f863b75a --- /dev/null +++ b/cluster/manifests/freeleaps-storage-system/open-ebs/values.yaml @@ -0,0 +1,66 @@ +openebs-crds: + csi: + volumeSnapshots: + enabled: true + keep: true + +# Refer to https://github.com/openebs/dynamic-localpv-provisioner/blob/v4.1.2/deploy/helm/charts/values.yaml for complete set of values. +localpv-provisioner: + rbac: + create: true + hostpathClass: + name: freeleaps-node-local + +# Refer to https://github.com/openebs/zfs-localpv/blob/v2.6.2/deploy/helm/charts/values.yaml for complete set of values. +zfs-localpv: + crds: + zfsLocalPv: + enabled: false + csi: + volumeSnapshots: + enabled: false + +# Refer to https://github.com/openebs/lvm-localpv/blob/lvm-localpv-1.6.2/deploy/helm/charts/values.yaml for complete set of values. +lvm-localpv: + crds: + lvmLocalPv: + enabled: false + csi: + volumeSnapshots: + enabled: false + +# Refer to https://github.com/openebs/mayastor-extensions/blob/v2.7.2/chart/values.yaml for complete set of values. +mayastor: + csi: + node: + initContainers: + enabled: false + etcd: + # -- Kubernetes Cluster Domain + clusterDomain: cluster.local + localpv-provisioner: + enabled: false + crds: + enabled: false + +# -- Configuration options for pre-upgrade helm hook job. +preUpgradeHook: + image: + # -- The container image registry URL for the hook job + registry: docker.io + # -- The container repository for the hook job + repo: bitnami/kubectl + # -- The container image tag for the hook job + tag: "1.25.15" + # -- The imagePullPolicy for the container + pullPolicy: IfNotPresent + +engines: + local: + lvm: + enabled: false + zfs: + enabled: false + replicated: + mayastor: + enabled: false \ No newline at end of file diff --git a/cluster/manifests/helm-repos/REPO.list b/cluster/manifests/helm-repos/REPO.list index c18e37e2..eb541d4e 100644 --- a/cluster/manifests/helm-repos/REPO.list +++ b/cluster/manifests/helm-repos/REPO.list @@ -1,6 +1,3 @@ -UPDATED_AT:20250109(UTC+8) -LAST_UPDATED_BY:SUNZHENYU - bitnami,https://charts.bitnami.com/bitnami,force-update argo,https://argoproj.github.io/argo-helm,force-update prometheus-community,https://prometheus-community.github.io/helm-charts,force-update diff --git a/cluster/manifests/init-helm-repos.sh b/cluster/manifests/init-helm-repos.sh new file mode 100755 index 00000000..b5f014b9 --- /dev/null +++ b/cluster/manifests/init-helm-repos.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +set -eu -o pipefail + +# Check helm is installed +if ! command -v helm &> /dev/null; then + echo "Helm is not installed. Please install helm first." + exit 1 +fi + +# Check REPO.list is exist in helm-repos directory +if [ ! -f helm-repos/REPO.list ]; then + echo "REPO.list is not exist in helm-repos directory. Please create REPO.list file first." + exit 1 +fi + +# Read REPO.list file in helm-repos directory, and add them to helm repos +while IFS= read -r line +do + # Split line with comma + IFS=',' read -r -a array <<< "$line" + echo "Add helm repo ${array[0]} with url ${array[1]}, and ${array[2]}" + cmd="helm repo add ${array[0]} ${array[1]} --${array[2]}" + # execute command + eval "$cmd" +done < helm-repos/REPO.list + +echo "Helm repos are added successfully." \ No newline at end of file