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
|
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/
|
[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
|
exit $RC
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
for f in templates/*.yaml
|
|
||||||
(
|
(
|
||||||
set -e
|
set -e
|
||||||
eval "$(application_chart_info templates/sealed-secrets.yaml)"
|
eval "$(application_chart_info templates/sealed-secrets.yaml)"
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
{{ if (index .Values "sealed-secrets").enabled -}}
|
# {{ if (index .Values "sealed-secrets").enabled -}}
|
||||||
|
---
|
||||||
apiVersion: argoproj.io/v1alpha1
|
apiVersion: argoproj.io/v1alpha1
|
||||||
kind: Application
|
kind: Application
|
||||||
metadata:
|
metadata:
|
||||||
name: "{{ .Release.Name }}-sealed-secrets"
|
name: "{{ .Release.Name }}-sealed-secrets"
|
||||||
namespace: argocd
|
namespace: argocd
|
||||||
finalizers:
|
finalizers:
|
||||||
- resources-finalizer.argocd.argoproj.io
|
- resources-finalizer.argocd.argoproj.io
|
||||||
spec:
|
spec:
|
||||||
project: default
|
project: default
|
||||||
source:
|
source:
|
||||||
|
@ -29,4 +30,4 @@ spec:
|
||||||
duration: 5s
|
duration: 5s
|
||||||
factor: 2
|
factor: 2
|
||||||
maxDuration: 3m0s
|
maxDuration: 3m0s
|
||||||
{{- end }}
|
# {{- end }}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user