Files
mg4/k8s/kustomization.yaml
nilsandClaude Opus 5.5 84fb3aac21 k8s: work with kubectl apply -f as well as -k
- The secrets template moves to k8s/secrets/, and the filled-in copy to
  k8s/secrets/secrets.yaml (gitignored). `kubectl apply -f k8s/` does
  not recurse, so neither the placeholder template nor the real secrets
  can be applied by accident.
- The server image digest is pinned in server.yaml instead of through
  kustomize's images override, which `-f` ignores (it would have pulled
  a nonexistent :latest).
- README and kustomization.yaml say to use `-k`: plain `-f` never
  creates the generated Grafana ConfigMaps.
- The IngressRoutes drop `tls: {}`, like the other routes on this
  Traefik: TLS is configured on the websecure entrypoint.

Manifests validated both ways (14 resources rendered with kustomize,
11 as plain files — the difference is the Grafana ConfigMaps).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QLJfZQZeAKAwSqViTmLzki
2026-10-17 21:36:17 +02:00

29 lines
819 B
YAML

# Apply with `kubectl apply -k k8s/` — not `-f k8s/`, which skips the Grafana ConfigMaps below.
# The Secrets are not included: create them from secrets/secrets.example.yaml first.
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- namespace.yaml
- influxdb.yaml
- server.yaml
- grafana.yaml
- ingress.yaml
generatorOptions:
labels:
app.kubernetes.io/part-of: mg4
configMapGenerator:
- name: grafana-datasources
namespace: mg4
files:
- mg4.yaml=grafana/datasources.yaml
- name: grafana-dashboard-provider
namespace: mg4
files:
- mg4.yaml=grafana/dashboards.yaml
- name: grafana-dashboards
namespace: mg4
files:
- grafana/dashboards/live.json
- grafana/dashboards/consumption.json
- grafana/dashboards/charging.json