* 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>
43 lines
1.2 KiB
YAML
43 lines
1.2 KiB
YAML
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: "{{ .Release.Name }}-ks-crds-pre-upgrade-scripts"
|
|
annotations:
|
|
"helm.sh/hook": pre-upgrade
|
|
"helm.sh/hook-weight": "-1"
|
|
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
|
data:
|
|
{{ (.Files.Glob "scripts/install.sh").AsConfig | indent 2 }}
|
|
{{ (.Files.Glob "crds/*").AsConfig | indent 2 }}
|
|
|
|
---
|
|
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: "{{ .Release.Name }}-ks-crds-pre-upgrade"
|
|
annotations:
|
|
"helm.sh/hook": pre-upgrade
|
|
"helm.sh/hook-weight": "10"
|
|
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded,hook-failed
|
|
spec:
|
|
template:
|
|
spec:
|
|
restartPolicy: Never
|
|
serviceAccountName: {{ include "ks-core.serviceAccountName" . }}
|
|
containers:
|
|
- name: crd-install
|
|
image: {{ template "preUpgrade.image" . }}
|
|
command:
|
|
- /bin/bash
|
|
- /scripts/install.sh
|
|
- /scripts
|
|
volumeMounts:
|
|
- mountPath: /scripts
|
|
name: scripts
|
|
resources: {{- toYaml .Values.preUpgrade.resources | nindent 12 }}
|
|
volumes:
|
|
- name: scripts
|
|
configMap:
|
|
name: "{{ .Release.Name }}-ks-crds-pre-upgrade-scripts"
|
|
defaultMode: 420
|