Skip to content

Commit 5fd5140

Browse files
committed
Update argo app to use kargo branches
1 parent 744ebdc commit 5fd5140

File tree

2 files changed

+25
-23
lines changed

2 files changed

+25
-23
lines changed

apps/argo-apps/playground-sandbox.yaml

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,31 +15,33 @@ spec:
1515
metadata:
1616
name: playground-sandbox-{{ .path.basename }}
1717
annotations:
18-
kargo.akuity.io/authorized-stage: playground-sandbox:{{ .path.basename }}
18+
kargo.akuity.io/authorized-stage: kargo-project-playground-sandbox:{{ .path.basename }}
1919
spec:
2020
project: apps
2121
sources:
2222
- repoURL: https://github.com/Utwo/k8s-playground
23-
path: apps/playground-sandbox/common
24-
targetRevision: HEAD
25-
- repoURL: https://github.com/Utwo/k8s-playground
26-
path: apps/playground-sandbox/envs/{{ .path.basename }}
27-
targetRevision: HEAD
28-
ref: values
23+
path: playground-sandbox
24+
targetRevision: stage/{{ .path.basename }}
2925
directory:
3026
recurse: true
31-
- repoURL: https://github.com/Utwo/playground-sandbox
32-
path: ./helm/charts/playground-sandbox
33-
targetRevision: HEAD
34-
helm:
35-
valueFiles:
36-
- $values/apps/playground-sandbox/common/values.yaml
37-
- $values/apps/playground-sandbox/envs/{{ .path.basename }}/values.yaml
38-
parameters:
39-
- name: backend.image.tag
40-
value: $ARGOCD_APP_REVISION_SHORT
41-
- name: frontend.image.tag
42-
value: $ARGOCD_APP_REVISION_SHORT
27+
# - repoURL: https://github.com/Utwo/k8s-playground
28+
# path: apps/playground-sandbox/envs/{{ .path.basename }}
29+
# targetRevision: HEAD
30+
# ref: values
31+
# directory:
32+
# recurse: true
33+
# - repoURL: https://github.com/Utwo/playground-sandbox
34+
# path: ./helm/charts/playground-sandbox
35+
# targetRevision: HEAD
36+
# helm:
37+
# valueFiles:
38+
# - $values/apps/playground-sandbox/common/values.yaml
39+
# - $values/apps/playground-sandbox/envs/{{ .path.basename }}/values.yaml
40+
# parameters:
41+
# - name: backend.image.tag
42+
# value: $ARGOCD_APP_REVISION_SHORT
43+
# - name: frontend.image.tag
44+
# value: $ARGOCD_APP_REVISION_SHORT
4345
destination:
4446
name: k3d-apps
4547
namespace: playground-sandbox-{{ .path.basename }}

infra/kargo/projects/playground-sandbox/promotion-template.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ metadata:
66
spec:
77
vars:
88
- name: gitOpsRepo
9-
value: https://github.com/Utwo/k8s-playground.git
9+
value: https://github.com/Utwo/k8s-playground
1010
- name: gitRepo
1111
value: https://github.com/Utwo/playground-sandbox.git
1212
- name: srcPath
@@ -45,7 +45,7 @@ spec:
4545
- uses: helm-template
4646
config:
4747
path: ${{ vars.srcPath }}/repos/${{ vars.applicationName }}-repo/helm/charts/${{ vars.applicationName }}
48-
releaseName: ${{ vars.applicationName }}
48+
releaseName: ${{ vars.applicationName }}-${{ ctx.stage }}
4949
namespace: ${{ vars.applicationName }}-${{ ctx.stage }}
5050
kubeVersion: 1.30.0
5151
valuesFiles:
@@ -73,7 +73,7 @@ spec:
7373
- uses: argocd-update
7474
config:
7575
apps:
76-
- name: ${{ ctx.project }}-${{ ctx.stage }}
76+
- name: ${{ vars.applicationName }}-${{ ctx.stage }}
7777
sources:
78-
- repoURL: ${{ vars.gitopsRepo }}
78+
- repoURL: ${{ vars.gitOpsRepo }}
7979
desiredRevision: ${{ task.outputs['commit'].commit }}

0 commit comments

Comments
 (0)