diff --git a/charts/kubezero-cert-manager/Chart.yaml b/charts/kubezero-cert-manager/Chart.yaml index 518d68e2..72e6898c 100644 --- a/charts/kubezero-cert-manager/Chart.yaml +++ b/charts/kubezero-cert-manager/Chart.yaml @@ -15,7 +15,7 @@ dependencies: version: ">= 0.1.3" repository: https://zero-down-time.github.io/kubezero/ - name: cert-manager - version: 1.0.4 + version: 1.1.0 repository: https://charts.jetstack.io condition: cert-manager.enabled kubeVersion: ">= 1.16.0" diff --git a/charts/kubezero/bootstrap.sh b/charts/kubezero/bootstrap.sh index 0e30f35f..3b50a629 100755 --- a/charts/kubezero/bootstrap.sh +++ b/charts/kubezero/bootstrap.sh @@ -53,7 +53,9 @@ function chart_location() { # make sure namespace exists prior to calling helm as the create-namespace options doesn't work function create_ns() { local namespace=$1 - kubectl get ns $namespace || kubectl create ns $namespace + if [ "$namespace" != "kube-system" ]; then + kubectl get ns $namespace || kubectl create ns $namespace + fi } @@ -66,8 +68,8 @@ function delete_ns() { # Extract crds via helm calls and apply delta=crds only function _crds() { - helm template $(chart_location $chart) --namespace $namespace --name-template $release --skip-crds > $TMPDIR/helm-no-crds.yaml - helm template $(chart_location $chart) --namespace $namespace --name-template $release --include-crds > $TMPDIR/helm-crds.yaml + helm template $(chart_location $chart) --namespace $namespace --name-template $release --skip-crds --set ${release}.installCRDs=false > $TMPDIR/helm-no-crds.yaml + helm template $(chart_location $chart) --namespace $namespace --name-template $release --include-crds --set ${release}.installCRDs=true > $TMPDIR/helm-crds.yaml diff -e $TMPDIR/helm-no-crds.yaml $TMPDIR/helm-crds.yaml | head -n-1 | tail -n+2 > $TMPDIR/crds.yaml kubectl apply -f $TMPDIR/crds.yaml } @@ -113,6 +115,8 @@ function _helm() { # Delete dedicated namespace if not kube-system [ $action == "delete" ] && delete_ns $namespace fi + + return 0 } diff --git a/charts/kubezero/templates/local-path-provisioner.yaml b/charts/kubezero/templates/local-path-provisioner.yaml index 6760243f..500d52bf 100644 --- a/charts/kubezero/templates/local-path-provisioner.yaml +++ b/charts/kubezero/templates/local-path-provisioner.yaml @@ -1,4 +1,13 @@ {{- define "local-path-provisioner-values" }} +local-path-provisioner: +{{- with index .Values "local-path-provisioner" "storageClass" }} + storageClass: + {{- toYaml . | nindent 4 }} +{{- end }} +{{- with index .Values "local-path-provisioner" "nodePathMap" }} + nodePathMap: + {{- toYaml . | nindent 4 }} +{{- end }} {{- end }} {{- define "local-path-provisioner-argo" }}