디렉토리 구조 및 각 서비스 추가

This commit is contained in:
dsk-minchulahn
2024-01-03 17:29:11 +09:00
parent 98de2a7627
commit d601d0f259
1632 changed files with 207616 additions and 1 deletions

View File

@@ -0,0 +1,39 @@
# HELM first deletes RBAC, then it tries to delete other resources like CSPC and PVC.
# We've got validating webhook on CSPC and PVC.
# But even that the policy of this webhook is Ignore, it fails because the ServiceAccount
# does not have permission to access resources like BDC anymore which are used for validation.
# Therefore we first need to delete webhook so we can delete the rest of the deployments.
{{- $kubeMinor := .Capabilities.KubeVersion.Minor | replace "+" "" }}
apiVersion: batch/v1
kind: Job
metadata:
name: {{ template "cstor.fullname" . }}-webhook-cleanup
namespace: {{ .Release.Namespace }}
annotations:
"helm.sh/hook": pre-delete
"helm.sh/hook-delete-policy": hook-succeeded
labels:
app: {{ template "cstor.name" . }}
spec:
template:
metadata:
name: {{ template "cstor.fullname" . }}-webhook-cleanup
labels:
app: {{ template "cstor.name" . }}
spec:
serviceAccountName: {{ .Values.serviceAccount.cstorOperator.name }}
containers:
- name: kubectl
{{- /* bitnami maintains an image for all k8s versions */}}
{{- /* see: https://hub.docker.com/r/bitnami/kubectl */}}
{{- if .Values.cleanup.image.tag }}
image: "{{ .Values.cleanup.image.registry }}{{ .Values.cleanup.image.repository }}:{{ .Values.cleanup.image.tag }}"
{{- else }}
image: "{{ .Values.cleanup.image.registry }}{{ .Values.cleanup.image.repository }}:{{ .Capabilities.KubeVersion.Major }}.{{ $kubeMinor }}"
{{- end }}
command:
- /bin/sh
- -c
- >
kubectl delete validatingWebhookConfiguration openebs-cstor-validation-webhook || true;
restartPolicy: OnFailure