mirror of https://git.rancher.io/charts
(dev-v2.6-archive) [rancher-monitoring] update the template of rancher-crd chart to handle CRD tgz file
(partially cherry picked from commit 1225dc843a
)
pull/1680/head
parent
9ac903397d
commit
866376e483
|
@ -49,8 +49,12 @@ spec:
|
|||
- -c
|
||||
- >
|
||||
echo "Applying CRDs...";
|
||||
kubectl apply -f /etc/config/crd-manifest.yaml;
|
||||
|
||||
mkdir -p /etc/crd-manifest;
|
||||
base64 -d /etc/config/crd-manifest.tgz > /etc/crd-manifest/crd-manifest.tgz;
|
||||
tar -xzvf /etc/crd-manifest/crd-manifest.tgz -C /etc/crd-manifest;
|
||||
rm /etc/crd-manifest/crd-manifest.tgz;
|
||||
kubectl apply -Rf /etc/crd-manifest;
|
||||
|
||||
echo "Waiting for CRDs to be recognized before finishing installation...";
|
||||
|
||||
{{- range $path, $_ := (.Files.Glob "crd-manifest/**.yaml") }}
|
||||
|
@ -121,7 +125,12 @@ spec:
|
|||
- /bin/sh
|
||||
- -c
|
||||
- >
|
||||
kubectl delete -f /etc/config/crd-manifest.yaml
|
||||
echo "Deleting CRDs...";
|
||||
mkdir -p /etc/crd-manifest;
|
||||
base64 -d /etc/config/crd-manifest.tgz > /etc/crd-manifest/crd-manifest.tgz;
|
||||
tar -xzvf /etc/crd-manifest/crd-manifest.tgz -C /etc/crd-manifest;
|
||||
rm /etc/crd-manifest/crd-manifest.tgz;
|
||||
kubectl delete -Rf /etc/crd-manifest;
|
||||
volumeMounts:
|
||||
- name: crd-manifest
|
||||
readOnly: true
|
||||
|
|
|
@ -4,11 +4,5 @@ metadata:
|
|||
name: {{ .Chart.Name }}-manifest
|
||||
namespace: {{ .Release.Namespace }}
|
||||
data:
|
||||
crd-manifest.yaml: |
|
||||
{{- $currentScope := . -}}
|
||||
{{- $crds := (.Files.Glob "crd-manifest/**.yaml") -}}
|
||||
{{- range $path, $_ := $crds -}}
|
||||
{{- with $currentScope -}}
|
||||
{{ .Files.Get $path | nindent 4 }}
|
||||
---
|
||||
{{- end -}}{{- end -}}
|
||||
crd-manifest.tgz:
|
||||
{{- .Files.Get "files/crd-manifest.tgz" | b64enc | indent 4 }}
|
||||
|
|
Loading…
Reference in New Issue