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
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@
# domain). Each list is that tenant's own declared set from its
# deploy/httproute.yaml, covering the production hostname and the *.platform.lan
# name used on local/dev clusters where the tenant declares one. business-site
# declares its host in deploy/webapp.yaml and has one public staging name only;
# its production hostname stays on GitHub Pages until a separate cutover.
# declares its staging host in deploy/webapp.yaml and its public and portal
# names in deploy/http-route-public.yaml and http-route-portal.yaml
# (platform#6177). The apex and www keep their GitHub Pages DNS records until a
# separate cutover, so admitting them here changes no live traffic before it.
#
# Fail-closed for anything NOT listed: the final validation denies every HTTPRoute in a
# ksail tenant namespace that has no allow-list above, so a newly onboarded
Expand Down Expand Up @@ -119,11 +121,12 @@ spec:
- expression: >-
object.metadata.namespace != 'business-site' ||
(size(variables.hostnames) > 0 &&
variables.hostnames.all(h, h in ['business-site.platform.devantler.tech']))
variables.hostnames.all(h, h in ['business-site.platform.devantler.tech', 'devantler.tech', 'www.devantler.tech', 'portal.devantler.tech']))
message: >-
business-site HTTPRoutes must set spec.hostnames and may only use
business-site.platform.devantler.tech. Omitting hostnames claims every
hostname on the shared platform Gateway listener.
business-site.platform.devantler.tech, devantler.tech,
www.devantler.tech or portal.devantler.tech. Omitting hostnames claims
every hostname on the shared platform Gateway listener.
# Catch-all: any ksail tenant namespace without an allow-list above. This is
# what makes onboarding fail loudly instead of silently unrestricted, the
# exact gap that once left this policy covering only wedding-app while other
Expand Down
23 changes: 23 additions & 0 deletions k8s/providers/hetzner/apps/business-site/certificate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Platform-applied DNS-01 issuance for the names the business-site package
# routes: the public site (devantler.tech, www) and the portal. The shared
# Cloudflare ClusterIssuer already issues the zone's other names (see
# world-at-ruin/certificate.yaml); the Gateway listeners in
# infrastructure/patches/add-devantler-tech-listeners.yaml read this Secret
# through reference-grant.yaml. Issuance needs no listener and no DNS record,
# so it can complete before the apex and www leave GitHub Pages
# (devantler-tech/monorepo#3939).
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: devantler-tech
namespace: business-site
spec:
secretName: devantler-tech-tls
Comment thread
devantler marked this conversation as resolved.
Resolved
dnsNames:
- devantler.tech
- www.devantler.tech
- portal.devantler.tech
issuerRef:
group: cert-manager.io
kind: ClusterIssuer
name: letsencrypt-prod
2 changes: 2 additions & 0 deletions k8s/providers/hetzner/apps/business-site/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ resources:
- tenant.yaml
- cilium-network-policy-staging-hold.yaml
- cilium-network-policy-customer-identity-hold.yaml
- certificate.yaml
- reference-grant.yaml
18 changes: 18 additions & 0 deletions k8s/providers/hetzner/apps/business-site/reference-grant.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Lets the shared platform Gateway (kube-system) terminate TLS for the
# devantler.tech listeners with the platform-issued certificate.yaml Secret.
# Gateway API refuses a cross-namespace certificateRef without this grant
# (ResolvedRefs=False / RefNotPermitted). It names that one Secret only.
apiVersion: gateway.networking.k8s.io/v1beta1
kind: ReferenceGrant
metadata:
name: platform-gateway-devantler-tech-tls
namespace: business-site
spec:
from:
- group: gateway.networking.k8s.io
kind: Gateway
namespace: kube-system
to:
- group: ""
kind: Secret
name: devantler-tech-tls
9 changes: 5 additions & 4 deletions k8s/providers/hetzner/apps/business-site/tenant.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Public-only staging: the tenant reconciles its signed v3.0.0 package — the
# Public-only staging: the tenant reconciles its signed v3.2.2 package — the
# WebApp at business-site.platform.devantler.tech, its network policy, budget
# and disclosure input — while the platform-owned staging hold still denies
# gateway traffic. Portal identity, payments and devantler.tech stay off.
# gateway traffic. Portal identity and payments stay off, and devantler.tech
# keeps pointing at GitHub Pages until the DNS cutover.
apiVersion: kro.run/v1alpha1
kind: Tenant
metadata:
Expand All @@ -13,6 +14,6 @@ spec:
sops: false
webApp: true
source:
digest: sha256:7ec5b206635db783d8fd18789605a771cc772946f65339d3f0a2b4e08a14ebc6
publisherRevision: d8b5d0e9429cebf12907e0d4cb448433d3108e4b
digest: sha256:78401ed9c68e66427e826bb610d42c6c307ec67135b99be4ce956f21073baaa8
publisherRevision: af042c540ce8db4d64add98c34b5c57691e0e812
reconcileApplication: true
8 changes: 8 additions & 0 deletions k8s/providers/hetzner/infrastructure/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,14 @@ patches:
kind: Gateway
name: platform
namespace: kube-system
# Adds HTTPS listeners for the business-site public and portal names; see the
# file header.
- path: patches/add-devantler-tech-listeners.yaml
target:
group: gateway.networking.k8s.io
kind: Gateway
name: platform
namespace: kube-system
# Prod-only Coroot tuning: hcloud-backed persistent storage + Slack webhook
# wiring. The CR it patches comes from ../../../bases/infrastructure/coroot/
# (the `infrastructure` layer); the strategic-merge patch matches on the
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Serve the business-site package's public and portal names on the shared
# platform Gateway (platform#6177). SNI picks the most specific listener, so
# these terminate TLS with the names' own certificate while every other
# hostname keeps the hostname-less `https` listener and its ${domain} wildcard.
# JSON patch, not strategic merge: Gateway is a CRD, so a strategic-merge patch
# would replace the whole listeners list instead of appending.
#
# The section names are the ones the package's HTTPRoutes attach to
# (business-site deploy/http-route-public.yaml and http-route-portal.yaml).
# The certificateRefs point cross-namespace at the platform-issued
# business-site/devantler-tech-tls Secret (apps/business-site/certificate.yaml),
# which apps/business-site/reference-grant.yaml lets this Gateway read. Until the
# certificate issues, a listener stays ResolvedRefs=False while the Gateway
# stays Programmed, so it never gates reconciliation.
#
# external-dns creates portal.devantler.tech from its route. The apex and www
# keep their GitHub Pages records until the cutover hands them to external-dns
# (devantler-tech/monorepo#3939), because external-dns never overwrites a record
# it does not own.
#
# Each listener pins `allowedRoutes.kinds` to HTTPRoute, matching the base
# Gateway's listeners; see k8s/bases/infrastructure/gateway/gateway.yaml for why
# an unpinned HTTPS listener is a hostname-claiming gap.
- op: add
path: /spec/listeners/-
value:
name: https-devantler-tech
hostname: devantler.tech
port: 443
protocol: HTTPS
tls:
mode: Terminate
certificateRefs:
- kind: Secret
group: ""
namespace: business-site
name: devantler-tech-tls
allowedRoutes:
namespaces:
from: All
Comment thread
devantler marked this conversation as resolved.
Resolved
kinds:
- group: gateway.networking.k8s.io
kind: HTTPRoute
- op: add
path: /spec/listeners/-
value:
name: https-www-devantler-tech
hostname: www.devantler.tech
port: 443
protocol: HTTPS
tls:
mode: Terminate
certificateRefs:
- kind: Secret
group: ""
namespace: business-site
name: devantler-tech-tls
allowedRoutes:
namespaces:
from: All
kinds:
- group: gateway.networking.k8s.io
kind: HTTPRoute
- op: add
path: /spec/listeners/-
value:
name: https-portal-devantler-tech
hostname: portal.devantler.tech
port: 443
protocol: HTTPS
tls:
mode: Terminate
certificateRefs:
- kind: Secret
group: ""
namespace: business-site
name: devantler-tech-tls
allowedRoutes:
namespaces:
from: All
kinds:
- group: gateway.networking.k8s.io
kind: HTTPRoute
52 changes: 45 additions & 7 deletions scripts/canonical-tenant-source-bindings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"consumer": "business-site",
"consumerRepository": "devantler-tech/business-site",
"workflow": "publish-app",
"kind": "published-binding",
"kind": "published-upgrade",
"sourcePath": "k8s/providers/hetzner/apps/business-site/tenant.yaml",
"constructorSpecSha256": "f48b056756b6d49c9b3f741fd597b70ae7c195cadf1ba523a3fec63c1c336d8d",
"tenantIdentity": {
Expand All @@ -20,17 +20,55 @@
"namespace": "business-site",
"name": "business-site",
"artifactURL": "oci://ghcr.io/devantler-tech/business-site/manifests",
"digest": "sha256:7ec5b206635db783d8fd18789605a771cc772946f65339d3f0a2b4e08a14ebc6"
"digest": "sha256:78401ed9c68e66427e826bb610d42c6c307ec67135b99be4ce956f21073baaa8"
},
"publication": {
"gitTag": "v3.0.0",
"sourceSHA": "84d4cc47b800597f7683e22dad1c23cfa320434f",
"publisherIdentity": "devantler-tech/.github/.github/workflows/publish-app.yaml@d8b5d0e9429cebf12907e0d4cb448433d3108e4b",
"gitTag": "v3.2.2",
"sourceSHA": "6fdbbf6db9357c8754e55be2c737308378690d20",
"publisherIdentity": "devantler-tech/.github/.github/workflows/publish-app.yaml@af042c540ce8db4d64add98c34b5c57691e0e812",
"callerWorkflow": ".github/workflows/publish-runtime.yaml",
"event": "release",
"workflowRunId": 41631861843,
"workflowRunId": 43435792740,
"workflowRunAttempt": 1,
"verifiedOn": "2026-11-03"
"verifiedOn": "2026-11-13"
},
"previousBinding": {
"consumer": "business-site",
"consumerRepository": "devantler-tech/business-site",
"workflow": "publish-app",
"kind": "published-binding",
"sourcePath": "k8s/providers/hetzner/apps/business-site/tenant.yaml",
"constructorSpecSha256": "f48b056756b6d49c9b3f741fd597b70ae7c195cadf1ba523a3fec63c1c336d8d",
"tenantIdentity": {
"apiVersion": "kro.run/v1alpha1",
"kind": "Tenant",
"namespace": "flux-system",
"name": "business-site"
},
"sourceIdentity": {
"apiVersion": "source.toolkit.fluxcd.io/v1",
"kind": "OCIRepository",
"namespace": "business-site",
"name": "business-site",
"artifactURL": "oci://ghcr.io/devantler-tech/business-site/manifests",
"digest": "sha256:7ec5b206635db783d8fd18789605a771cc772946f65339d3f0a2b4e08a14ebc6"
},
"publication": {
"gitTag": "v3.0.0",
"sourceSHA": "84d4cc47b800597f7683e22dad1c23cfa320434f",
"publisherIdentity": "devantler-tech/.github/.github/workflows/publish-app.yaml@d8b5d0e9429cebf12907e0d4cb448433d3108e4b",
"callerWorkflow": ".github/workflows/publish-runtime.yaml",
"event": "release",
"workflowRunId": 41631861843,
"workflowRunAttempt": 1,
"verifiedOn": "2026-11-03"
}
},
"previousObservation": {
"uidSha256": "38aff5c8aafbd89fc51dbbe131d27c9a3fb0e78108a20779d0e7a5680a6cc2d2",
"generation": 3,
"snapshotSha256": "8b662b4f0b5ec50bd31eb3fbfc74eeb256288a2dbbae5f482d8f968eb6f2b33a",
"observedOn": "2026-11-13"
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion scripts/publish-workflow-canonical-approvals.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ aws publish-manifests devantler-tech/.github bd24a3e1bbbf6aba2d7afd58a2fd8a3d67b
.github publish-manifests devantler-tech/.github 2666baeaf1384d3c2d918e19692b8a6d9fb6fd78
ascoachingogvaner publish-app devantler-tech/.github 467f07582436a26b62cf4aa756423512f85ba0c0
ascoachingogvaner publish-app devantler-tech/.github af042c540ce8db4d64add98c34b5c57691e0e812
business-site publish-app devantler-tech/.github 467f07582436a26b62cf4aa756423512f85ba0c0
business-site publish-app devantler-tech/.github d8b5d0e9429cebf12907e0d4cb448433d3108e4b
business-site publish-app devantler-tech/.github af042c540ce8db4d64add98c34b5c57691e0e812
data-product-controller publish-app devantler-tech/.github 467f07582436a26b62cf4aa756423512f85ba0c0
wedding-app publish-app devantler-tech/.github 467f07582436a26b62cf4aa756423512f85ba0c0
wedding-app publish-app devantler-tech/.github af042c540ce8db4d64add98c34b5c57691e0e812
2 changes: 1 addition & 1 deletion scripts/rgd-template-static-scan-baseline.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@
1 k8s/bases/infrastructure/resource-graph-definitions/webapp/resource-graph-definition.yaml.resources/service.yaml KSV-0040 LOW CAUSE-SHA256:79c2597bf128e3ca530288250548c211e5e43a66a10d3c88748c6db4ac565920
1 k8s/providers/docker/apps/tenant-ascoachingogvaner.yaml INSTANCE-CONTENT SHA256 7e65481a62deb24c89dca2e5f83969e308e7604e770d97edb15e86ecc948f22c
1 k8s/providers/docker/apps/web-app-wedding-app.yaml INSTANCE-CONTENT SHA256 3d42027c7e549014cad1e717876a6eb72e0a6641f3bf181f7a0e1a70d94306d6
1 k8s/providers/hetzner/apps/business-site/tenant.yaml INSTANCE-CONTENT SHA256 f41cf288531722e872f273a55d0ed3d8827c642f49d37341f9e7f4a88fd75d45
1 k8s/providers/hetzner/apps/business-site/tenant.yaml INSTANCE-CONTENT SHA256 b9c7d9964a40b82db85da1784fbd8b0baf6f5e36f7de2c41f0a3c323e2c2fb46
6 changes: 3 additions & 3 deletions scripts/tests/test-bootstrap-tenant-source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ echo 'bootstrap requires complete inventory and a verified immutable publication
biz_work="$test_work/business"
mkdir -p "$biz_work/bin"
export BIZ_WORK="$biz_work"
export BIZ_SIGNER=467f07582436a26b62cf4aa756423512f85ba0c0
export BIZ_SIGNER=af042c540ce8db4d64add98c34b5c57691e0e812
for approval in publish-workflow-approved-revisions.tsv publish-workflow-approved-revisions.identities.tsv \
publish-workflow-canonical-approvals.tsv publish-workflow-bootstrap-publications.json; do
cp "$test_repo_root/scripts/$approval" "$biz_work/before-$approval"
Expand Down Expand Up @@ -320,7 +320,7 @@ jq -e 'keys == ["callerWorkflow","consumer","deploymentAuthorized","digest","eve
.deploymentAuthorized==false and .gitTag=="v1.0.2" and
.sourceSHA=="e5eb256dcb5dbf3857257e9072937ab95f1ea6c3" and
.digest=="sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" and
.publisherIdentity=="devantler-tech/.github/.github/workflows/publish-app.yaml@467f07582436a26b62cf4aa756423512f85ba0c0" and
.publisherIdentity=="devantler-tech/.github/.github/workflows/publish-app.yaml@af042c540ce8db4d64add98c34b5c57691e0e812" and
.callerWorkflow==".github/workflows/publish-runtime.yaml" and .event=="release" and
.workflowRunId==39869859801 and .workflowRunAttempt==1' "$biz_work/receipt.json" >/dev/null
if read_bound_publications "$test_repo_root" "$biz_work/receipt.json" >/dev/null 2>&1; then
Expand Down Expand Up @@ -365,7 +365,7 @@ for BIZ_SIGNER in f5d078cc4b04ecb15432ed4e34cba1142a6279d4 111111111111111111111
fi
test ! -s "$biz_work/refusal"
done
BIZ_SIGNER=467f07582436a26b62cf4aa756423512f85ba0c0
BIZ_SIGNER=af042c540ce8db4d64add98c34b5c57691e0e812
for BIZ_CASE in wrong-event wrong-caller wrong-source wrong-tag wrong-product wrong-publisher duplicate-publisher \
malformed-list trailing-list incomplete-list run-read-failure tag-read-failure wrong-caller-pin multi-document-caller \
signature-failure malformed-signature trailing-signature wrong-digest wrong-reference changed-attempt moved-tag withdrawn-release \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ while IFS=$'\t' read -r family passed denied skipped; do
done <<'CASES'
restrict-tenant-secret-stores 5 7 0
restrict-tenant-issuer-refs 4 3 0
restrict-tenant-route-hostnames 4 17 0
restrict-tenant-route-hostnames 6 18 0
restrict-tenant-network-policies 19 80 1
restrict-tenant-image-repositories 7 11 0
CASES
Expand Down
2 changes: 1 addition & 1 deletion scripts/validate-eks-ci-role-policy/approved-surface.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ iam.aws.m.upbound.io/v1beta1|Role|aws|ses-account-setup 7faa58457f4a17a3c14368d3

kro.run/v1alpha1|ResourceGraphDefinition||tenant.kro.run 72f3f972cecdf3ca2e315deb4224bd28c1df1244fc7973a88eb7f4fc03ac1d05

kro.run/v1alpha1|Tenant|flux-system|business-site 47380ca8c8781c2de6b17226e44ac7cef030e13a89c8b41dae9ddf459304b3a4
kro.run/v1alpha1|Tenant|flux-system|business-site e399acf3fa79ab13dfed2c6efe02840d963e97584bbdf29a85d247784348f6bb

kustomize.toolkit.fluxcd.io/v1|Kustomization|ascoachingogvaner|ascoachingogvaner ac00ca29c04de8d2c30a045d583570536a97fc305a1b06c4300da018ecdfb864

Expand Down
7 changes: 5 additions & 2 deletions tests/restrict-tenant-route-hostnames/kyverno-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,18 @@ results:
- ascoachingogvaner/approved-plus-wildcard
kind: HTTPRoute
result: fail
# --- business-site: one public staging hostname ---
# --- business-site: the staging, public and portal hostnames ---
- policy: restrict-tenant-route-hostnames
resources:
- business-site/approved-staging-hostname
- business-site/approved-public-hostnames
- business-site/approved-portal-hostname
kind: HTTPRoute
result: pass
- policy: restrict-tenant-route-hostnames
resources:
- business-site/production-hostname
- business-site/unlisted-devantler-subdomain
- business-site/devantler-wildcard
- business-site/steals-wedding-hostname
- business-site/no-hostnames
- business-site/wildcard-covering-approved
Expand Down
Loading
Loading