From 5043720da5f421b0a024088148e5029138dcb4a2 Mon Sep 17 00:00:00 2001 From: radiken Date: Fri, 13 Nov 2026 15:56:51 +0000 Subject: [PATCH 1/2] Dashboard manifests: match what runs, dev Mongo to ClusterIP Prod (backend v1.4, frontend v0.6, prod Mongo secrets, config) now matches what Fleet deploys from iftech/vaclab-2, and the hand-applied frontend-dev is added. mongodb-dev moves off its LoadBalancer, which exposed it on the lab's public addresses. Co-Authored-By: Claude Opus 5.5 --- dst_dashboard/k8s/backend.yaml | 10 +++- dst_dashboard/k8s/frontend-dev.yaml | 85 +++++++++++++++++++++++++++++ dst_dashboard/k8s/frontend.yaml | 3 +- dst_dashboard/k8s/mongodb-dev.yaml | 2 +- dst_dashboard/k8s/mongodb-prod.yaml | 5 +- 5 files changed, 98 insertions(+), 7 deletions(-) create mode 100644 dst_dashboard/k8s/frontend-dev.yaml diff --git a/dst_dashboard/k8s/backend.yaml b/dst_dashboard/k8s/backend.yaml index 4019d83a..4bf7fd08 100644 --- a/dst_dashboard/k8s/backend.yaml +++ b/dst_dashboard/k8s/backend.yaml @@ -1,3 +1,4 @@ +# Prod is deployed by Fleet from iftech/vaclab-2 (fleet/dst-dashboard); keep this copy in sync. apiVersion: v1 kind: ConfigMap metadata: @@ -7,6 +8,7 @@ data: config.yaml: | # DST Explorer Configuration # Global datasources - defined once, referenced by all experiments + # Do not use to load experiments (deprecated) datasources: - name: victoria-logs @@ -49,7 +51,7 @@ spec: effect: "PreferNoSchedule" containers: - name: dst-dashboard-backend - image: mamoutoudiarra/dst-dashboard-backend:v0.5 + image: mamoutoudiarra/dst-dashboard-backend:v1.4 imagePullPolicy: IfNotPresent ports: - containerPort: 8000 @@ -58,7 +60,7 @@ spec: - name: DST_MONGO_URI valueFrom: secretKeyRef: - name: dst-mongo-dev-credentials + name: dst-mongo-prod-credentials key: uri - name: DST_JWT_SECRET valueFrom: @@ -67,6 +69,8 @@ spec: key: secret - name: DST_CONFIG_PATH value: /app/config/config.yaml + - name: DST_ALLOWED_ORIGINS + value: "https://dashboard.lab.vac.dev,https://dev.dashboard.lab.vac.dev" volumeMounts: - name: config mountPath: /app/config @@ -74,7 +78,7 @@ spec: resources: requests: memory: "4Gi" - cpu: "4" + cpu: "1" limits: memory: "16Gi" cpu: "8" diff --git a/dst_dashboard/k8s/frontend-dev.yaml b/dst_dashboard/k8s/frontend-dev.yaml new file mode 100644 index 00000000..3bf788d5 --- /dev/null +++ b/dst_dashboard/k8s/frontend-dev.yaml @@ -0,0 +1,85 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: dst-dashboard-frontend-dev + namespace: dst-dashboard +spec: + serviceName: dst-dashboard-frontend-dev + replicas: 2 + selector: + matchLabels: + app: dst-dashboard-frontend-dev + template: + metadata: + labels: + app: dst-dashboard-frontend-dev + app.kubernetes.io/name: dst-dashboard-frontend-dev + spec: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - metal-01.he-eu-hel1.misc.vacdst + tolerations: + - key: "dedicated" + operator: "Equal" + value: "monitoring" + effect: "PreferNoSchedule" + containers: + - name: frontend-dev + image: mamoutoudiarra/dst-dashboard-frontend:dev-v1.0 + imagePullPolicy: IfNotPresent + ports: + - containerPort: 80 + name: http + resources: + requests: + memory: "512Mi" + cpu: "500m" + limits: + memory: "2Gi" + cpu: "2" +--- +apiVersion: v1 +kind: Service +metadata: + name: dst-dashboard-frontend-dev + namespace: dst-dashboard +spec: + selector: + app: dst-dashboard-frontend-dev + ports: + - protocol: TCP + port: 80 + targetPort: 80 + type: ClusterIP +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: dst-dashboard-frontend-dev-ingress + namespace: dst-dashboard + annotations: + traefik.ingress.kubernetes.io/router.middlewares: default-redirect-https@kubernetescrd + cert-manager.io/cluster-issuer: letsencrypt-prod +spec: + ingressClassName: traefik + tls: + - hosts: + - dev.dashboard.lab.vac.dev + secretName: dashboard-frontend-dev-tls + rules: + - host: dev.dashboard.lab.vac.dev + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: dst-dashboard-frontend-dev + port: + number: 80 diff --git a/dst_dashboard/k8s/frontend.yaml b/dst_dashboard/k8s/frontend.yaml index ebf1fdcf..bf06c34f 100644 --- a/dst_dashboard/k8s/frontend.yaml +++ b/dst_dashboard/k8s/frontend.yaml @@ -1,3 +1,4 @@ +# Prod is deployed by Fleet from iftech/vaclab-2 (fleet/dst-dashboard); keep this copy in sync. apiVersion: apps/v1 kind: StatefulSet metadata: @@ -30,7 +31,7 @@ spec: effect: "PreferNoSchedule" containers: - name: frontend - image: mamoutoudiarra/dst-dashboard-frontend:v0.5 + image: mamoutoudiarra/dst-dashboard-frontend:v0.6 imagePullPolicy: IfNotPresent ports: - containerPort: 80 diff --git a/dst_dashboard/k8s/mongodb-dev.yaml b/dst_dashboard/k8s/mongodb-dev.yaml index d668d28d..24b9471b 100644 --- a/dst_dashboard/k8s/mongodb-dev.yaml +++ b/dst_dashboard/k8s/mongodb-dev.yaml @@ -75,7 +75,7 @@ metadata: name: mongodb-dev namespace: dst-dashboard spec: - type: LoadBalancer + type: ClusterIP selector: app: mongodb-dev ports: diff --git a/dst_dashboard/k8s/mongodb-prod.yaml b/dst_dashboard/k8s/mongodb-prod.yaml index 5c22dd37..0d986227 100644 --- a/dst_dashboard/k8s/mongodb-prod.yaml +++ b/dst_dashboard/k8s/mongodb-prod.yaml @@ -1,3 +1,4 @@ +# Prod is deployed by Fleet from iftech/vaclab-2 (fleet/dst-dashboard); keep this copy in sync. apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -53,12 +54,12 @@ spec: - name: MONGO_INITDB_ROOT_USERNAME valueFrom: secretKeyRef: - name: dst-mongo-prod-root-credentials + name: dst-mongo-prod-credentials key: username - name: MONGO_INITDB_ROOT_PASSWORD valueFrom: secretKeyRef: - name: dst-mongo-prod-root-credentials + name: dst-mongo-prod-credentials key: password volumeMounts: - name: mongo-data-prod From c8c2d2bb7980c8fdc00cb535945c2b8d6a69e10a Mon Sep 17 00:00:00 2001 From: radiken Date: Tue, 17 Nov 2026 11:23:37 +0000 Subject: [PATCH 2/2] Dashboard manifests: add the pods' app.kubernetes.io/name labels, note the Fleet branch The live backend and frontend pods (and Fleet's files) carry the label; kubectl diff did not show it missing. The dev files say they are applied by hand, and mongodb-dev names the Secret keys it needs. Co-Authored-By: Claude Opus 5.5 --- dst_dashboard/k8s/backend.yaml | 3 ++- dst_dashboard/k8s/frontend-dev.yaml | 1 + dst_dashboard/k8s/frontend.yaml | 3 ++- dst_dashboard/k8s/mongodb-dev.yaml | 1 + dst_dashboard/k8s/mongodb-prod.yaml | 2 +- 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dst_dashboard/k8s/backend.yaml b/dst_dashboard/k8s/backend.yaml index 4bf7fd08..07c0daab 100644 --- a/dst_dashboard/k8s/backend.yaml +++ b/dst_dashboard/k8s/backend.yaml @@ -1,4 +1,4 @@ -# Prod is deployed by Fleet from iftech/vaclab-2 (fleet/dst-dashboard); keep this copy in sync. +# Prod is deployed by Fleet from iftech/vaclab-2 (fleet/dst-dashboard, branch mamoutou/system_workload_migration); keep this copy in sync. apiVersion: v1 kind: ConfigMap metadata: @@ -34,6 +34,7 @@ spec: metadata: labels: app: dst-dashboard-backend + app.kubernetes.io/name: dst-dashboard-backend spec: affinity: nodeAffinity: diff --git a/dst_dashboard/k8s/frontend-dev.yaml b/dst_dashboard/k8s/frontend-dev.yaml index 3bf788d5..d1bba8ac 100644 --- a/dst_dashboard/k8s/frontend-dev.yaml +++ b/dst_dashboard/k8s/frontend-dev.yaml @@ -1,3 +1,4 @@ +# Not in Fleet; applied by hand. apiVersion: apps/v1 kind: StatefulSet metadata: diff --git a/dst_dashboard/k8s/frontend.yaml b/dst_dashboard/k8s/frontend.yaml index bf06c34f..926c3e26 100644 --- a/dst_dashboard/k8s/frontend.yaml +++ b/dst_dashboard/k8s/frontend.yaml @@ -1,4 +1,4 @@ -# Prod is deployed by Fleet from iftech/vaclab-2 (fleet/dst-dashboard); keep this copy in sync. +# Prod is deployed by Fleet from iftech/vaclab-2 (fleet/dst-dashboard, branch mamoutou/system_workload_migration); keep this copy in sync. apiVersion: apps/v1 kind: StatefulSet metadata: @@ -14,6 +14,7 @@ spec: metadata: labels: app: dst-dashboard-frontend + app.kubernetes.io/name: dst-dashboard-frontend spec: affinity: nodeAffinity: diff --git a/dst_dashboard/k8s/mongodb-dev.yaml b/dst_dashboard/k8s/mongodb-dev.yaml index 24b9471b..59985b5c 100644 --- a/dst_dashboard/k8s/mongodb-dev.yaml +++ b/dst_dashboard/k8s/mongodb-dev.yaml @@ -1,3 +1,4 @@ +# Not in Fleet; applied by hand. Needs the dst-mongo-dev-root-credentials Secret (keys username, password). apiVersion: v1 kind: PersistentVolumeClaim metadata: diff --git a/dst_dashboard/k8s/mongodb-prod.yaml b/dst_dashboard/k8s/mongodb-prod.yaml index 0d986227..c9babc12 100644 --- a/dst_dashboard/k8s/mongodb-prod.yaml +++ b/dst_dashboard/k8s/mongodb-prod.yaml @@ -1,4 +1,4 @@ -# Prod is deployed by Fleet from iftech/vaclab-2 (fleet/dst-dashboard); keep this copy in sync. +# Prod is deployed by Fleet from iftech/vaclab-2 (fleet/dst-dashboard, branch mamoutou/system_workload_migration); keep this copy in sync. apiVersion: v1 kind: PersistentVolumeClaim metadata: