Skip to content

Commit

Permalink
the team should not need to set a unique appName, so we need to prefi…
Browse files Browse the repository at this point in the history
…x the team name. also add some example values to explain it better

Signed-off-by: Johannes Kleinlercher <[email protected]>
  • Loading branch information
jkleinlercher committed Jun 6, 2024
1 parent 77700fc commit ba84f4a
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
annotations:
kargo.akuity.io/authorized-stage: {{ tpl $.Values.kargoProject $ }}:{{ .name }}
spec:
project: {{ $.Values.appProject }}
project: {{ tpl $.Values.appProject $ }}
source:
repoURL: {{ $.Values.repoUrl }}
targetRevision: stages/{{ .name }}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
teamName: team1
appProject: "{{ .Values.teamName }}-project"
appName: multi-stage-app
repoUrl: https://github.com/suxess-it/sx-cnp-oss-demo-app
# since a kargo project is a cluster-scoped resource it needs a unique name
# however, in a app-in-any-namespace feature the appName doesn't need to be unique in the cluster
# so we add the team as an extra prefix to get a unique name
kargoProject: "{{ .Values.teamName }}-{{ .Values.appName }}-kargo-project"
createAppNamespace: true
stages:
- name: "test"
subscriptions:
# be aware that you MUST currently name the warehouse "warehouse-{{ .Values.appName }}"
# because it gets created with this name implicitly.
# todo: give the user the option to define the warehouse as he likes it
warehouse: "warehouse-{{ .Values.appName }}"
- name: "qa"
subscriptions:
upstreamStages:
- name: test
- name: "prod"
subscriptions:
upstreamStages:
- name: qa
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
appProject: ~
teamName: ~
appProject: "{{ .Values.teamName }}-project"
appName: ~
repoUrl: ~
# maybe also the kargo project is something implicit which we don't need to specify here
# it depends if some apps need to share a kargoProject or not,
# but currently it seems to be a 1:1 relation between appName and kargoProject
kargoProject: "{{ .Values.appName }}-kargo-project"
kargoProject: "{{ .Values.teamName }}-{{ .Values.appName }}-kargo-project"
createAppNamespace: true
stages: []

0 comments on commit ba84f4a

Please sign in to comment.