Compare commits
22 Commits
codex/l4-w
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6b2e6a61d0 | ||
|
|
503685d0f5 | ||
|
|
05f37df5d2 | ||
|
|
f3afa64c5d | ||
|
|
b4a1cb63f0 | ||
|
|
d95aa453ea | ||
|
|
0bbba2739c | ||
|
|
99f49c1b75 | ||
|
|
14a0e87513 | ||
|
|
d2e8b5f4a8 | ||
|
|
861ed42e2c | ||
|
|
605073c299 | ||
|
|
346b287a3d | ||
|
|
6bd02f5781 | ||
|
|
2a2b416d12 | ||
|
|
d3ae09865a | ||
|
|
637a8ffd69 | ||
|
|
6ab232761d | ||
|
|
bfe42cf44e | ||
|
|
bf96f7b9a2 | ||
|
|
8be054f99a | ||
|
|
6abb2d6408 |
@@ -125,7 +125,7 @@ spec:
|
|||||||
fsGroupChangePolicy: OnRootMismatch
|
fsGroupChangePolicy: OnRootMismatch
|
||||||
containers:
|
containers:
|
||||||
- name: chat-web
|
- name: chat-web
|
||||||
image: localhost/fc-chat-web:v20260603-oidc-authentik
|
image: localhost/fc-chat-web:v20260612-c8-059e9ce
|
||||||
imagePullPolicy: Never
|
imagePullPolicy: Never
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
|
|||||||
@@ -10,8 +10,8 @@
|
|||||||
# Phase 1 production uses a Longhorn RWO PVC at /data/devicemgmt.db. The
|
# Phase 1 production uses a Longhorn RWO PVC at /data/devicemgmt.db. The
|
||||||
# 1Password runtime item stays mounted through env for future MySQL/API-key
|
# 1Password runtime item stays mounted through env for future MySQL/API-key
|
||||||
# cutover, but MySQL is not required for this first product-host rollout.
|
# cutover, but MySQL is not required for this first product-host rollout.
|
||||||
# Image v20260611-healthz is built from FlowerCore.DeviceManagement master
|
# Image v20260613-g2-66a43c1 is built from FlowerCore.DeviceManagement master
|
||||||
# 3c15f3b, which adds the /healthz alias required by fleet monitoring.
|
# 66a43c1, carrying edge enrollment network completion and SQLite-safe trust-bundle smoke coverage.
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
@@ -52,6 +52,11 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
revisionHistoryLimit: 3
|
revisionHistoryLimit: 3
|
||||||
|
strategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
rollingUpdate:
|
||||||
|
maxSurge: 0
|
||||||
|
maxUnavailable: 1
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: fc-devicemgmt-web
|
app: fc-devicemgmt-web
|
||||||
@@ -78,7 +83,7 @@ spec:
|
|||||||
fsGroupChangePolicy: OnRootMismatch
|
fsGroupChangePolicy: OnRootMismatch
|
||||||
containers:
|
containers:
|
||||||
- name: web
|
- name: web
|
||||||
image: localhost/fc-devicemgmt-web:v20260611-healthz
|
image: localhost/fc-devicemgmt-web:v20260613-g3-6555c0d
|
||||||
imagePullPolicy: Never
|
imagePullPolicy: Never
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ spec:
|
|||||||
fsGroup: 1654
|
fsGroup: 1654
|
||||||
containers:
|
containers:
|
||||||
- name: dns-web
|
- name: dns-web
|
||||||
image: localhost/fc-dns-web:v20260612-l4dns-a5d2849
|
image: localhost/fc-dns-web:v20260613-g5-quota-aa99bd1
|
||||||
imagePullPolicy: Never
|
imagePullPolicy: Never
|
||||||
securityContext:
|
securityContext:
|
||||||
readOnlyRootFilesystem: true
|
readOnlyRootFilesystem: true
|
||||||
@@ -303,7 +303,7 @@ spec:
|
|||||||
fsGroup: 1654
|
fsGroup: 1654
|
||||||
containers:
|
containers:
|
||||||
- name: dns-acme-webhook
|
- name: dns-acme-webhook
|
||||||
image: localhost/fc-dns-acme-webhook:v20260612-l4dns-a5d2849
|
image: localhost/fc-dns-acme-webhook:v20260613-g5-quota-aa99bd1
|
||||||
imagePullPolicy: Never
|
imagePullPolicy: Never
|
||||||
securityContext:
|
securityContext:
|
||||||
readOnlyRootFilesystem: true
|
readOnlyRootFilesystem: true
|
||||||
|
|||||||
33
apps/fc-network/certificate-web.yaml
Normal file
33
apps/fc-network/certificate-web.yaml
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
# Certificate for network.iamworkin.lan.
|
||||||
|
#
|
||||||
|
# Preflight gate: network.iamworkin.lan must resolve to 10.0.56.200 before this
|
||||||
|
# Certificate is synced. step-ca ACME cannot see the CoreDNS wildcard
|
||||||
|
# (*.iamworkin.lan -> 10.0.56.200) — it does an HTTP-01 challenge against the
|
||||||
|
# resolved host. The CoreDNS wildcard template covers network.iamworkin.lan, so
|
||||||
|
# resolution exists fleet-wide; do NOT add a pfSense DNS override (this plane is
|
||||||
|
# read-only and holds no pfSense creds). If ACME backs off, confirm the wildcard
|
||||||
|
# resolves first (feedback_pfsense_dns_required_for_acme).
|
||||||
|
apiVersion: cert-manager.io/v1
|
||||||
|
kind: Certificate
|
||||||
|
metadata:
|
||||||
|
name: fc-network-web-tls
|
||||||
|
namespace: fc-network
|
||||||
|
labels:
|
||||||
|
app: fc-network-web
|
||||||
|
app.kubernetes.io/name: fc-network-web
|
||||||
|
app.kubernetes.io/component: web
|
||||||
|
app.kubernetes.io/part-of: flowercore
|
||||||
|
app.kubernetes.io/managed-by: argocd
|
||||||
|
flowercore.io/tenant-id: system
|
||||||
|
flowercore.io/created-by: bluejay-infra
|
||||||
|
annotations:
|
||||||
|
flowercore.io/dns-preflight: "network.iamworkin.lan must resolve to 10.0.56.200 (CoreDNS wildcard) before ACME sync"
|
||||||
|
spec:
|
||||||
|
secretName: fc-network-web-tls
|
||||||
|
issuerRef:
|
||||||
|
name: step-ca-acme
|
||||||
|
kind: ClusterIssuer
|
||||||
|
dnsNames:
|
||||||
|
- network.iamworkin.lan
|
||||||
|
duration: 720h
|
||||||
|
renewBefore: 240h
|
||||||
145
apps/fc-network/deployment-web.yaml
Normal file
145
apps/fc-network/deployment-web.yaml
Normal file
@@ -0,0 +1,145 @@
|
|||||||
|
# FlowerCore.Network.Web — the pfSense automation plane (read-only Phase 0, ADR-189).
|
||||||
|
#
|
||||||
|
# Phase 0 is READ-ONLY: the service holds NO pfSense credentials and has no write
|
||||||
|
# path to pfSense anywhere. The only mutating endpoint is POST /api/v1/snapshots,
|
||||||
|
# which ingests a config.xml the noc1 exporter collected READ-ONLY and stores it
|
||||||
|
# (redacted projection) on the PVC. Auth ships gate-OFF.
|
||||||
|
#
|
||||||
|
# Image localhost/fc-network-web:<tag> is built by FlowerCore.Network
|
||||||
|
# scripts/deploy-k8s.sh and imported to all schedulable RKE2 nodes (rke2-server +
|
||||||
|
# rke2-agent1; agent2 retired). imagePullPolicy: Never — bump the tag here, sync
|
||||||
|
# ArgoCD, then scale 0->1 for the RWO PVC and verify the running pod imageID.
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: fc-network-web
|
||||||
|
namespace: fc-network
|
||||||
|
labels:
|
||||||
|
app: fc-network-web
|
||||||
|
app.kubernetes.io/name: fc-network-web
|
||||||
|
app.kubernetes.io/component: web
|
||||||
|
app.kubernetes.io/part-of: flowercore
|
||||||
|
app.kubernetes.io/managed-by: argocd
|
||||||
|
flowercore.io/tenant-id: system
|
||||||
|
flowercore.io/created-by: bluejay-infra
|
||||||
|
annotations:
|
||||||
|
flowercore.io/traceability-standard: k8s-pod-ownership-and-traceability-standard
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
revisionHistoryLimit: 3
|
||||||
|
# RWO PVC: a single replica can't be surged (the new pod can't mount the volume
|
||||||
|
# while the old one holds it). maxSurge 0 / maxUnavailable 1 is the rwo-safe shape;
|
||||||
|
# for image bumps scale 0->1 rather than rollout restart.
|
||||||
|
strategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
rollingUpdate:
|
||||||
|
maxSurge: 0
|
||||||
|
maxUnavailable: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: fc-network-web
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: fc-network-web
|
||||||
|
app.kubernetes.io/name: fc-network-web
|
||||||
|
app.kubernetes.io/component: web
|
||||||
|
app.kubernetes.io/part-of: flowercore
|
||||||
|
app.kubernetes.io/managed-by: argocd
|
||||||
|
flowercore.io/tenant-id: system
|
||||||
|
flowercore.io/created-by: bluejay-infra
|
||||||
|
annotations:
|
||||||
|
fc.flowercore.io/healthz-anon: "true"
|
||||||
|
fc.flowercore.io/probe-path: "/healthz"
|
||||||
|
prometheus.io/scrape: "true"
|
||||||
|
prometheus.io/port: "5340"
|
||||||
|
prometheus.io/path: "/metrics/prometheus"
|
||||||
|
flowercore.io/audit-trace-id: "runtime-activity-trace"
|
||||||
|
spec:
|
||||||
|
securityContext:
|
||||||
|
fsGroup: 1654
|
||||||
|
fsGroupChangePolicy: OnRootMismatch
|
||||||
|
containers:
|
||||||
|
- name: web
|
||||||
|
image: localhost/fc-network-web:v20260612-0b5b049
|
||||||
|
imagePullPolicy: Never
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 5340
|
||||||
|
# fc-safe-to-expose: read-only plane, auth gate-OFF; X-Forwarded-Proto handled
|
||||||
|
# by AddFlowerCoreWebAuth (ADR-178) before any future public/OIDC flip.
|
||||||
|
env:
|
||||||
|
- name: ASPNETCORE_URLS
|
||||||
|
value: "http://+:5340"
|
||||||
|
- name: ASPNETCORE_ENVIRONMENT
|
||||||
|
value: "Production"
|
||||||
|
- name: DOTNET_SYSTEM_GLOBALIZATION_INVARIANT
|
||||||
|
value: "false"
|
||||||
|
- name: HOME
|
||||||
|
value: "/data"
|
||||||
|
- name: FlowerCore__Auth__Enabled
|
||||||
|
value: "false"
|
||||||
|
- name: FlowerCore__Database__Provider
|
||||||
|
value: "Sqlite"
|
||||||
|
- name: FlowerCore__Database__ConnectionStrings__Sqlite
|
||||||
|
value: "Data Source=/data/network.db"
|
||||||
|
# Snapshot store + intended-model paths MUST be absolute on the PVC —
|
||||||
|
# the default is relative to the read-only content root.
|
||||||
|
- name: FlowerCore__Network__SnapshotStore__RootDirectory
|
||||||
|
value: "/data/snapshots"
|
||||||
|
- name: FlowerCore__Network__SnapshotStore__UseGitHistory
|
||||||
|
value: "true"
|
||||||
|
- name: FlowerCore__Network__IntendedModel__FilePath
|
||||||
|
value: "/data/intended.json"
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 50m
|
||||||
|
memory: 128Mi
|
||||||
|
limits:
|
||||||
|
cpu: 500m
|
||||||
|
memory: 512Mi
|
||||||
|
startupProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /healthz
|
||||||
|
port: 5340
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 5
|
||||||
|
failureThreshold: 30
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /healthz
|
||||||
|
port: 5340
|
||||||
|
periodSeconds: 10
|
||||||
|
failureThreshold: 3
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /healthz
|
||||||
|
port: 5340
|
||||||
|
initialDelaySeconds: 30
|
||||||
|
periodSeconds: 30
|
||||||
|
failureThreshold: 3
|
||||||
|
securityContext:
|
||||||
|
runAsNonRoot: true
|
||||||
|
runAsUser: 1654
|
||||||
|
runAsGroup: 1654
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
readOnlyRootFilesystem: true
|
||||||
|
capabilities:
|
||||||
|
drop:
|
||||||
|
- ALL
|
||||||
|
volumeMounts:
|
||||||
|
- name: data
|
||||||
|
mountPath: /data
|
||||||
|
- name: tmp
|
||||||
|
mountPath: /tmp
|
||||||
|
- name: logs
|
||||||
|
mountPath: /app/logs
|
||||||
|
volumes:
|
||||||
|
- name: data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: fc-network-web-data
|
||||||
|
- name: tmp
|
||||||
|
emptyDir: {}
|
||||||
|
- name: logs
|
||||||
|
emptyDir: {}
|
||||||
32
apps/fc-network/ingressroute-web.yaml
Normal file
32
apps/fc-network/ingressroute-web.yaml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
# LAN ingress for FlowerCore.Network Web (network.iamworkin.lan).
|
||||||
|
#
|
||||||
|
# RKE2 Traefik has no built-in ACME resolver; TLS certificate ownership stays in
|
||||||
|
# cert-manager Certificate/fc-network-web-tls. Phase 0 is read-only but the POST
|
||||||
|
# ingest endpoint is genuinely needed by the noc1 exporter, so this route allows
|
||||||
|
# all methods (no GET/HEAD-only restriction like fc-dns) — the service itself has
|
||||||
|
# NO pfSense write path, so allowing POST here only reaches the local snapshot
|
||||||
|
# ingest.
|
||||||
|
apiVersion: traefik.io/v1alpha1
|
||||||
|
kind: IngressRoute
|
||||||
|
metadata:
|
||||||
|
name: fc-network-web
|
||||||
|
namespace: fc-network
|
||||||
|
labels:
|
||||||
|
app: fc-network-web
|
||||||
|
app.kubernetes.io/name: fc-network-web
|
||||||
|
app.kubernetes.io/component: web
|
||||||
|
app.kubernetes.io/part-of: flowercore
|
||||||
|
app.kubernetes.io/managed-by: argocd
|
||||||
|
flowercore.io/tenant-id: system
|
||||||
|
flowercore.io/created-by: bluejay-infra
|
||||||
|
spec:
|
||||||
|
entryPoints:
|
||||||
|
- websecure
|
||||||
|
routes:
|
||||||
|
- match: Host(`network.iamworkin.lan`)
|
||||||
|
kind: Rule
|
||||||
|
services:
|
||||||
|
- name: fc-network-web
|
||||||
|
port: 80
|
||||||
|
tls:
|
||||||
|
secretName: fc-network-web-tls
|
||||||
11
apps/fc-network/kustomization.yaml
Normal file
11
apps/fc-network/kustomization.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# ArgoCD's bluejay-infra ApplicationSet discovers apps/* directories on main.
|
||||||
|
# The kustomization is included for local previews and single-app validation.
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- namespace.yaml
|
||||||
|
- pvc.yaml
|
||||||
|
- deployment-web.yaml
|
||||||
|
- service-web.yaml
|
||||||
|
- certificate-web.yaml
|
||||||
|
- ingressroute-web.yaml
|
||||||
8
apps/fc-network/namespace.yaml
Normal file
8
apps/fc-network/namespace.yaml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: fc-network
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/part-of: flowercore
|
||||||
|
flowercore.io/tenant-id: system
|
||||||
|
flowercore.io/created-by: bluejay-infra
|
||||||
27
apps/fc-network/pvc.yaml
Normal file
27
apps/fc-network/pvc.yaml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
# Persistent store for FlowerCore.Network (read-only pfSense automation plane).
|
||||||
|
#
|
||||||
|
# Holds the SQLite snapshot INDEX db (network.db) AND the on-box snapshot store
|
||||||
|
# (data/snapshots): full-fidelity raw config.xml + redacted inventory sidecars +
|
||||||
|
# an on-box git history. Full-fidelity config is on-box ONLY (this PVC); the
|
||||||
|
# service DB / REST / MCP / UI only ever surface the REDACTED projection.
|
||||||
|
# RWO — single replica, scale 0->1 for updates (never rollout restart).
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: fc-network-web-data
|
||||||
|
namespace: fc-network
|
||||||
|
labels:
|
||||||
|
app: fc-network-web
|
||||||
|
app.kubernetes.io/name: fc-network-web
|
||||||
|
app.kubernetes.io/component: web
|
||||||
|
app.kubernetes.io/part-of: flowercore
|
||||||
|
app.kubernetes.io/managed-by: argocd
|
||||||
|
flowercore.io/tenant-id: system
|
||||||
|
flowercore.io/created-by: bluejay-infra
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
storageClassName: longhorn
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 2Gi
|
||||||
21
apps/fc-network/service-web.yaml
Normal file
21
apps/fc-network/service-web.yaml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: fc-network-web
|
||||||
|
namespace: fc-network
|
||||||
|
labels:
|
||||||
|
app: fc-network-web
|
||||||
|
app.kubernetes.io/name: fc-network-web
|
||||||
|
app.kubernetes.io/component: web
|
||||||
|
app.kubernetes.io/part-of: flowercore
|
||||||
|
app.kubernetes.io/managed-by: argocd
|
||||||
|
flowercore.io/tenant-id: system
|
||||||
|
flowercore.io/created-by: bluejay-infra
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: fc-network-web
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 80
|
||||||
|
targetPort: 5340
|
||||||
|
type: ClusterIP
|
||||||
@@ -535,7 +535,7 @@ spec:
|
|||||||
fsGroupChangePolicy: OnRootMismatch
|
fsGroupChangePolicy: OnRootMismatch
|
||||||
containers:
|
containers:
|
||||||
- name: web
|
- name: web
|
||||||
image: localhost/fc-ttsreader-web:v20260612-readalong-corrections
|
image: localhost/fc-ttsreader-web:v20260613-e4-conformance-2019a5e
|
||||||
imagePullPolicy: Never
|
imagePullPolicy: Never
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 5217
|
- containerPort: 5217
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ spec:
|
|||||||
containers:
|
containers:
|
||||||
- name: web
|
- name: web
|
||||||
# Bump tag for each rebuild. Initial deploy: v202605062048
|
# Bump tag for each rebuild. Initial deploy: v202605062048
|
||||||
image: localhost/fc-worldbuilder:v202606121657-35aaa2c-gpu
|
image: localhost/fc-worldbuilder:v20260613-e4-about-edd6efc
|
||||||
imagePullPolicy: Never
|
imagePullPolicy: Never
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
|
|||||||
@@ -927,7 +927,7 @@ public sealed class FleetManifestLintTests
|
|||||||
var dnsPvc = AppDocuments("fc-dns")
|
var dnsPvc = AppDocuments("fc-dns")
|
||||||
.Single(document => document.Kind == "PersistentVolumeClaim" && document.Name == "dns-web-data");
|
.Single(document => document.Kind == "PersistentVolumeClaim" && document.Name == "dns-web-data");
|
||||||
|
|
||||||
ManifestNodeExtensions.Scalar(dnsContainer, "image").Should().Be("localhost/fc-dns-web:v20260612-l4dns-a5d2849");
|
ManifestNodeExtensions.Scalar(dnsContainer, "image").Should().Be("localhost/fc-dns-web:v20260613-g5-quota-aa99bd1");
|
||||||
dnsPvc.Scalar("spec", "storageClassName").Should().Be("longhorn");
|
dnsPvc.Scalar("spec", "storageClassName").Should().Be("longhorn");
|
||||||
dnsPvc.Scalar("spec", "resources", "requests", "storage").Should().Be("1Gi");
|
dnsPvc.Scalar("spec", "resources", "requests", "storage").Should().Be("1Gi");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user