apiVersion: v1 kind: ConfigMap metadata: name: knoe-svc-kong-config annotations: argocd.argoproj.io/sync-wave: "0" data: kong.yml: | _format_version: "3.0" _transform: true services: # Root-path redirect: bare https://svc.knoe.dev/ -> /grafana so users # land somewhere useful instead of getting Kong's "no Route matched" # error. Other unmatched paths (typos, probes) still return that error # by design — surfacing 404s is better than silently swallowing them. - name: root-redirect url: http://knoe.redirect.invalid/ routes: - name: root-redirect-to-grafana hosts: - svc.knoe.dev paths: - ~/$ strip_path: false plugins: - name: request-termination config: status_code: 302 message: redirecting - name: response-transformer config: add: headers: - 'Location: /grafana' # Dedicated health endpoint for the GCE LB BackendConfig. request-termination # returns 200 synchronously with no upstream call. URL is RFC-2606 reserved. - name: healthz url: http://knoe.healthz.invalid/ routes: - name: healthz paths: - /healthz strip_path: true plugins: - name: request-termination config: status_code: 200 message: ok - name: knoe-service url: http://knoe-svc.knoe-system.svc.cluster.local:8080 routes: - name: knoe-k3s-kubeconfig hosts: - svc.knoe.dev paths: - /k3s/kube_config.sh strip_path: false - name: db-manager # NOTE: live GKE cluster runs CNPG in `knoe-db-0` namespace; k3s mode # uses `knoe-db`. Per-mode delta — keep the k3s name here. url: http://knoe-db-manager.knoe-db.svc.cluster.local:80 routes: - name: backup-route hosts: - svc.knoe.dev paths: - /backup strip_path: false # Grafana: scoped to /grafana so other routes on svc.knoe.dev (Prometheus, # Alertmanager, future UIs) can land alongside it. Grafana's grafana.ini # is configured with `serve_from_sub_path = true` so it expects the # /grafana prefix; strip_path=false forwards the prefix unchanged. - name: grafana url: http://kps-grafana.monitoring.svc.cluster.local:80 routes: - name: grafana-all hosts: - svc.knoe.dev paths: - /grafana strip_path: false - name: knoe-auth url: http://knoe-auth.knoe-system.svc.cluster.local:8080 routes: - name: knoe-auth-root hosts: - api.knoe.dev paths: - / strip_path: false - name: gitea-http url: http://gitea-http.gitea.svc.cluster.local:3000 routes: - name: gitea-root hosts: - git.knoe.dev paths: - / strip_path: false - name: gitea-ssh host: gitea-ssh.gitea.svc.cluster.local port: 22 protocol: tcp routes: - name: gitea-ssh-tcp protocols: - tcp destinations: - port: 3022