Skip to content

Commit 3c0ea33

Browse files
committed
fixes
1 parent 36402b3 commit 3c0ea33

3 files changed

Lines changed: 30 additions & 2 deletions

File tree

CLAUDE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ docs/ # Documentation
8787
- Use directory structure for application discovery (no manual Application resources)
8888
- Name Service ports for HTTPRoute compatibility (`name: http`) — **fails silently without this**
8989
- Use Gateway API (not Ingress) — this cluster uses Gateway API exclusively
90+
- On **external** HTTPRoutes: add `labels: external-dns: "true"`, annotation `external-dns.alpha.kubernetes.io/target: vanillax.me`, and `sectionName: https` on the parentRef — **all three are required or DNS/routing silently fails**
9091
- Follow GitOps workflow for all changes
9192
- Store secrets in 1Password, reference via ExternalSecret
9293
- Add `backup: "hourly"` or `backup: "daily"` labels to critical PVCs for automatic Kyverno backup
@@ -117,6 +118,7 @@ docs/ # Documentation
117118
- Use `mutateExistingOnPolicyUpdate: true` on Kyverno generate policies — **re-evaluates ALL matching resources cluster-wide on any policy change**
118119
- Use `synchronize: true` on Kyverno generate policies — **drift watchers create UpdateRequests on every controller status update, hammering the API server; use `synchronize: false`**
119120
- Omit Kyverno canonical defaults (`emitWarning`, `validationFailureAction`, `skipBackgroundRequests`) from policy YAML — **Kyverno webhook adds them, ArgoCD detects the diff, app shows OutOfSync**
121+
- Create external HTTPRoutes without the three required pieces: `external-dns: "true"` label, `external-dns.alpha.kubernetes.io/target: vanillax.me` annotation, and `sectionName: https`**DNS won't be created and Cloudflare tunnel routing fails silently**
120122

121123
## Nested CLAUDE.md Files
122124

my-apps/CLAUDE.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,23 +45,46 @@ spec:
4545
port: 8080
4646
targetPort: 8080
4747

48-
# httproute.yaml
49-
apiVersion: gateway.networking.k8s.io/v1beta1
48+
# httproute.yaml - EXTERNAL (public via Cloudflare tunnel)
49+
apiVersion: gateway.networking.k8s.io/v1
5050
kind: HTTPRoute
5151
metadata:
5252
name: app-route
5353
namespace: app-name
54+
labels:
55+
external-dns: "true" # REQUIRED - external-dns won't create DNS without this
56+
annotations:
57+
external-dns.alpha.kubernetes.io/target: vanillax.me # REQUIRED - CNAMEs to Cloudflare tunnel
5458
spec:
5559
parentRefs:
5660
- kind: Gateway
5761
name: gateway-external
5862
namespace: gateway
63+
sectionName: https # REQUIRED - must bind to HTTPS listener, not just the gateway
5964
hostnames:
6065
- app.vanillax.me
6166
rules:
6267
- backendRefs:
6368
- name: app-service
6469
port: 8080
70+
71+
# httproute.yaml - INTERNAL (local network only, no Cloudflare)
72+
# apiVersion: gateway.networking.k8s.io/v1
73+
# kind: HTTPRoute
74+
# metadata:
75+
# name: app-route
76+
# namespace: app-name
77+
# spec:
78+
# parentRefs:
79+
# - kind: Gateway
80+
# name: gateway-internal
81+
# namespace: gateway
82+
# hostnames:
83+
# - app.vanillax.me
84+
# rules:
85+
# - backendRefs:
86+
# - name: app-service
87+
# port: 8080
6588
```
6689

6790
### Application with Secrets (1Password)

my-apps/development/news-reader/httproute.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,15 @@ metadata:
55
namespace: news-reader
66
labels:
77
external-dns: "true"
8+
annotations:
9+
external-dns.alpha.kubernetes.io/target: vanillax.me
810
spec:
911
parentRefs:
1012
- group: gateway.networking.k8s.io
1113
kind: Gateway
1214
name: gateway-external
1315
namespace: gateway
16+
sectionName: https
1417
hostnames:
1518
- "news.vanillax.me"
1619
rules:

0 commit comments

Comments
 (0)