Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example environment promotion #1584

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions demo/environment_promotion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# notes on environment promotion

```yaml
---
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: example-app-set
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "4"
spec:
# enable go templating
goTemplate: true

# this generator allows us to values from an external k8s secret
generators:

# local environment
- clusters:
selector:
matchLabels:
environment: "jesse-local"
# values to be templated into the Argo CD application
values:
# gets updated on push to main
version: 0.2.0
namespace: test

# dev environment
- clusters:
selector:
matchLabels:
environment: "dev"
# values to be templated into the Argo CD application
values:
# gets updated on push to main
version: 0.1.0
namespace: main

# prod environment
- clusters:
selector:
matchLabels:
environment: "prod"
# values to be templated into the Argo CD application
values:
# gets updated after user clicks approve button after main is successfully rolled out
version: 0.1.0
namespace: main

template:
metadata:
name: example-web-app

spec:
project: example

# where the app is going
destination:
server: "{{ .server }}"
namespace: example

# reconciliation policy
syncPolicy:
syncOptions:
- ApplyOutOfSyncOnly=true
automated:
prune: true
selfHeal: true
# where the is coming from
source:
repoURL: https://small-hack.github.io/example-chart
targetRevision: "{{ .values.version }}"
chart: example
helm:
releaseName: "my-app-{{ .metadata.labels.environment }}"
```