Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions argocd/apps/workloads/appset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ spec:
- app: changedetection
namespace: changedetection
wave: "0"
- app: dieu-dev
namespace: dieu-dev
wave: "0"
template:
metadata:
name: "{{ .app }}-{{ .name }}"
Expand Down
6 changes: 6 additions & 0 deletions charts/workloads/dieu-dev/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v2
name: dieu-dev
description: Portfolio site for dieu.dev (static web + Go metrics API)
type: application
version: 0.1.0
appVersion: "0.1.0"
42 changes: 42 additions & 0 deletions charts/workloads/dieu-dev/templates/api-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-api
labels:
app.kubernetes.io/name: {{ .Release.Name }}
app.kubernetes.io/component: api
spec:
replicas: {{ .Values.api.replicas }}
selector:
matchLabels:
app.kubernetes.io/name: {{ .Release.Name }}
app.kubernetes.io/component: api
template:
metadata:
labels:
app.kubernetes.io/name: {{ .Release.Name }}
app.kubernetes.io/component: api
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: api
image: "{{ .Values.api.image.repository }}:{{ .Values.api.image.tag }}"
env:
- name: METRICS_SOURCE
value: {{ .Values.api.metricsSource | quote }}
{{- if .Values.api.prometheusUrl }}
- name: PROMETHEUS_URL
value: {{ .Values.api.prometheusUrl | quote }}
{{- end }}
ports:
- name: http
containerPort: {{ .Values.api.port }}
readinessProbe:
httpGet:
path: /healthz
port: http
resources:
{{- toYaml .Values.api.resources | nindent 12 }}
15 changes: 15 additions & 0 deletions charts/workloads/dieu-dev/templates/api-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}-api
labels:
app.kubernetes.io/name: {{ .Release.Name }}
app.kubernetes.io/component: api
spec:
selector:
app.kubernetes.io/name: {{ .Release.Name }}
app.kubernetes.io/component: api
ports:
- name: http
port: {{ .Values.api.port }}
targetPort: http
27 changes: 27 additions & 0 deletions charts/workloads/dieu-dev/templates/httproute.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: {{ .Release.Name }}
spec:
parentRefs:
- name: public
namespace: cilium-gateway-system
hostnames:
- {{ .Values.httproute.hostname | quote }}
rules:
# /api/* -> the Go metrics API (longer prefix wins, so this takes precedence).
- matches:
- path:
type: PathPrefix
value: /api
backendRefs:
- name: {{ .Release.Name }}-api
port: {{ .Values.api.port }}
# everything else -> the static site.
- matches:
- path:
type: PathPrefix
value: /
backendRefs:
- name: {{ .Release.Name }}-web
port: {{ .Values.web.port }}
35 changes: 35 additions & 0 deletions charts/workloads/dieu-dev/templates/web-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-web
labels:
app.kubernetes.io/name: {{ .Release.Name }}
app.kubernetes.io/component: web
spec:
replicas: {{ .Values.web.replicas }}
selector:
matchLabels:
app.kubernetes.io/name: {{ .Release.Name }}
app.kubernetes.io/component: web
template:
metadata:
labels:
app.kubernetes.io/name: {{ .Release.Name }}
app.kubernetes.io/component: web
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: web
image: "{{ .Values.web.image.repository }}:{{ .Values.web.image.tag }}"
ports:
- name: http
containerPort: {{ .Values.web.port }}
readinessProbe:
httpGet:
path: /
port: http
resources:
{{- toYaml .Values.web.resources | nindent 12 }}
15 changes: 15 additions & 0 deletions charts/workloads/dieu-dev/templates/web-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}-web
labels:
app.kubernetes.io/name: {{ .Release.Name }}
app.kubernetes.io/component: web
spec:
selector:
app.kubernetes.io/name: {{ .Release.Name }}
app.kubernetes.io/component: web
ports:
- name: http
port: {{ .Values.web.port }}
targetPort: http
39 changes: 39 additions & 0 deletions charts/workloads/dieu-dev/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# The portfolio site: a static web frontend and a small Go metrics API, served
# together under one hostname (web at /, api at /api). TLS is terminated by the
# Cilium gateway's *.dieu.dev wildcard, so no cert is needed here.

httproute:
# Per-cluster: stage serves preview.dieu.dev; a prod override would set dieu.dev.
hostname: preview.dieu.dev

web:
image:
repository: ghcr.io/jonathandieu/dieu-dev-web
tag: latest # pinned by CI/Kargo once images are pushed to GHCR
replicas: 1
port: 8080
resources:
requests:
cpu: 10m
memory: 32Mi
limits:
memory: 64Mi

api:
image:
repository: ghcr.io/jonathandieu/dieu-dev-api
tag: latest # pinned by CI/Kargo once images are pushed to GHCR
replicas: 1
port: 8080
# "mock" serves offline fixtures; "prometheus" reads real cluster data.
metricsSource: mock
prometheusUrl: ""
resources:
requests:
cpu: 10m
memory: 16Mi
limits:
memory: 64Mi

# Set if the GHCR packages are private.
imagePullSecrets: []
Loading