Skip to content

Commit aeff5ac

Browse files
committed
feat(workflow): use openebs replace longhorn
1 parent 8809884 commit aeff5ac

2 files changed

Lines changed: 15 additions & 14 deletions

File tree

_scripts/generate_cache.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ cd $tmp
1515
helm repo add cilium https://helm.cilium.io/
1616
helm repo add metallb https://metallb.github.io/metallb
1717
helm repo add traefik https://helm.traefik.io/traefik
18-
helm repo add longhorn https://charts.longhorn.io
18+
helm repo add openebs https://openebs.github.io/charts
1919
helm repo add jetstack https://charts.jetstack.io
2020
helm repo add svc-cat https://kubernetes-sigs.github.io/service-catalog
2121
helm repo update
2222

2323
helm fetch cilium/cilium
2424
helm fetch metallb/metallb
2525
helm fetch traefik/traefik
26-
helm fetch longhorn/longhorn
26+
helm fetch openebs/openebs
2727
helm fetch jetstack/cert-manager
2828
helm fetch svc-cat/catalog
2929

_scripts/install.sh

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function install_helm {
4040
tar -zxvf "${tar_name}"
4141
mv "linux-${ARCH}/helm" /usr/local/bin/helm
4242
rm -rf "${tar_name}" "linux-${ARCH}"
43-
helm repo add drycc https://charts.drycc.cc/${CHANNEL:-stable}
43+
helm repo add --force-update drycc https://charts.drycc.cc/${CHANNEL:-stable}
4444
}
4545

4646
function configure_os {
@@ -137,7 +137,7 @@ function install_components {
137137
--set k8sServicePort=${api_server[2]} \
138138
--set hostPort.enabled=true \
139139
--namespace kube-system --wait
140-
helm install metallb drycc/metallb --namespace kube-system --wait -f - <<EOF
140+
helm install metallb drycc/metallb --namespace metallb --create-namespace --wait -f - <<EOF
141141
configInline:
142142
address-pools:
143143
- name: default
@@ -154,12 +154,13 @@ EOF
154154
--create-namespace --wait
155155
}
156156

157-
function install_longhorn {
158-
helm install longhorn drycc/longhorn --create-namespace \
159-
--set persistence.defaultClass=true \
160-
--set persistence.defaultClassReplicaCount=1 \
161-
--set defaultSettings.defaultDataPath=${LONGHORN_DATA_PATH:-"/var/lib/longhorn"} \
162-
--namespace longhorn-system --wait
157+
function install_openebs {
158+
helm install openebs drycc/openebs \
159+
--namespace openebs \
160+
--create-namespace \
161+
--set nfs-provisioner.enabled=true --wait
162+
kubectl patch storageclass ${DEFAULT_STORAGE_CLASS:-"openebs-hostpath"} \
163+
-p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
163164
}
164165

165166
function check_drycc_env {
@@ -218,7 +219,7 @@ EOF
218219
--set global.cert_manager_enabled=${CERT_MANAGER_ENABLED:-true} \
219220
--set global.ingress_class=traefik \
220221
--set fluentd.daemon_environment.CONTAINER_TAIL_PARSER_TYPE="/^(?<time>.+) (?<stream>stdout|stderr)( (?<tags>.))? (?<log>.*)$/" \
221-
--set controller.app_storage_class=${CONTROLLER_APP_STORAGE_CLASS:-""} \
222+
--set controller.app_storage_class=${CONTROLLER_APP_STORAGE_CLASS:-"openebs-kernel-nfs"} \
222223
--set minio.persistence.enabled=true \
223224
--set minio.persistence.size=${MINIO_PERSISTENCE_SIZE:-20Gi} \
224225
--set minio.persistence.storageClass=${MINIO_PERSISTENCE_STORAGE_CLASS:-""} \
@@ -257,7 +258,7 @@ function install_helmbroker {
257258
--set ingress_class="traefik" \
258259
--set platform_domain="cluster.local" \
259260
--set persistence.size=${HELMBROKER_PERSISTENCE_SIZE:-5Gi} \
260-
--set persistence.storageClass=${HELMBROKER_PERSISTENCE_STORAGE_CLASS:=""} \
261+
--set persistence.storageClass=${HELMBROKER_PERSISTENCE_STORAGE_CLASS:-"openebs-kernel-nfs"} \
261262
--set platform_domain=${PLATFORM_DOMAIN} \
262263
--set cert_manager_enabled=${CERT_MANAGER_ENABLED:-true} \
263264
--set username=${HELMBROKER_USERNAME} \
@@ -297,7 +298,7 @@ EOF
297298

298299
function configure_haproxy {
299300
BUILDER_IP=$(kubectl get svc drycc-builder -n drycc -o="jsonpath={.status.loadBalancer.ingress[0].ip}")
300-
INGRESS_IP=$(kubectl get svc traefik -n kube-system -o="jsonpath={.status.loadBalancer.ingress[0].ip}")
301+
INGRESS_IP=$(kubectl get svc traefik -n traefik -o="jsonpath={.status.loadBalancer.ingress[0].ip}")
301302

302303
if [[ "${USE_HAPROXY:-true}" == "true" ]] ; then
303304
cat << EOF > "/etc/haproxy/haproxy.cfg"
@@ -348,7 +349,7 @@ if [[ -z "$@" ]] ; then
348349
install_k3s_server
349350
install_helm
350351
install_components
351-
install_longhorn
352+
install_openebs
352353
install_drycc
353354
configure_haproxy
354355
install_helmbroker

0 commit comments

Comments
 (0)