diff --git a/gitops/tenants/appset.yaml b/gitops/tenants/appset.yaml index f9bed20..d8bb709 100644 --- a/gitops/tenants/appset.yaml +++ b/gitops/tenants/appset.yaml @@ -5,6 +5,7 @@ metadata: namespace: argocd spec: goTemplate: true + goTemplateOptions: ["missingkey=error"] generators: - git: repoURL: https://git.bouvais.lu/adrien/ctie-exercice @@ -13,7 +14,7 @@ spec: - path: "tenants/*/config.yaml" template: metadata: - name: 'tenant-{{.name}}' + name: 'tenant-{{ trimPrefix "tenant-" .path.basename }}' spec: project: tenants sources: @@ -22,13 +23,16 @@ spec: path: charts/tenant helm: valueFiles: - - '$values/tenants/tenant-{{.name}}/config.yaml' + - '$values/{{.path.path}}/config.yaml' + parameters: + - name: name + value: '{{ trimPrefix "tenant-" .path.basename }}' - repoURL: https://git.bouvais.lu/adrien/ctie-exercice targetRevision: main ref: values destination: server: https://kubernetes.default.svc - namespace: 'tenant-{{.name}}' + namespace: 'tenant-{{ trimPrefix "tenant-" .path.basename }}' syncPolicy: automated: prune: true diff --git a/tenants/tenant-a/config.yaml b/tenants/tenant-a/config.yaml index 3e2f16e..2540216 100644 --- a/tenants/tenant-a/config.yaml +++ b/tenants/tenant-a/config.yaml @@ -1,5 +1,3 @@ -name: "a" # TODO: Remove this and use path instead - image: repository: registry.bouvais.lu/tenant-jupyter tag: "1.0.0" @@ -12,8 +10,3 @@ resources: cpu: "1" memory: 2Gi -gpu: - enabled: true - type: "t4" # one of: none | t4 | a100 | l4 - count: 1 - diff --git a/tenants/tenant-b/config.yaml b/tenants/tenant-b/config.yaml new file mode 100644 index 0000000..5c19f29 --- /dev/null +++ b/tenants/tenant-b/config.yaml @@ -0,0 +1,13 @@ +name: "b" + +image: + repository: registry.bouvais.lu/tenant-jupyter + tag: "latest" + +resources: + requests: + cpu: 250m + memory: 512Mi + limits: + cpu: "1" + memory: 2Gi