-
Notifications
You must be signed in to change notification settings - Fork 0
/
application-set.yaml
51 lines (51 loc) · 1.88 KB
/
application-set.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: nkp-previews
namespace: argocd
spec:
generators:
# Check for pull requests in neondatabase/kube-previews-application once
# per minute. This repository that contains the application source code
- pullRequest:
requeueAfterSeconds: 60
github:
owner: neondatabase
repo: kube-previews-application
# We need to tell Argo CD to ignore differences/drift in the Application's
# Helm params. This is because our GitHub Ations CI pipeline will override
# the database url and image tag. Argo CD would wipe these changes away if
# we didn't tell it not to - this is desirable in production but not here!
ignoreApplicationDifferences:
- jqPathExpressions:
- .spec.source.helm.parameters
template:
metadata:
name: 'nkp-pr-{{number}}'
spec:
source:
# Create the preview environment using the manifests in the main branch
# of the manifests repository, but use custom values and parameters
repoURL: 'https://github.com/neondatabase/kube-previews-manifests'
path: helm/
targetRevision: main
helm:
valueFiles:
- values.dev.yaml
# The database.url and deployment.tag values will be provided by CI using
# parameter overrides (https://argo-cd.readthedocs.io/en/stable/user-guide/parameters/).
# Replace ingress.domain with your desired hostname. Preview URLs use
# the following URL structure: nkp-pr-{{number}}.{{ingress.domain}}
values: |
ingress:
domain: pr-{{number}}.nkp.ngrok.app
project: default
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
destination:
server: https://kubernetes.default.svc
namespace: 'nkp-pr-{{number}}'