wip
This commit is contained in:
parent
f67fd0e1e8
commit
b656b8bd86
|
@ -76,5 +76,11 @@ argocd app set argo1 --helm-set secrets.enabled=false --helm-set sealed-secrets.
|
|||
helm uninstall argo1
|
||||
```
|
||||
|
||||
#### DUMP OF AN INSTALL
|
||||
|
||||
```bash
|
||||
cd argo1
|
||||
bash install-crds.sh
|
||||
|
||||
|
||||
[argo-crds]: https://argo-cd.readthedocs.io/en/stable/operator-manual/installation/
|
||||
|
|
54
argo1/delete-crds.sh
Normal file
54
argo1/delete-crds.sh
Normal file
|
@ -0,0 +1,54 @@
|
|||
#!/bin/bash
|
||||
|
||||
MAINDIR="$(dirname "$0")"
|
||||
cd "$MAINDIR"
|
||||
|
||||
application_chart_info() {
|
||||
F="$1"
|
||||
yq -o json . "$F" | jq -r '
|
||||
.spec.source
|
||||
| (
|
||||
@sh "CHART=\(.chart)",
|
||||
@sh "VERSION=\(.targetRevision)",
|
||||
@sh "REPO=\(.repoURL)"
|
||||
)
|
||||
'
|
||||
}
|
||||
|
||||
dependency_chart_info() {
|
||||
F="${1:-"$MAINDIR"/Chart.yaml}"
|
||||
DEP="${2:-0}"
|
||||
|
||||
yq -o json . "$F" | jq -r --argjson d "$DEP" '
|
||||
.dependencies[$d]
|
||||
| (
|
||||
@sh "CHART=\(.name)",
|
||||
@sh "VERSION=\(.version)",
|
||||
@sh "REPO=\(.repository)"
|
||||
)
|
||||
'
|
||||
}
|
||||
|
||||
(
|
||||
set -e
|
||||
eval "$(dependency_chart_info)"
|
||||
set -x
|
||||
helm template argocd-crds --include-crds "$CHART" --repo "$REPO" --version "$VERSION" | yq 'select(.kind == "CustomResourceDefinition")' | kubectl delete -f -
|
||||
)
|
||||
|
||||
RC=$?
|
||||
if [ $RC -ne 0 ];then
|
||||
1>&2 echo "error deleting ArgoCD CRDs"
|
||||
fi
|
||||
|
||||
(
|
||||
set -e
|
||||
eval "$(application_chart_info templates/sealed-secrets.yaml)"
|
||||
set -x
|
||||
helm template sealed-secrets-crds --include-crds "$CHART" --repo "$REPO" --version "$VERSION" | yq 'select(.kind == "CustomResourceDefinition")' | kubectl delete -f -
|
||||
)
|
||||
|
||||
RC=$?
|
||||
if [ $RC -ne 0 ];then
|
||||
1>&2 echo "error deleting Sealed Secrets CRDs"
|
||||
fi
|
|
@ -42,8 +42,6 @@ if [ $RC -ne 0 ];then
|
|||
exit $RC
|
||||
fi
|
||||
|
||||
|
||||
for f in templates/*.yaml
|
||||
(
|
||||
set -e
|
||||
eval "$(application_chart_info templates/sealed-secrets.yaml)"
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{{ if (index .Values "sealed-secrets").enabled -}}
|
||||
# {{ if (index .Values "sealed-secrets").enabled -}}
|
||||
---
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
|
@ -29,4 +30,4 @@ spec:
|
|||
duration: 5s
|
||||
factor: 2
|
||||
maxDuration: 3m0s
|
||||
{{- end }}
|
||||
# {{- end }}
|
||||
|
|
Loading…
Reference in New Issue
Block a user