Compare commits
2 Commits
189a3c4e0c
...
2fef740a5f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2fef740a5f | ||
|
|
7abb8db1e4 |
@ -5,6 +5,7 @@ metadata:
|
|||||||
namespace: argocd
|
namespace: argocd
|
||||||
spec:
|
spec:
|
||||||
goTemplate: true
|
goTemplate: true
|
||||||
|
goTemplateOptions: ["missingkey=error"]
|
||||||
generators:
|
generators:
|
||||||
- git:
|
- git:
|
||||||
repoURL: https://git.bouvais.lu/adrien/ctie-exercice
|
repoURL: https://git.bouvais.lu/adrien/ctie-exercice
|
||||||
@ -13,7 +14,7 @@ spec:
|
|||||||
- path: "tenants/*/config.yaml"
|
- path: "tenants/*/config.yaml"
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
name: 'tenant-{{.name}}'
|
name: 'tenant-{{ trimPrefix "tenant-" .path.basename }}'
|
||||||
spec:
|
spec:
|
||||||
project: tenants
|
project: tenants
|
||||||
sources:
|
sources:
|
||||||
@ -22,13 +23,16 @@ spec:
|
|||||||
path: charts/tenant
|
path: charts/tenant
|
||||||
helm:
|
helm:
|
||||||
valueFiles:
|
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
|
- repoURL: https://git.bouvais.lu/adrien/ctie-exercice
|
||||||
targetRevision: main
|
targetRevision: main
|
||||||
ref: values
|
ref: values
|
||||||
destination:
|
destination:
|
||||||
server: https://kubernetes.default.svc
|
server: https://kubernetes.default.svc
|
||||||
namespace: 'tenant-{{.name}}'
|
namespace: 'tenant-{{ trimPrefix "tenant-" .path.basename }}'
|
||||||
syncPolicy:
|
syncPolicy:
|
||||||
automated:
|
automated:
|
||||||
prune: true
|
prune: true
|
||||||
|
|||||||
@ -4,14 +4,12 @@ LABEL org.opencontainers.image.title="tenant-base" \
|
|||||||
org.opencontainers.image.description="Hardened base image for tenant workspaces" \
|
org.opencontainers.image.description="Hardened base image for tenant workspaces" \
|
||||||
org.opencontainers.image.source="https://git.bouvais.lu/adrien/"
|
org.opencontainers.image.source="https://git.bouvais.lu/adrien/"
|
||||||
|
|
||||||
# System deps only — keep this layer stable so it's rarely rebuilt
|
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
curl \
|
curl \
|
||||||
tini \
|
tini \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Non-root user, fixed UID/GID for predictable K8s securityContext
|
|
||||||
RUN groupadd --gid 1000 appuser \
|
RUN groupadd --gid 1000 appuser \
|
||||||
&& useradd --uid 1000 --gid appuser --shell /bin/bash --create-home appuser
|
&& useradd --uid 1000 --gid appuser --shell /bin/bash --create-home appuser
|
||||||
|
|
||||||
|
|||||||
@ -10,7 +10,6 @@ COPY --chown=appuser:appuser requirements.txt /tmp/requirements.txt
|
|||||||
RUN pip install --no-cache-dir -r /tmp/requirements.txt \
|
RUN pip install --no-cache-dir -r /tmp/requirements.txt \
|
||||||
&& rm /tmp/requirements.txt
|
&& rm /tmp/requirements.txt
|
||||||
|
|
||||||
# No secrets baked in — S3 creds come from a mounted K8s Secret / env at runtime
|
|
||||||
USER appuser
|
USER appuser
|
||||||
WORKDIR /home/appuser/work
|
WORKDIR /home/appuser/work
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,3 @@
|
|||||||
name: "a" # TODO: Remove this and use path instead
|
|
||||||
|
|
||||||
image:
|
image:
|
||||||
repository: registry.bouvais.lu/tenant-jupyter
|
repository: registry.bouvais.lu/tenant-jupyter
|
||||||
tag: "1.0.0"
|
tag: "1.0.0"
|
||||||
@ -12,8 +10,3 @@ resources:
|
|||||||
cpu: "1"
|
cpu: "1"
|
||||||
memory: 2Gi
|
memory: 2Gi
|
||||||
|
|
||||||
gpu:
|
|
||||||
enabled: true
|
|
||||||
type: "t4" # one of: none | t4 | a100 | l4
|
|
||||||
count: 1
|
|
||||||
|
|
||||||
|
|||||||
13
tenants/tenant-b/config.yaml
Normal file
13
tenants/tenant-b/config.yaml
Normal file
@ -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
|
||||||
Loading…
x
Reference in New Issue
Block a user