Fix tempalte
This commit is contained in:
parent
fc92125a03
commit
665f8a87c0
@ -373,4 +373,9 @@ And now let's create a job like that:
|
||||
from_secret: ARGOCD_AUTH_TOKEN
|
||||
commands:
|
||||
- argocd app sync -l app=badhouseplants -l branch=$DRONE_BRANCH
|
||||
```
|
||||
- argocd app wait -l app=badhouseplants -l branch=$DRONE_BRANCH
|
||||
```
|
||||
|
||||
And the last step would be to remove an application when branch is removed.
|
||||
|
||||
> Also, I've found out that `ArgoCD` won't remove a namespace if it was created by a `SyncPolicy`, so I've added it to the helm chart, and add a new `value` to provide a name.
|
@ -27,6 +27,3 @@ spec:
|
||||
destination:
|
||||
server: "https://kubernetes.default.svc"
|
||||
namespace: "{{ app }}-{{ name }}"
|
||||
syncPolicy:
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
|
@ -3,7 +3,8 @@
|
||||
branch: $ARGO_APP_BRANCH
|
||||
chart_version: $ARGO_APP_CHART_VERSION
|
||||
value: |
|
||||
namespace: badhouseplants-$ARGO_APP_BRANCH
|
||||
namespace:
|
||||
name: badhouseplants-$ARGO_APP_BRANCH
|
||||
istio:
|
||||
hosts:
|
||||
- $ARGO_APP_HOSTNAME
|
||||
|
Reference in New Issue
Block a user