Fix default ingress.
This commit is contained in:
@@ -645,19 +645,47 @@ This means individual resources can use simple, component-specific selectors lik
|
||||
|
||||
Resource files in this repository are **templates** that get compiled when users add apps via the web app, CLI, or API. Only variables defined in the manifest file's 'defaultConfig' section are available to the resource templates. Use gomplate syntax to reference configuration:
|
||||
|
||||
### External DNS
|
||||
### Ingress
|
||||
|
||||
Ingress resources should include external-dns annotations for automatic DNS management:
|
||||
Use this as the standard ingress template for all apps:
|
||||
|
||||
```yaml
|
||||
annotations:
|
||||
external-dns.alpha.kubernetes.io/target: {{ .domain }}
|
||||
external-dns.alpha.kubernetes.io/cloudflare-proxied: "false"
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: myapp
|
||||
annotations:
|
||||
external-dns.alpha.kubernetes.io/target: {{ .externalDnsDomain }}
|
||||
external-dns.alpha.kubernetes.io/cloudflare-proxied: "false"
|
||||
external-dns.alpha.kubernetes.io/ttl: "60"
|
||||
spec:
|
||||
ingressClassName: traefik
|
||||
rules:
|
||||
- host: {{ .domain }}
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: myapp
|
||||
port:
|
||||
number: 80
|
||||
tls:
|
||||
- hosts:
|
||||
- {{ .domain }}
|
||||
secretName: {{ .tlsSecretName }}
|
||||
```
|
||||
|
||||
Note: 'domain' must be defined in the app manifest's 'defaultConfig' section.
|
||||
**Rules:**
|
||||
- Always use `spec.ingressClassName: traefik` — do NOT use the `kubernetes.io/ingress.class` annotation (deprecated)
|
||||
- Do NOT add `cert-manager.io/cluster-issuer` — the wildcard TLS cert is pre-distributed to app namespaces and managed centrally; adding this annotation causes cert-manager to issue a wrong per-app cert that overwrites the wildcard secret
|
||||
- Do NOT add Traefik redirect annotations — HTTPS redirect is handled globally by Traefik
|
||||
- `externalDnsDomain`, `domain`, and `tlsSecretName` must be defined in `defaultConfig`
|
||||
|
||||
This creates a CNAME from the app subdomain to the cluster domain (e.g., `myapp.cloud.example.com` → `cloud.example.com`).
|
||||
### External DNS
|
||||
|
||||
The `external-dns.alpha.kubernetes.io/target` annotation creates a CNAME from the app subdomain to the cluster domain (e.g., `myapp.cloud.example.com` → `cloud.example.com`). Always set `cloudflare-proxied: "false"` since Wild Cloud manages its own TLS.
|
||||
|
||||
## App Dependencies and Reference Mapping
|
||||
|
||||
|
||||
Reference in New Issue
Block a user