Skip to content

Commit

Permalink
docs: Add "Create Namespace" to sync options doc (#3490) (#10326)
Browse files Browse the repository at this point in the history
* Add create namespace to the sync options doc

Signed-off-by: JesseBot <jessebot@linux.com>

* Update docs/user-guide/sync-options.md

Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>

Signed-off-by: JesseBot <jessebot@linux.com>
Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>
  • Loading branch information
jessebot and crenshaw-dev committed Aug 17, 2022
1 parent 82ad3a8 commit 3b37050
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/user-guide/sync-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,17 @@ syncOptions:
- FailOnSharedResource=true
```


## Create Namespace

```yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
namespace: test
spec:
syncPolicy:
syncOptions:
- CreateNamespace=true
```
The example above shows how an Argo CD Application can be configured so it will create namespaces for the Application resources if the namespaces don't exist already. Without this either declared in the Application manifest or passed in the cli via `--sync-option CreateNamespace=true`, the Application will fail to sync if the resources' namespaces do not exist.

0 comments on commit 3b37050

Please sign in to comment.