* feat: kubesphere 4.0 Signed-off-by: ci-bot <ci-bot@kubesphere.io> * feat: kubesphere 4.0 Signed-off-by: ci-bot <ci-bot@kubesphere.io> --------- Signed-off-by: ci-bot <ci-bot@kubesphere.io> Co-authored-by: ks-ci-bot <ks-ci-bot@example.com> Co-authored-by: joyceliu <joyceliu@yunify.com>
29 lines
1.2 KiB
YAML
29 lines
1.2 KiB
YAML
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: "{{ .Release.Name }}-post-patch-system-ns"
|
|
annotations:
|
|
"helm.sh/hook": post-install
|
|
"helm.sh/hook-weight": "-5"
|
|
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded,hook-failed
|
|
spec:
|
|
template:
|
|
spec:
|
|
restartPolicy: Never
|
|
serviceAccountName: {{ include "ks-core.serviceAccountName" . }}
|
|
containers:
|
|
- name: post-patch-system-ns
|
|
image: {{ template "kubectl.image" . }}
|
|
command:
|
|
- /bin/bash
|
|
- -c
|
|
- |
|
|
kubectl create namespace kubesphere-controls-system --dry-run=client -o yaml | kubectl apply -f -
|
|
for ns in kubesphere-system kubesphere-controls-system default kube-node-lease kube-public kube-system;
|
|
do
|
|
kubectl label ns $ns kubesphere.io/workspace=system-workspace
|
|
kubectl label ns $ns kubesphere.io/managed=true
|
|
done
|
|
kubectl get ns -l 'kubesphere.io/workspace,!kubesphere.io/managed' --no-headers -o custom-columns=NAME:.metadata.name | \
|
|
xargs -I {} kubectl label ns {} kubesphere.io/managed=true
|