rancher-partner-charts/charts/trilio/k8s-triliovault-operator/templates/preflight_job_preinstall_ho...

197 lines
6.0 KiB
YAML
Raw Normal View History

{{- if .Values.preflight.enabled -}}
{{- template "k8s-triliovault-operator.preFlightValidation" . }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{template "k8s-triliovault-operator.name" .}}-{{.Release.Namespace}}-preflight-role
labels:
{{- include "k8s-triliovault-operator.labels" . | nindent 4 }}
app.kubernetes.io/instance: {{template "k8s-triliovault-operator.appName" .}}-preflight-role
annotations:
"helm.sh/hook": "pre-install"
"helm.sh/hook-delete-policy": hook-failed, hook-succeeded
"helm.sh/hook-weight": "1"
rules:
- apiGroups:
- '*'
resources:
- '*'
verbs:
- get
- list
- apiGroups:
- apiextensions.k8s.io
resources:
- customresourcedefinitions
verbs:
- create
- update
- delete
- patch
- apiGroups:
- ""
resources:
- serviceaccounts
- pods
- persistentvolumeclaims
- pods/exec
verbs:
- create
- update
- delete
- patch
- apiGroups:
- rbac.authorization.k8s.io
resources:
- clusterroles
- clusterrolebindings
verbs:
- create
- update
- delete
- patch
- apiGroups:
- ""
resources:
- namespaces
verbs:
- get
- list
- apiGroups:
- batch
resources:
- jobs
verbs:
- create
- delete
- apiGroups:
- storage.k8s.io
resources:
- storageclasses
verbs:
- get
- list
- apiGroups:
- snapshot.storage.k8s.io
resources:
- volumesnapshots
- volumesnapshotclasses
verbs:
- get
- list
- create
- update
- delete
- patch
---
{{- if eq .Values.svcAccountName "" }}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ template "k8s-triliovault-operator.preflightServiceAccountName" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "k8s-triliovault-operator.labels" . | nindent 4 }}
app.kubernetes.io/instance: {{ template "k8s-triliovault-operator.appName" . }}-preflight-service-account
annotations:
"helm.sh/hook": "pre-install"
"helm.sh/hook-delete-policy": hook-failed, hook-succeeded
"helm.sh/hook-weight": "2"
{{- end }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ template "k8s-triliovault-operator.name" . }}-{{ .Release.Namespace }}-preflight-rolebinding
labels:
{{- include "k8s-triliovault-operator.labels" . | nindent 4 }}
app.kubernetes.io/instance: {{ template "k8s-triliovault-operator.appName" . }}-preflight-rolebinding
annotations:
"helm.sh/hook": "pre-install"
"helm.sh/hook-delete-policy": hook-failed, hook-succeeded
"helm.sh/hook-weight": "3"
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ template "k8s-triliovault-operator.name" . }}-{{ .Release.Namespace }}-preflight-role
subjects:
- kind: ServiceAccount
name: {{ template "k8s-triliovault-operator.preflightServiceAccountName" . }}
namespace: {{ .Release.Namespace }}
---
apiVersion: batch/v1
kind: Job
metadata:
name: {{ template "k8s-triliovault-operator.name" . }}-preflight-job-preinstall-hook-{{ randAlphaNum 4 | lower }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "k8s-triliovault-operator.fullname" . }}
release: "{{ .Release.Name }}"
{{- include "k8s-triliovault-operator.labels" . | nindent 4 }}
app.kubernetes.io/instance: {{ template "k8s-triliovault-operator.appName" . }}-preflight-job-preinstall-hook
annotations:
"helm.sh/hook": "pre-install"
"helm.sh/hook-delete-policy": hook-succeeded
"helm.sh/hook-weight": "4"
spec:
backoffLimit: 0
ttlSecondsAfterFinished: 3600
template:
spec:
containers:
- name: preflight
2022-10-26 17:28:36 +00:00
image: {{ index .Values "registry" }}/{{ index .Values "preflight" "repository" }}:{{ index .Values "preflight" "imageTag" }}
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
command:
- /bin/sh
- -c
- >-
/opt/tvk-plugins/preflight run --in-cluster
--log-level={{ .Values.preflight.logLevel }}
--namespace={{ .Release.Namespace }}
{{- if .Values.preflight.cleanupOnFailure }}
--cleanup-on-failure
{{- end }}
{{- if .Values.preflight.imagePullSecret }}
--image-pull-secret={{ .Values.preflight.imagePullSecret }}
{{- end }}
{{- if .Values.preflight.limits }}
--limits={{ .Values.preflight.limits }}
{{- end }}
{{- if .Values.preflight.localRegistry }}
--local-registry={{ .Values.preflight.localRegistry }}
{{- end }}
{{- if .Values.preflight.nodeSelector }}
--node-selector={{ .Values.preflight.nodeSelector }}
{{- end }}
{{- if .Values.preflight.pvcStorageRequest }}
--pvc-storage-request={{ .Values.preflight.pvcStorageRequest }}
{{- end }}
{{- if .Values.preflight.requests }}
--requests={{ .Values.preflight.requests }}
{{- end }}
{{- if .Values.preflight.storageClass }}
--storage-class={{ .Values.preflight.storageClass }}
{{- end }}
{{- if .Values.preflight.volumeSnapshotClass }}
--volume-snapshot-class={{ .Values.preflight.volumeSnapshotClass }}
{{- end }}
Charts CI ``` Updated: argo/argo-cd: - 5.52.1 bitnami/airflow: - 16.1.11 bitnami/cassandra: - 10.6.9 bitnami/kafka: - 26.6.3 bitnami/mariadb: - 15.0.1 bitnami/mysql: - 9.16.1 bitnami/postgresql: - 13.2.29 bitnami/redis: - 18.6.3 bitnami/spark: - 8.1.8 bitnami/tomcat: - 10.11.11 bitnami/wordpress: - 19.0.5 bitnami/zookeeper: - 12.4.4 cert-manager/cert-manager: - v1.13.3 clastix/kamaji: - 0.14.0 cockroach-labs/cockroachdb: - 11.2.3 confluent/confluent-for-kubernetes: - 0.824.40 crowdstrike/falcon-sensor: - 1.24.1 datadog/datadog: - 3.50.5 datadog/datadog-operator: - 1.4.1 dell/csi-isilon: - 2.9.0 dell/csi-powermax: - 2.9.0 dell/csi-powerstore: - 2.9.0 dell/csi-unity: - 2.9.0 dell/csi-vxflexos: - 2.9.0 digitalis/vals-operator: - 0.7.8 dynatrace/dynatrace-operator: - 0.15.0 external-secrets/external-secrets: - 0.9.11 f5/nginx-ingress: - 1.1.0 fairwinds/polaris: - 5.17.0 gluu/gluu: - 5.0.24 haproxy/haproxy: - 1.35.5 harbor/harbor: - 1.14.0 hashicorp/consul: - 1.3.1 instana/instana-agent: - 1.2.66 intel/intel-device-plugins-operator: - 0.29.0 intel/intel-device-plugins-qat: - 0.29.0 intel/intel-device-plugins-sgx: - 0.29.0 jenkins/jenkins: - 4.11.2 jfrog/artifactory-ha: - 107.71.11 jfrog/artifactory-jcr: - 107.71.11 kong/kong: - 2.33.3 kubecost/cost-analyzer: - 1.108.1 kuma/kuma: - 2.5.1 linkerd/linkerd-control-plane: - 1.16.9 mongodb/community-operator: - 0.9.0 nats/nats: - 1.1.6 new-relic/nri-bundle: - 5.0.58 nutanix/nutanix-csi-snapshot: - 6.3.2 nutanix/nutanix-csi-storage: - 2.6.6 openebs/openebs: - 3.10.0 percona/psmdb-db: - 1.15.1 percona/pxc-db: - 1.13.4 redpanda/redpanda: - 5.7.7 speedscale/speedscale-operator: - 2.0.2 stackstate/stackstate-k8s-agent: - 1.0.66 sysdig/sysdig: - 1.16.24 traefik/traefik: - 26.0.0 trilio/k8s-triliovault-operator: - 4.0.0 weka/csi-wekafsplugin: - 2.3.2 yugabyte/yugabyte: - 2.18.5 yugabyte/yugaware: - 2.18.5 ```
2024-01-12 17:13:39 +00:00
{{- if .Values.nodeSelector }}
nodeSelector: {{- .Values.nodeSelector | toYaml | nindent 8 }}
{{- end }}
{{- if .Values.affinity }}
affinity:
{{- toYaml .Values.affinity | nindent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
{{- toYaml .Values.tolerations | nindent 8 }}
{{- end }}
restartPolicy: Never
terminationGracePeriodSeconds: 0
serviceAccountName: {{ template "k8s-triliovault-operator.preflightServiceAccountName" . }}
{{- end }}