From 0cce6461db2b25937800da8dec3c2bd36e0e01a5 Mon Sep 17 00:00:00 2001 From: ITQ Date: Fri, 23 Oct 2026 10:27:12 +0300 Subject: [PATCH] init(): initial commit --- .github/workflows/k8s-lint.yml | 45 + .gitignore | 1 + .kube-linter.yaml | 31 + .pre-commit-config.yaml | 27 + .sops.yaml | 3 + .yamlfmt.yaml | 19 + .yamllint.yaml | 46 + README.md | 13 + assets/overview.svg | 2 + deprecated/admin-user.yaml | 18 + deprecated/metallb.yaml | 23 + deprecated/metallb/l2advertisment.yaml | 10 + deprecated/metallb/pool.yaml | 9 + deprecated/servicescidr.yaml | 7 + justfile | 25 + multi-cluster/minecraft-multicluster-svc.yaml | 13 + multi-cluster/minecraft-svc.yaml | 14 + proxmox/argocd/argocd.yaml | 156 + proxmox/argocd/cert-manager.yaml | 46 + proxmox/argocd/cloudnative-pg.yaml | 34 + proxmox/argocd/external-secrets-operator.yaml | 38 + proxmox/argocd/falco.yaml | 99 + proxmox/argocd/gitlab-runner.yaml | 44 + proxmox/argocd/grafana.yaml | 89 + proxmox/argocd/headlamp.yaml | 34 + proxmox/argocd/infisical-pki-issuer.yaml | 27 + proxmox/argocd/istio-base.yaml | 32 + proxmox/argocd/istiod.yaml | 35 + proxmox/argocd/jellyfin.yaml | 42 + proxmox/argocd/manifests.yaml | 30 + proxmox/argocd/mediamtx.yaml | 37 + proxmox/argocd/metrics-server.yaml | 38 + proxmox/argocd/minecraft.yaml | 54 + proxmox/argocd/proxmox-csi-plugin.yaml | 94 + proxmox/argocd/root-app.yaml | 27 + proxmox/argocd/submariner-broker.yaml | 25 + proxmox/argocd/submariner-operator.yaml | 49 + proxmox/argocd/victoriametrics-k8s-stack.yaml | 293 ++ proxmox/argocd/victoriametrics-operator.yaml | 42 + proxmox/helm/cilium/values.yaml | 112 + proxmox/helm/gitlab/values.yaml | 155 + .../wazuh/env/indexer-resources.yaml | 23 + proxmox/kustomize/wazuh/env/kustomization.yml | 30 + .../kustomize/wazuh/env/storage-class.yaml | 6 + .../wazuh/env/wazuh-master-resources.yaml | 13 + .../kustomize/wazuh/env/wazuh-resources.yaml | 14 + .../wazuh/wazuh/base/Allow-DNS-np.yaml | 22 + .../wazuh/wazuh/base/default-deny-all.yaml | 10 + .../kustomize/wazuh/wazuh/base/wazuh-ns.yaml | 13 + proxmox/kustomize/wazuh/wazuh/config.yml | 23 + .../wazuh-dashboard/dashboard-deploy.yaml | 155 + .../wazuh-dashboard/dashboard-egress.yaml | 27 + .../wazuh-dashboard/dashboard-pvc.yaml | 20 + .../wazuh-dashboard/dashboard-svc.yaml | 23 + .../wazuh-indexer/cluster/indexer-sts.yaml | 214 + .../wazuh-indexer/indexer-egress.yaml | 26 + .../wazuh-indexer/indexer-ingress.yaml | 33 + .../wazuh-indexer/indexer-svc.yaml | 29 + .../kustomize/wazuh/wazuh/kustomization.yml | 40 + .../kustomize/wazuh/wazuh/wazuh-certs-tool.sh | 341 ++ .../wazuh/wazuh/wazuh-credentials.sh | 957 ++++ .../wazuh/wazuh_agents/falco-agent-ds.yaml | 116 + .../wazuh/wazuh_agents/findings/detector.json | 26 + .../wazuh_agents/findings/falco-decoder.json | 34 + .../wazuh_agents/findings/integration.json | 10 + .../wazuh_agents/findings/root-decoder.json | 16 + .../wazuh_agents/findings/rule-critical.json | 18 + .../wazuh_agents/findings/rule-warning.json | 18 + .../wazuh/wazuh_agents/kustomization.yml | 7 + .../wazuh/wazuh/wazuh_agents/namespace.yaml | 8 + .../wazuh/wazuh_agents/network-policy.yaml | 44 + .../network-policies/falco-agent-ingress.yaml | 22 + .../manager-egress-external.yaml | 18 + .../network-policies/manager-egress.yaml | 19 + .../wazuh-master-ingress.yaml | 27 + .../network-policies/wazuh-worker-egress.yaml | 27 + .../wazuh_managers/wazuh-agents-svc.yaml | 28 + .../wazuh/wazuh_managers/wazuh-api-svc.yaml | 26 + .../wazuh_managers/wazuh-cluster-svc.yaml | 24 + .../wazuh_managers/wazuh-events-svc.yaml | 24 + .../wazuh_managers/wazuh-master-sts.yaml | 237 + .../wazuh-registration-svc.yaml | 24 + .../wazuh_managers/wazuh-worker-sts.yaml | 234 + .../manifests/argocd/infra-repo-password.yaml | 18 + .../manifests/argocd/infra-repo-secret.yaml | 11 + .../manifests/argocd/oidc-client-secret.yaml | 18 + proxmox/manifests/argocd/project.yaml | 30 + proxmox/manifests/etcd-backup/cronjob.yaml | 92 + proxmox/manifests/etcd-backup/secrets.yaml | 50 + .../infisical-cluster-secret-store.yaml | 20 + .../infisical-kubernetes-auth.yaml | 10 + .../kubernetes-auth-rbac.yaml | 28 + .../gateway/global-http-redirect.yaml | 22 + proxmox/manifests/gateway/ns.yaml | 4 + .../gateway/routes/argocd/httproute.yaml | 22 + .../routes/argocd/tls-external-secret.yaml | 22 + .../gateway/routes/grafana/httprouter.yaml | 23 + .../routes/grafana/tls-external-secret.yaml | 22 + .../gateway/routes/headlamp/httproute.yaml | 22 + .../routes/headlamp/tls-external-secret.yaml | 22 + .../gateway/routes/jellyfin/httproute.yaml | 22 + .../gateway/routes/jellyfin/tls.yaml | 15 + .../gateway/routes/movienight/tls.yaml | 15 + .../gateway/routes/vdeniske/tls.yaml | 15 + .../gateway/routes/wezuh/tlsroute.yaml | 16 + proxmox/manifests/gateway/shared-gateway.yaml | 83 + .../manifests/gitlab-runner/runner-token.yaml | 22 + proxmox/manifests/gitlab/namespace.yaml | 4 + proxmox/manifests/gitlab/rails-storage.yaml | 19 + .../dashboards/cilium-envoy-downstream.yaml | 1661 ++++++ .../dashboards/cilium-envoy-overview.yaml | 2941 +++++++++++ .../dashboards/cilium-envoy-upstream.yaml | 2153 ++++++++ .../grafana/dashboards/cilium-hubble.yaml | 4490 +++++++++++++++++ .../dashboards/cilium-network-monitoring.yaml | 1627 ++++++ .../manifests/grafana/dashboards/etcd.yaml | 548 ++ .../manifests/grafana/grafana-secrets.yaml | 23 + .../infisical-pki-issuer/cluster-issuer.yaml | 18 + .../infisical-identity-secret.yaml | 8 + .../manifests/infisical-pki-issuer/rbac.yaml | 57 + .../infrastructure/cilium/l2announcement.yaml | 10 + .../cilium/loadbalancerippool.yaml | 7 + .../proxmox-csi/config-secret.yaml | 27 + .../proxmox-csi/manifests/hdd.yaml | 13 + .../proxmox-csi/manifests/ssd.yaml | 15 + proxmox/manifests/mediamtx/configmap.yaml | 813 +++ proxmox/manifests/mediamtx/mediamtx.xml | 28 + proxmox/manifests/secrets/etcd-certs.yaml | 25 + .../submariner-broker-credentials.yaml | 27 + .../manifests/secrets/submariner-ipsec.yaml | 19 + .../manifests/vdeniske/bootstrap-secret.yaml | 29 + .../vdeniske/vdeniske-backend-secrets.yaml | 33 + .../vdeniske/vdeniske-postgres-app.yaml | 25 + .../victoria-metrics/cilium-agent.yaml | 20 + .../victoria-metrics/cilium-envoy.yaml | 20 + .../cilium-hubble-metrics.yaml | 20 + .../victoria-metrics/cilium-operator.yaml | 18 + proxmox/manifests/victoria-metrics/etcd.yaml | 29 + .../manifests/victoria-metrics/vmagent.yaml | 31 + .../manifests/victoria-metrics/vmsingle.yaml | 21 + proxmox/manifests/wazuh/certificates.yaml | 95 + proxmox/manifests/wazuh/credentials.yaml | 91 + proxmox/manifests/wazuh/namespace.yaml | 4 + proxmox/talos/README.md | 49 + proxmox/talos/nodes/cp-01.yaml | 17 + proxmox/talos/nodes/worker-01.yaml | 0 .../patches/allow-controlplane-workloads.yaml | 2 + .../talos/patches/control-plane-limits.yaml | 33 + proxmox/talos/patches/custom-image.yaml | 3 + proxmox/talos/patches/disable-auditd.yaml | 4 + .../patches/disable-cni-and-kubeproxy.yaml | 6 + .../talos/patches/enable-user-namespaces.yaml | 7 + .../talos/patches/k8s-talos-api-access.yaml | 8 + .../talos/patches/kubeapi-optimization.yaml | 21 + proxmox/talos/patches/namespaces.yaml | 38 + proxmox/talos/patches/pod-security.yaml | 22 + proxmox/talos/patches/registry-mirrors.yaml | 6 + proxmox/talos/patches/services-bind-fix.yaml | 10 + proxmox/talos/patches/subnets.yaml | 6 + proxmox/talos/patches/sysctls.yaml | 3 + proxmox/talos/secrets.yaml | 41 + scripts/pods-with-limits.sh | 11 + scripts/prune-short.sh | 49 + scripts/prune.sh | 323 ++ yc-lab/argocd/argocd.yaml | 156 + yc-lab/argocd/cert-manager.yaml | 40 + yc-lab/argocd/cloudnative-pg.yaml | 34 + yc-lab/argocd/external-secrets-operator.yaml | 38 + yc-lab/argocd/grafana.yaml | 89 + yc-lab/argocd/headlamp.yaml | 34 + yc-lab/argocd/karmada.yaml | 42 + yc-lab/argocd/manifests.yaml | 30 + yc-lab/argocd/metrics-server.yaml | 38 + yc-lab/argocd/root-app.yaml | 27 + yc-lab/argocd/submariner-broker.yaml | 25 + yc-lab/argocd/submariner-operator.yaml | 49 + yc-lab/argocd/victoriametrics-k8s-stack.yaml | 295 ++ yc-lab/argocd/victoriametrics-operator.yaml | 41 + yc-lab/helm/cilium/values.yaml | 114 + yc-lab/helm/coredns/README.md | 2 + yc-lab/helm/coredns/values.yaml | 3 + .../manifests/argocd/infra-repo-password.yaml | 18 + .../manifests/argocd/infra-repo-secret.yaml | 11 + .../manifests/argocd/oidc-client-secret.yaml | 18 + yc-lab/manifests/argocd/project.yaml | 30 + .../cert-manager/cloudflare-api-token.yaml | 19 + .../cert-manager/cluster-issuer.yaml | 16 + .../infisical-cluster-secret-store.yaml | 22 + .../gateway/global-http-redirect.yaml | 22 + yc-lab/manifests/gateway/ns.yaml | 4 + .../gateway/routes/argocd/httproute.yaml | 22 + .../manifests/gateway/routes/argocd/tls.yaml | 12 + .../gateway/routes/grafana/httproute.yaml | 22 + .../manifests/gateway/routes/grafana/tls.yaml | 12 + .../gateway/routes/headlamp/httproute.yaml | 22 + .../gateway/routes/headlamp/tls.yaml | 12 + .../gateway/routes/karmada/tlsroute.yaml | 16 + yc-lab/manifests/gateway/shared-gateway.yaml | 66 + .../dashboards/cilium-envoy-downstream.yaml | 1661 ++++++ .../dashboards/cilium-envoy-overview.yaml | 2941 +++++++++++ .../dashboards/cilium-envoy-upstream.yaml | 2153 ++++++++ .../grafana/dashboards/cilium-hubble.yaml | 4490 +++++++++++++++++ .../dashboards/cilium-network-monitoring.yaml | 1627 ++++++ yc-lab/manifests/grafana/dashboards/etcd.yaml | 548 ++ yc-lab/manifests/grafana/grafana-secrets.yaml | 23 + .../grafana/victoriametics-datasource.yaml | 26 + .../infrastructure/kubernetes-lb-service.yaml | 31 + .../local-path-storage/manifest.yaml | 186 + yc-lab/manifests/observability/rbac.yaml | 41 + yc-lab/manifests/submariner/ipsec-secret.yaml | 19 + .../victoria-metrics/cilium-agent.yaml | 20 + .../victoria-metrics/cilium-envoy.yaml | 20 + .../cilium-hubble-metrics.yaml | 20 + .../victoria-metrics/cilium-operator.yaml | 18 + yc-lab/manifests/victoria-metrics/etcd.yaml | 18 + .../manifests/victoria-metrics/vmagent.yaml | 31 + .../manifests/victoria-metrics/vmsingle.yaml | 21 + 216 files changed, 36511 insertions(+) create mode 100644 .github/workflows/k8s-lint.yml create mode 100644 .gitignore create mode 100644 .kube-linter.yaml create mode 100644 .pre-commit-config.yaml create mode 100644 .sops.yaml create mode 100644 .yamlfmt.yaml create mode 100644 .yamllint.yaml create mode 100644 README.md create mode 100644 assets/overview.svg create mode 100644 deprecated/admin-user.yaml create mode 100644 deprecated/metallb.yaml create mode 100644 deprecated/metallb/l2advertisment.yaml create mode 100644 deprecated/metallb/pool.yaml create mode 100644 deprecated/servicescidr.yaml create mode 100644 justfile create mode 100644 multi-cluster/minecraft-multicluster-svc.yaml create mode 100644 multi-cluster/minecraft-svc.yaml create mode 100644 proxmox/argocd/argocd.yaml create mode 100644 proxmox/argocd/cert-manager.yaml create mode 100644 proxmox/argocd/cloudnative-pg.yaml create mode 100644 proxmox/argocd/external-secrets-operator.yaml create mode 100644 proxmox/argocd/falco.yaml create mode 100644 proxmox/argocd/gitlab-runner.yaml create mode 100644 proxmox/argocd/grafana.yaml create mode 100644 proxmox/argocd/headlamp.yaml create mode 100644 proxmox/argocd/infisical-pki-issuer.yaml create mode 100644 proxmox/argocd/istio-base.yaml create mode 100644 proxmox/argocd/istiod.yaml create mode 100644 proxmox/argocd/jellyfin.yaml create mode 100644 proxmox/argocd/manifests.yaml create mode 100644 proxmox/argocd/mediamtx.yaml create mode 100644 proxmox/argocd/metrics-server.yaml create mode 100644 proxmox/argocd/minecraft.yaml create mode 100644 proxmox/argocd/proxmox-csi-plugin.yaml create mode 100644 proxmox/argocd/root-app.yaml create mode 100644 proxmox/argocd/submariner-broker.yaml create mode 100644 proxmox/argocd/submariner-operator.yaml create mode 100644 proxmox/argocd/victoriametrics-k8s-stack.yaml create mode 100644 proxmox/argocd/victoriametrics-operator.yaml create mode 100644 proxmox/helm/cilium/values.yaml create mode 100644 proxmox/helm/gitlab/values.yaml create mode 100644 proxmox/kustomize/wazuh/env/indexer-resources.yaml create mode 100644 proxmox/kustomize/wazuh/env/kustomization.yml create mode 100644 proxmox/kustomize/wazuh/env/storage-class.yaml create mode 100644 proxmox/kustomize/wazuh/env/wazuh-master-resources.yaml create mode 100644 proxmox/kustomize/wazuh/env/wazuh-resources.yaml create mode 100644 proxmox/kustomize/wazuh/wazuh/base/Allow-DNS-np.yaml create mode 100644 proxmox/kustomize/wazuh/wazuh/base/default-deny-all.yaml create mode 100644 proxmox/kustomize/wazuh/wazuh/base/wazuh-ns.yaml create mode 100644 proxmox/kustomize/wazuh/wazuh/config.yml create mode 100644 proxmox/kustomize/wazuh/wazuh/indexer_stack/wazuh-dashboard/dashboard-deploy.yaml create mode 100644 proxmox/kustomize/wazuh/wazuh/indexer_stack/wazuh-dashboard/dashboard-egress.yaml create mode 100644 proxmox/kustomize/wazuh/wazuh/indexer_stack/wazuh-dashboard/dashboard-pvc.yaml create mode 100644 proxmox/kustomize/wazuh/wazuh/indexer_stack/wazuh-dashboard/dashboard-svc.yaml create mode 100644 proxmox/kustomize/wazuh/wazuh/indexer_stack/wazuh-indexer/cluster/indexer-sts.yaml create mode 100644 proxmox/kustomize/wazuh/wazuh/indexer_stack/wazuh-indexer/indexer-egress.yaml create mode 100644 proxmox/kustomize/wazuh/wazuh/indexer_stack/wazuh-indexer/indexer-ingress.yaml create mode 100644 proxmox/kustomize/wazuh/wazuh/indexer_stack/wazuh-indexer/indexer-svc.yaml create mode 100644 proxmox/kustomize/wazuh/wazuh/kustomization.yml create mode 100755 proxmox/kustomize/wazuh/wazuh/wazuh-certs-tool.sh create mode 100644 proxmox/kustomize/wazuh/wazuh/wazuh-credentials.sh create mode 100644 proxmox/kustomize/wazuh/wazuh/wazuh_agents/falco-agent-ds.yaml create mode 100644 proxmox/kustomize/wazuh/wazuh/wazuh_agents/findings/detector.json create mode 100644 proxmox/kustomize/wazuh/wazuh/wazuh_agents/findings/falco-decoder.json create mode 100644 proxmox/kustomize/wazuh/wazuh/wazuh_agents/findings/integration.json create mode 100644 proxmox/kustomize/wazuh/wazuh/wazuh_agents/findings/root-decoder.json create mode 100644 proxmox/kustomize/wazuh/wazuh/wazuh_agents/findings/rule-critical.json create mode 100644 proxmox/kustomize/wazuh/wazuh/wazuh_agents/findings/rule-warning.json create mode 100644 proxmox/kustomize/wazuh/wazuh/wazuh_agents/kustomization.yml create mode 100644 proxmox/kustomize/wazuh/wazuh/wazuh_agents/namespace.yaml create mode 100644 proxmox/kustomize/wazuh/wazuh/wazuh_agents/network-policy.yaml create mode 100644 proxmox/kustomize/wazuh/wazuh/wazuh_managers/network-policies/falco-agent-ingress.yaml create mode 100644 proxmox/kustomize/wazuh/wazuh/wazuh_managers/network-policies/manager-egress-external.yaml create mode 100644 proxmox/kustomize/wazuh/wazuh/wazuh_managers/network-policies/manager-egress.yaml create mode 100644 proxmox/kustomize/wazuh/wazuh/wazuh_managers/network-policies/wazuh-master-ingress.yaml create mode 100644 proxmox/kustomize/wazuh/wazuh/wazuh_managers/network-policies/wazuh-worker-egress.yaml create mode 100644 proxmox/kustomize/wazuh/wazuh/wazuh_managers/wazuh-agents-svc.yaml create mode 100644 proxmox/kustomize/wazuh/wazuh/wazuh_managers/wazuh-api-svc.yaml create mode 100644 proxmox/kustomize/wazuh/wazuh/wazuh_managers/wazuh-cluster-svc.yaml create mode 100644 proxmox/kustomize/wazuh/wazuh/wazuh_managers/wazuh-events-svc.yaml create mode 100644 proxmox/kustomize/wazuh/wazuh/wazuh_managers/wazuh-master-sts.yaml create mode 100644 proxmox/kustomize/wazuh/wazuh/wazuh_managers/wazuh-registration-svc.yaml create mode 100644 proxmox/kustomize/wazuh/wazuh/wazuh_managers/wazuh-worker-sts.yaml create mode 100644 proxmox/manifests/argocd/infra-repo-password.yaml create mode 100644 proxmox/manifests/argocd/infra-repo-secret.yaml create mode 100644 proxmox/manifests/argocd/oidc-client-secret.yaml create mode 100644 proxmox/manifests/argocd/project.yaml create mode 100644 proxmox/manifests/etcd-backup/cronjob.yaml create mode 100644 proxmox/manifests/etcd-backup/secrets.yaml create mode 100644 proxmox/manifests/external-secrets/infisical-cluster-secret-store.yaml create mode 100644 proxmox/manifests/external-secrets/infisical-kubernetes-auth.yaml create mode 100644 proxmox/manifests/external-secrets/kubernetes-auth-rbac.yaml create mode 100644 proxmox/manifests/gateway/global-http-redirect.yaml create mode 100644 proxmox/manifests/gateway/ns.yaml create mode 100644 proxmox/manifests/gateway/routes/argocd/httproute.yaml create mode 100644 proxmox/manifests/gateway/routes/argocd/tls-external-secret.yaml create mode 100644 proxmox/manifests/gateway/routes/grafana/httprouter.yaml create mode 100644 proxmox/manifests/gateway/routes/grafana/tls-external-secret.yaml create mode 100644 proxmox/manifests/gateway/routes/headlamp/httproute.yaml create mode 100644 proxmox/manifests/gateway/routes/headlamp/tls-external-secret.yaml create mode 100644 proxmox/manifests/gateway/routes/jellyfin/httproute.yaml create mode 100644 proxmox/manifests/gateway/routes/jellyfin/tls.yaml create mode 100644 proxmox/manifests/gateway/routes/movienight/tls.yaml create mode 100644 proxmox/manifests/gateway/routes/vdeniske/tls.yaml create mode 100644 proxmox/manifests/gateway/routes/wezuh/tlsroute.yaml create mode 100644 proxmox/manifests/gateway/shared-gateway.yaml create mode 100644 proxmox/manifests/gitlab-runner/runner-token.yaml create mode 100644 proxmox/manifests/gitlab/namespace.yaml create mode 100644 proxmox/manifests/gitlab/rails-storage.yaml create mode 100644 proxmox/manifests/grafana/dashboards/cilium-envoy-downstream.yaml create mode 100644 proxmox/manifests/grafana/dashboards/cilium-envoy-overview.yaml create mode 100644 proxmox/manifests/grafana/dashboards/cilium-envoy-upstream.yaml create mode 100644 proxmox/manifests/grafana/dashboards/cilium-hubble.yaml create mode 100644 proxmox/manifests/grafana/dashboards/cilium-network-monitoring.yaml create mode 100644 proxmox/manifests/grafana/dashboards/etcd.yaml create mode 100644 proxmox/manifests/grafana/grafana-secrets.yaml create mode 100644 proxmox/manifests/infisical-pki-issuer/cluster-issuer.yaml create mode 100644 proxmox/manifests/infisical-pki-issuer/infisical-identity-secret.yaml create mode 100644 proxmox/manifests/infisical-pki-issuer/rbac.yaml create mode 100644 proxmox/manifests/infrastructure/cilium/l2announcement.yaml create mode 100644 proxmox/manifests/infrastructure/cilium/loadbalancerippool.yaml create mode 100644 proxmox/manifests/infrastructure/proxmox-csi/config-secret.yaml create mode 100644 proxmox/manifests/infrastructure/proxmox-csi/manifests/hdd.yaml create mode 100644 proxmox/manifests/infrastructure/proxmox-csi/manifests/ssd.yaml create mode 100644 proxmox/manifests/mediamtx/configmap.yaml create mode 100644 proxmox/manifests/mediamtx/mediamtx.xml create mode 100644 proxmox/manifests/secrets/etcd-certs.yaml create mode 100644 proxmox/manifests/secrets/submariner-broker-credentials.yaml create mode 100644 proxmox/manifests/secrets/submariner-ipsec.yaml create mode 100644 proxmox/manifests/vdeniske/bootstrap-secret.yaml create mode 100644 proxmox/manifests/vdeniske/vdeniske-backend-secrets.yaml create mode 100644 proxmox/manifests/vdeniske/vdeniske-postgres-app.yaml create mode 100644 proxmox/manifests/victoria-metrics/cilium-agent.yaml create mode 100644 proxmox/manifests/victoria-metrics/cilium-envoy.yaml create mode 100644 proxmox/manifests/victoria-metrics/cilium-hubble-metrics.yaml create mode 100644 proxmox/manifests/victoria-metrics/cilium-operator.yaml create mode 100644 proxmox/manifests/victoria-metrics/etcd.yaml create mode 100644 proxmox/manifests/victoria-metrics/vmagent.yaml create mode 100644 proxmox/manifests/victoria-metrics/vmsingle.yaml create mode 100644 proxmox/manifests/wazuh/certificates.yaml create mode 100644 proxmox/manifests/wazuh/credentials.yaml create mode 100644 proxmox/manifests/wazuh/namespace.yaml create mode 100644 proxmox/talos/README.md create mode 100644 proxmox/talos/nodes/cp-01.yaml create mode 100644 proxmox/talos/nodes/worker-01.yaml create mode 100644 proxmox/talos/patches/allow-controlplane-workloads.yaml create mode 100644 proxmox/talos/patches/control-plane-limits.yaml create mode 100644 proxmox/talos/patches/custom-image.yaml create mode 100644 proxmox/talos/patches/disable-auditd.yaml create mode 100644 proxmox/talos/patches/disable-cni-and-kubeproxy.yaml create mode 100644 proxmox/talos/patches/enable-user-namespaces.yaml create mode 100644 proxmox/talos/patches/k8s-talos-api-access.yaml create mode 100644 proxmox/talos/patches/kubeapi-optimization.yaml create mode 100644 proxmox/talos/patches/namespaces.yaml create mode 100644 proxmox/talos/patches/pod-security.yaml create mode 100644 proxmox/talos/patches/registry-mirrors.yaml create mode 100644 proxmox/talos/patches/services-bind-fix.yaml create mode 100644 proxmox/talos/patches/subnets.yaml create mode 100644 proxmox/talos/patches/sysctls.yaml create mode 100644 proxmox/talos/secrets.yaml create mode 100755 scripts/pods-with-limits.sh create mode 100755 scripts/prune-short.sh create mode 100755 scripts/prune.sh create mode 100644 yc-lab/argocd/argocd.yaml create mode 100644 yc-lab/argocd/cert-manager.yaml create mode 100644 yc-lab/argocd/cloudnative-pg.yaml create mode 100644 yc-lab/argocd/external-secrets-operator.yaml create mode 100644 yc-lab/argocd/grafana.yaml create mode 100644 yc-lab/argocd/headlamp.yaml create mode 100644 yc-lab/argocd/karmada.yaml create mode 100644 yc-lab/argocd/manifests.yaml create mode 100644 yc-lab/argocd/metrics-server.yaml create mode 100644 yc-lab/argocd/root-app.yaml create mode 100644 yc-lab/argocd/submariner-broker.yaml create mode 100644 yc-lab/argocd/submariner-operator.yaml create mode 100644 yc-lab/argocd/victoriametrics-k8s-stack.yaml create mode 100644 yc-lab/argocd/victoriametrics-operator.yaml create mode 100644 yc-lab/helm/cilium/values.yaml create mode 100644 yc-lab/helm/coredns/README.md create mode 100644 yc-lab/helm/coredns/values.yaml create mode 100644 yc-lab/manifests/argocd/infra-repo-password.yaml create mode 100644 yc-lab/manifests/argocd/infra-repo-secret.yaml create mode 100644 yc-lab/manifests/argocd/oidc-client-secret.yaml create mode 100644 yc-lab/manifests/argocd/project.yaml create mode 100644 yc-lab/manifests/cert-manager/cloudflare-api-token.yaml create mode 100644 yc-lab/manifests/cert-manager/cluster-issuer.yaml create mode 100644 yc-lab/manifests/external-secrets/infisical-cluster-secret-store.yaml create mode 100644 yc-lab/manifests/gateway/global-http-redirect.yaml create mode 100644 yc-lab/manifests/gateway/ns.yaml create mode 100644 yc-lab/manifests/gateway/routes/argocd/httproute.yaml create mode 100644 yc-lab/manifests/gateway/routes/argocd/tls.yaml create mode 100644 yc-lab/manifests/gateway/routes/grafana/httproute.yaml create mode 100644 yc-lab/manifests/gateway/routes/grafana/tls.yaml create mode 100644 yc-lab/manifests/gateway/routes/headlamp/httproute.yaml create mode 100644 yc-lab/manifests/gateway/routes/headlamp/tls.yaml create mode 100644 yc-lab/manifests/gateway/routes/karmada/tlsroute.yaml create mode 100644 yc-lab/manifests/gateway/shared-gateway.yaml create mode 100644 yc-lab/manifests/grafana/dashboards/cilium-envoy-downstream.yaml create mode 100644 yc-lab/manifests/grafana/dashboards/cilium-envoy-overview.yaml create mode 100644 yc-lab/manifests/grafana/dashboards/cilium-envoy-upstream.yaml create mode 100644 yc-lab/manifests/grafana/dashboards/cilium-hubble.yaml create mode 100644 yc-lab/manifests/grafana/dashboards/cilium-network-monitoring.yaml create mode 100644 yc-lab/manifests/grafana/dashboards/etcd.yaml create mode 100644 yc-lab/manifests/grafana/grafana-secrets.yaml create mode 100644 yc-lab/manifests/grafana/victoriametics-datasource.yaml create mode 100644 yc-lab/manifests/infrastructure/kubernetes-lb-service.yaml create mode 100644 yc-lab/manifests/infrastructure/local-path-storage/manifest.yaml create mode 100644 yc-lab/manifests/observability/rbac.yaml create mode 100644 yc-lab/manifests/submariner/ipsec-secret.yaml create mode 100644 yc-lab/manifests/victoria-metrics/cilium-agent.yaml create mode 100644 yc-lab/manifests/victoria-metrics/cilium-envoy.yaml create mode 100644 yc-lab/manifests/victoria-metrics/cilium-hubble-metrics.yaml create mode 100644 yc-lab/manifests/victoria-metrics/cilium-operator.yaml create mode 100644 yc-lab/manifests/victoria-metrics/etcd.yaml create mode 100644 yc-lab/manifests/victoria-metrics/vmagent.yaml create mode 100644 yc-lab/manifests/victoria-metrics/vmsingle.yaml diff --git a/.github/workflows/k8s-lint.yml b/.github/workflows/k8s-lint.yml new file mode 100644 index 0000000..e7d18ae --- /dev/null +++ b/.github/workflows/k8s-lint.yml @@ -0,0 +1,45 @@ +name: Lint & validate Kubernetes manifests + +on: + pull_request: + paths: + - '**/*.yaml' + - '**/*.yml' + push: + branches: [main] + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-go@v5 + with: + go-version: 'stable' + + - uses: actions/setup-python@v5 + with: + python-version: '3.x' + + - name: Install tools + run: | + pip install yamllint + go install github.com/google/yamlfmt/cmd/yamlfmt@latest + go install github.com/yannh/kubeconform/cmd/kubeconform@latest + go install golang.stackrox.io/kube-linter/cmd/kube-linter@latest + echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH" + + - name: yamllint + run: yamllint . + + - name: yamlfmt (check only, no writes) + run: yamlfmt -lint . + + - name: kube-linter + run: kube-linter lint --config .kube-linter.yaml proxmox/manifests + + - name: kubeconform + run: |- + kubeconform -strict -summary -ignore-missing-schemas \ + -kubernetes-version 1.36.1 proxmox/manifests diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e43b0f9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_Store diff --git a/.kube-linter.yaml b/.kube-linter.yaml new file mode 100644 index 0000000..1086413 --- /dev/null +++ b/.kube-linter.yaml @@ -0,0 +1,31 @@ +checks: + # Keep KubeLinter's built-in default checks + # no-read-only-root-fs, unset-cpu-requirements, unset-memory-requirements, host-network/-pid, latest-tag, privileged-container, privilege-escalation-container, pdb-*, unsafe-sysctls, no-anti-affinity, env-var-secret, dangling-service, ... + doNotAutoAddDefaults: false + + include: + - no-liveness-probe + - no-readiness-probe + + - unset-cpu-requirements + - unset-memory-requirements + + - run-as-non-root + - default-service-account + - deprecated-service-account-field + + - wildcard-in-rules + - writable-host-mount + - read-secret-from-env-var + - privileged-ports + + - no-rolling-update-strategy + - minimum-three-replicas + - hpa-minimum-three-replicas + + - dangling-ingress + - dangling-networkpolicy + - dangling-horizontalpodautoscaler + - dangling-servicemonitor + + exclude: [] diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..89a8a16 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,27 @@ +repos: + - repo: https://github.com/adrienverge/yamllint.git + rev: v1.38.0 + hooks: + - id: yamllint + args: [--strict] + + - repo: local + hooks: + - id: yamlfmt + name: yamlfmt (format YAML) + entry: yamlfmt + language: system + types: [yaml] + + - id: kubeconform + name: kubeconform (validate against k8s API schema) + entry: kubeconform -strict -summary -ignore-missing-schemas -kubernetes-version 1.34.0 + language: system + files: ^proxmox/manifests/.*\.ya?ml$ + + - id: kube-linter + name: kube-linter (best-practice & security checks) + entry: kube-linter lint --config .kube-linter.yaml proxmox/manifests + language: system + pass_filenames: false + files: ^proxmox/manifests/.*\.ya?ml$ diff --git a/.sops.yaml b/.sops.yaml new file mode 100644 index 0000000..52ebb4c --- /dev/null +++ b/.sops.yaml @@ -0,0 +1,3 @@ +creation_rules: + - path_regex: '\.yaml$' + pgp: B13C2DAF24268258F525697A063A10A651314CE9 diff --git a/.yamlfmt.yaml b/.yamlfmt.yaml new file mode 100644 index 0000000..26093e8 --- /dev/null +++ b/.yamlfmt.yaml @@ -0,0 +1,19 @@ +include: + - "**/*.yaml" + - "**/*.yml" + +exclude: + - "**/vendor/**" + - "**/node_modules/**" + - "**/charts/**/templates/**" + +line_ending: lf + +formatter: + type: basic + indent: 2 + include_document_start: false + retain_line_breaks_single: true + trim_trailing_whitespace: true + eof_newline: true + pad_line_comments: 1 diff --git a/.yamllint.yaml b/.yamllint.yaml new file mode 100644 index 0000000..037d151 --- /dev/null +++ b/.yamllint.yaml @@ -0,0 +1,46 @@ +extends: default + +yaml-files: + - '*.yaml' + - '*.yml' + - '.yamllint.yaml' + +ignore: | + vendor/ + node_modules/ + charts/**/templates/** + +rules: + document-start: disable + + line-length: + max: 120 + level: warning + + indentation: + spaces: 2 + indent-sequences: consistent + + truthy: + allowed-values: ['true', 'false'] + check-keys: false + + comments: + min-spaces-from-content: 1 + + braces: + max-spaces-inside: 1 + + brackets: + max-spaces-inside: 0 + + empty-lines: + max: 1 + max-end: 1 + + trailing-spaces: enable + new-line-at-end-of-file: enable + key-duplicates: enable + + hyphens: + max-spaces-after: 1 diff --git a/README.md b/README.md new file mode 100644 index 0000000..a85b3ab --- /dev/null +++ b/README.md @@ -0,0 +1,13 @@ +# Homelab Configurations + +![](./assets/overview.svg) + +## Install lint tools + +```bash +pip install yamllint + +brew install kubeconform +brew install kube-linter +brew install yamlfmt +``` diff --git a/assets/overview.svg b/assets/overview.svg new file mode 100644 index 0000000..3b4d1a6 --- /dev/null +++ b/assets/overview.svg @@ -0,0 +1,2 @@ +Cloud Clusterkubeapikarmada controller-managerscheduleretcdKarmada Control Planeaggegated apiservercontroller-managerkubeapicontroller-managerscheduleretcdK8S Control Planereconcile propagationpolices, multiclusterservices, etc.member cluster API'saggregationkarmada webhooksvalidation/mutationwebhooks for crdsOn-prem ClusterGitOps CPpullsGitCiliumCNIProxyGatewayannounces LB on L2BridgeExternalSecretsOperatorOperatorfetchesInfisical VaultCSIProxmox CSI ProviderslicesHDDslicesSSDcert-managerHeadlampGrafanaMetrics serverVictoria LogsVictoria MetricsCoreDNS... other workloadsCloudNative-PGOperatorIstioDApp 1App 2App 3Grafana PyroscopeExporter 1Exporter 2Exporter 3vmagentotel-collectorVictoriaMetricsGrafanaGrafana LokiGrafana TempoS3ObservabilitySubmarineroperatorroute agent dsgateway dsSubmarineroperatorroute agent dsgateway dswireguardcreates routes,snats/dnats, sets upadditional P2P VXLANoverlay to gatewaynoderoot-appmanifestsArgoCDkubeapicontroller-managerscheduleretcdproxy requests to sync services (MutliClusterServices), deployments,secrets, etcK8S Control PlaneClientNLBMain MasterRepositoryCI/CDContainer registryControlplaneControlplaneWorkerWorkerCloud MonitoringCloud Cluster UnderlayOn-prem cluster underlayPVE NodeTailscale LXCTalos VMRouter \ No newline at end of file diff --git a/deprecated/admin-user.yaml b/deprecated/admin-user.yaml new file mode 100644 index 0000000..cc8e51f --- /dev/null +++ b/deprecated/admin-user.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: admin-user + namespace: kubernetes-dashboard +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: admin-user +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cluster-admin +subjects: + - kind: ServiceAccount + name: admin-user + namespace: kubernetes-dashboard diff --git a/deprecated/metallb.yaml b/deprecated/metallb.yaml new file mode 100644 index 0000000..e34c83d --- /dev/null +++ b/deprecated/metallb.yaml @@ -0,0 +1,23 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: metallb + namespace: argocd +spec: + project: default + source: + repoURL: https://metallb.github.io/metallb + targetRevision: 0.15.3 + chart: metallb + destination: + server: https://kubernetes.default.svc + namespace: metallb-system + syncPolicy: + automated: + prune: true + selfHeal: true + enabled: true + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + - ServerSideApply=true diff --git a/deprecated/metallb/l2advertisment.yaml b/deprecated/metallb/l2advertisment.yaml new file mode 100644 index 0000000..1e84226 --- /dev/null +++ b/deprecated/metallb/l2advertisment.yaml @@ -0,0 +1,10 @@ +apiVersion: metallb.io/v1beta1 +kind: L2Advertisement +metadata: + name: default + namespace: metallb-system +spec: + ipAddressPools: + - default-pool + interfaces: + - ens18 diff --git a/deprecated/metallb/pool.yaml b/deprecated/metallb/pool.yaml new file mode 100644 index 0000000..92acee4 --- /dev/null +++ b/deprecated/metallb/pool.yaml @@ -0,0 +1,9 @@ +apiVersion: metallb.io/v1beta1 +kind: IPAddressPool +metadata: + name: default-pool + namespace: metallb-system +spec: + addresses: + - 10.13.46.0/24 + avoidBuggyIPs: true diff --git a/deprecated/servicescidr.yaml b/deprecated/servicescidr.yaml new file mode 100644 index 0000000..647ee7e --- /dev/null +++ b/deprecated/servicescidr.yaml @@ -0,0 +1,7 @@ +apiVersion: networking.k8s.io/v1 +kind: ServiceCIDR +metadata: + name: kubernetes-new +spec: + cidrs: + - 10.245.0.0/16 diff --git a/justfile b/justfile new file mode 100644 index 0000000..4c8f4c3 --- /dev/null +++ b/justfile @@ -0,0 +1,25 @@ +MANIFEST_DIR := env_var_or_default("MANIFEST_DIR", "proxmox/manifests") +K8S_VERSION := env_var_or_default("K8S_VERSION", "1.36.1") + +fmt: + yamlfmt . + +fmt-check: + yamlfmt -lint . + +lint-yaml: + yamllint . + +lint-k8s: + kube-linter lint --config .kube-linter.yaml {{MANIFEST_DIR}} + +validate: + kubeconform -strict -summary -ignore-missing-schemas \ + -kubernetes-version {{K8S_VERSION}} {{MANIFEST_DIR}} + +lint: lint-yaml lint-k8s validate + +lint-all: fmt-check lint + +install-hooks: + pre-commit install diff --git a/multi-cluster/minecraft-multicluster-svc.yaml b/multi-cluster/minecraft-multicluster-svc.yaml new file mode 100644 index 0000000..071fe0e --- /dev/null +++ b/multi-cluster/minecraft-multicluster-svc.yaml @@ -0,0 +1,13 @@ +apiVersion: networking.karmada.io/v1alpha1 +kind: MultiClusterService +metadata: + name: minecraft-global + namespace: minecraft +spec: + consumerClusters: + - name: k8s-yandex + providerClusters: + - name: k8s-proxmox + range: {} + types: + - CrossCluster diff --git a/multi-cluster/minecraft-svc.yaml b/multi-cluster/minecraft-svc.yaml new file mode 100644 index 0000000..3ff2647 --- /dev/null +++ b/multi-cluster/minecraft-svc.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: minecraft-global + namespace: minecraft +spec: + type: LoadBalancer + ports: + - name: minecraft + port: 25565 + targetPort: 25565 + protocol: TCP + selector: + app: minecraft diff --git a/proxmox/argocd/argocd.yaml b/proxmox/argocd/argocd.yaml new file mode 100644 index 0000000..1f2b63e --- /dev/null +++ b/proxmox/argocd/argocd.yaml @@ -0,0 +1,156 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: argocd + namespace: argocd +spec: + project: default + source: + repoURL: https://argoproj.github.io/argo-helm + targetRevision: 10.4.2 + chart: argo-cd + helm: + valuesObject: + redis-ha: + enabled: false + + redis: + image: + repository: docker.io/redis + resources: + requests: + cpu: 20m + memory: 32Mi + limits: + cpu: 100m + memory: 64Mi + + controller: + replicas: 1 + + resources: + requests: + cpu: 50m + memory: 512Mi + limits: + cpu: 150m + memory: 1Gi + + env: + - name: GOGC + value: "50" + - name: GOMEMLIMIT + value: "800MiB" + + server: + autoscaling: + enabled: false + minReplicas: 1 + resources: + requests: + cpu: 25m + memory: 64Mi + limits: + cpu: 100m + memory: 128Mi + + repoServer: + autoscaling: + enabled: false + minReplicas: 1 + resources: + requests: + cpu: 25m + memory: 64Mi + limits: + cpu: 100m + memory: 256Mi + + applicationSet: + resources: + requests: + cpu: 10m + memory: 32Mi + limits: + cpu: 50m + memory: 64Mi + + notifications: + enabled: false + + dex: + enabled: false + + configs: + params: + server.insecure: "true" + + cm: + url: https://argocd.internal.itqdev.xyz + + timeout.reconciliation: "10m" + + resource.exclusions: | + - apiGroups: + - "" + kinds: + - Event + clusters: + - "*" + + - apiGroups: + - "events.k8s.io" + kinds: + - Event + clusters: + - "*" + + - apiGroups: + - "" + kinds: + - Endpoints + clusters: + - "*" + + - apiGroups: + - "discovery.k8s.io" + kinds: + - EndpointSlice + clusters: + - "*" + + - apiGroups: + - "metrics.k8s.io" + kinds: + - "*" + clusters: + - "*" + + - apiGroups: + - "coordination.k8s.io" + kinds: + - Lease + clusters: + - "*" + + oidc.config: | + name: Keycloak + issuer: https://id.itqdev.xyz/realms/master + clientID: argocd + clientSecret: $oidc.keycloak.clientSecret + refreshTokenThreshold: 2m + requestedScopes: ["openid", "profile", "email", "groups"] + + destination: + server: https://kubernetes.default.svc + namespace: argocd + + syncPolicy: + automated: + prune: true + selfHeal: true + enabled: true + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + - ServerSideApply=true diff --git a/proxmox/argocd/cert-manager.yaml b/proxmox/argocd/cert-manager.yaml new file mode 100644 index 0000000..c31eea7 --- /dev/null +++ b/proxmox/argocd/cert-manager.yaml @@ -0,0 +1,46 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: cert-manager + namespace: argocd +spec: + project: default + source: + repoURL: oci://quay.io/jetstack/charts/cert-manager + path: . + targetRevision: v1.21.1 + helm: + valuesObject: + disableAutoApproval: false + approveSignerNames: + - issuers.cert-manager.io/* + - clusterissuers.cert-manager.io/* + - clusterissuers.infisical-issuer.infisical.com/infisical + + crds: + enabled: true + + prometheus: + enabled: false + + resources: + requests: + cpu: 25m + memory: 64Mi + limits: + cpu: 100m + memory: 128Mi + + destination: + server: https://kubernetes.default.svc + namespace: cert-manager + + syncPolicy: + automated: + prune: true + selfHeal: true + enabled: true + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + - ServerSideApply=true diff --git a/proxmox/argocd/cloudnative-pg.yaml b/proxmox/argocd/cloudnative-pg.yaml new file mode 100644 index 0000000..e294045 --- /dev/null +++ b/proxmox/argocd/cloudnative-pg.yaml @@ -0,0 +1,34 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: cloudnative-pg + namespace: argocd +spec: + project: default + source: + repoURL: https://cloudnative-pg.github.io/charts + targetRevision: 0.29.0 + chart: cloudnative-pg + helm: + valuesObject: + resources: + requests: + cpu: 25m + memory: 32Mi + limits: + cpu: 100m + memory: 128Mi + + destination: + server: https://kubernetes.default.svc + namespace: cloudnative-pg + + syncPolicy: + automated: + prune: true + selfHeal: true + enabled: true + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + - ServerSideApply=true diff --git a/proxmox/argocd/external-secrets-operator.yaml b/proxmox/argocd/external-secrets-operator.yaml new file mode 100644 index 0000000..2ada1db --- /dev/null +++ b/proxmox/argocd/external-secrets-operator.yaml @@ -0,0 +1,38 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: external-secrets-operator + namespace: argocd +spec: + project: default + source: + repoURL: https://charts.external-secrets.io + targetRevision: 2.10.0 + chart: external-secrets + helm: + valuesObject: + webhook: + create: false + certController: + create: false + resources: + requests: + cpu: 25m + memory: 32Mi + limits: + cpu: 100m + memory: 128Mi + + destination: + server: https://kubernetes.default.svc + namespace: external-secrets + + syncPolicy: + automated: + prune: true + selfHeal: true + enabled: true + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + - ServerSideApply=true diff --git a/proxmox/argocd/falco.yaml b/proxmox/argocd/falco.yaml new file mode 100644 index 0000000..4eebc96 --- /dev/null +++ b/proxmox/argocd/falco.yaml @@ -0,0 +1,99 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: falco + namespace: argocd +spec: + project: default + source: + repoURL: https://falcosecurity.github.io/charts + targetRevision: 9.2.1 + chart: falco + helm: + valuesObject: + resources: + requests: + cpu: 200m + memory: 512Mi + limits: + cpu: 200m + memory: 512Mi + + tty: true + + services: + - name: k8saudit-webhook + type: ClusterIP + ports: + - port: 9765 + targetPort: 9765 + protocol: TCP + name: http + + driver: + enabled: true + kind: modern_ebpf + + mounts: + volumes: + - name: falco-events + hostPath: + path: /var/log/falco + type: DirectoryOrCreate + volumeMounts: + - name: falco-events + mountPath: /var/log/falco + + falcosidekick: + enabled: false + + falcoctl: + artifact: + install: + enabled: true + follow: + enabled: true + config: + artifact: + install: + refs: ["falco-rules:latest", "falco-incubating-rules:latest", "k8saudit-rules:latest"] + follow: + refs: ["falco-rules:latest", "falco-incubating-rules:latest", "k8saudit-rules:latest"] + + falco: + json_output: true + append_output: + - extra_fields: + - wazuh_integration: "falco" + file_output: + enabled: true + keep_alive: false + filename: /var/log/falco/events.json + rules_files: + - /etc/falco/falco_rules.yaml + - /etc/falco/falco-incubating_rules.yaml + - /etc/falco/k8s_audit_rules.yaml + - /etc/falco/rules.d + plugins: + - name: k8saudit + library_path: libk8saudit.so + init_config: "" + open_params: "http://:9765/k8s-audit" + - name: json + library_path: libjson.so + init_config: "" + load_plugins: [k8saudit, json] + + destination: + server: https://kubernetes.default.svc + namespace: falco + + syncPolicy: + automated: + prune: true + selfHeal: true + enabled: true + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + - ServerSideApply=true diff --git a/proxmox/argocd/gitlab-runner.yaml b/proxmox/argocd/gitlab-runner.yaml new file mode 100644 index 0000000..90daf7d --- /dev/null +++ b/proxmox/argocd/gitlab-runner.yaml @@ -0,0 +1,44 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: gitlab-runner + namespace: argocd +spec: + project: default + source: + repoURL: https://charts.gitlab.io + targetRevision: 0.92.1 + chart: gitlab-runner + helm: + parameters: + - name: rbac.create + value: 'true' + - name: concurrent + value: '1' + - name: securityContext.allowPrivilegeEscalation + value: 'true' + values: |- + gitlabUrl: https://gitlab.itqdev.xyz + + runners: + secret: gitlab-runner-credentials + config: | + [[runners]] + [runners.kubernetes] + namespace = "{{.Release.Namespace}}" + image = "alpine" + privileged = true + + destination: + server: https://kubernetes.default.svc + namespace: gitlab-runner + + syncPolicy: + automated: + prune: true + selfHeal: true + enabled: true + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + - ServerSideApply=true diff --git a/proxmox/argocd/grafana.yaml b/proxmox/argocd/grafana.yaml new file mode 100644 index 0000000..e49d996 --- /dev/null +++ b/proxmox/argocd/grafana.yaml @@ -0,0 +1,89 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: grafana + namespace: argocd +spec: + project: default + source: + repoURL: oci://ghcr.io/grafana-community/helm-charts/grafana + path: . + targetRevision: 13.2.6 + helm: + valuesObject: + replicas: 1 + envValueFrom: + GF_AUTH_GENERIC_OAUTH_CLIENT_SECRET: + secretKeyRef: + name: grafana-secrets + key: client-secret + + plugins: + - prometheus + + grafana.ini: + plugins: + preinstall_auto_update: false + + server: + root_url: https://grafana.internal.itqdev.xyz + + auth: + disable_login_form: false + oauth_auto_login: false + + auth.generic_oauth: + enabled: true + name: Keycloak + allow_sign_up: true + client_id: grafana-private + client_secret: ${GF_AUTH_GENERIC_OAUTH_CLIENT_SECRET} + scopes: openid profile email + use_pkce: true + + auth_url: https://id.itqdev.xyz/realms/master/protocol/openid-connect/auth + token_url: https://id.itqdev.xyz/realms/master/protocol/openid-connect/token + api_url: https://id.itqdev.xyz/realms/master/protocol/openid-connect/userinfo + + role_attribute_path: > + contains(groups[*], 'admin') && 'Admin' || contains(groups[*], 'editor') && 'Editor' || 'Viewer' + role_attribute_strict: false + use_refresh_token: true + id_token_attribute_name: preferred_username + + sidecar: + dashboards: + enabled: true + label: grafana_dashboard + labelValue: "1" + searchNamespace: ALL + folderAnnotation: grafana_folder + provider: + allowUiUpdates: false + datasources: + enabled: true + label: grafana_datasource + labelValue: "1" + searchNamespace: ALL + + resources: + requests: + cpu: 100m + memory: 256Mi + limits: + cpu: 500m + memory: 512Mi + + destination: + server: https://kubernetes.default.svc + namespace: grafana + + syncPolicy: + automated: + prune: true + selfHeal: true + enabled: true + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + - ServerSideApply=true diff --git a/proxmox/argocd/headlamp.yaml b/proxmox/argocd/headlamp.yaml new file mode 100644 index 0000000..32baca7 --- /dev/null +++ b/proxmox/argocd/headlamp.yaml @@ -0,0 +1,34 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: headlamp + namespace: argocd +spec: + project: default + source: + repoURL: https://kubernetes-sigs.github.io/headlamp/ + targetRevision: 0.45.0 + chart: headlamp + helm: + valuesObject: + resources: + requests: + cpu: 20m + memory: 32Mi + limits: + cpu: 100m + memory: 64Mi + + destination: + server: https://kubernetes.default.svc + namespace: headlamp + + syncPolicy: + automated: + prune: true + selfHeal: true + enabled: true + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + - ServerSideApply=true diff --git a/proxmox/argocd/infisical-pki-issuer.yaml b/proxmox/argocd/infisical-pki-issuer.yaml new file mode 100644 index 0000000..b431910 --- /dev/null +++ b/proxmox/argocd/infisical-pki-issuer.yaml @@ -0,0 +1,27 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: infisical-pki-issuer + namespace: argocd +spec: + project: default + source: + repoURL: https://dl.cloudsmith.io/public/infisical/helm-charts/helm/charts/ + chart: infisical-pki-issuer + targetRevision: "*" + helm: + releaseName: infisical-pki-issuer + + destination: + server: https://kubernetes.default.svc + namespace: infisical-pki-issuer + + syncPolicy: + automated: + prune: true + selfHeal: true + enabled: true + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + - ServerSideApply=true diff --git a/proxmox/argocd/istio-base.yaml b/proxmox/argocd/istio-base.yaml new file mode 100644 index 0000000..3c991b7 --- /dev/null +++ b/proxmox/argocd/istio-base.yaml @@ -0,0 +1,32 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: istio-base + namespace: argocd +spec: + project: default + source: + repoURL: https://istio-release.storage.googleapis.com/charts + targetRevision: 1.30.3 + chart: base + + ignoreDifferences: + - group: admissionregistration.k8s.io + kind: ValidatingWebhookConfiguration + name: istiod-default-validator + jqPathExpressions: + - .webhooks[]?.failurePolicy + + destination: + server: https://kubernetes.default.svc + namespace: istio-system + + syncPolicy: + automated: + prune: true + selfHeal: true + enabled: true + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + - ServerSideApply=true diff --git a/proxmox/argocd/istiod.yaml b/proxmox/argocd/istiod.yaml new file mode 100644 index 0000000..372a27f --- /dev/null +++ b/proxmox/argocd/istiod.yaml @@ -0,0 +1,35 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: istiod + namespace: argocd +spec: + project: default + source: + repoURL: https://istio-release.storage.googleapis.com/charts + targetRevision: 1.30.3 + chart: istiod + helm: + valuesObject: + replicaCount: 0 + + ignoreDifferences: + - group: admissionregistration.k8s.io + kind: ValidatingWebhookConfiguration + name: istio-validator-istio-system + jqPathExpressions: + - .webhooks[]?.failurePolicy + + destination: + server: https://kubernetes.default.svc + namespace: istio-system + + syncPolicy: + automated: + prune: true + selfHeal: true + enabled: true + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + - ServerSideApply=true diff --git a/proxmox/argocd/jellyfin.yaml b/proxmox/argocd/jellyfin.yaml new file mode 100644 index 0000000..6a700b3 --- /dev/null +++ b/proxmox/argocd/jellyfin.yaml @@ -0,0 +1,42 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: jellyfin + namespace: argocd +spec: + project: default + source: + repoURL: https://jellyfin.github.io/jellyfin-helm + targetRevision: 3.2.0 + chart: jellyfin + helm: + valuesObject: + replicaCount: 1 + persistence: + config: + size: 16Gi + media: + size: 100Gi + metrics: + enabled: true + resources: + requests: + cpu: 1000m + memory: 512Mi + limits: + cpu: 4000m + memory: 2Gi + + destination: + server: https://kubernetes.default.svc + namespace: jellyfin + + syncPolicy: + automated: + prune: true + selfHeal: true + enabled: true + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + - ServerSideApply=true diff --git a/proxmox/argocd/manifests.yaml b/proxmox/argocd/manifests.yaml new file mode 100644 index 0000000..457ce4e --- /dev/null +++ b/proxmox/argocd/manifests.yaml @@ -0,0 +1,30 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: manifests + namespace: argocd + annotations: + argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true +spec: + project: default + source: + repoURL: https://git.itqdev.xyz/Infrastructure/homelab.git + targetRevision: main + path: proxmox/manifests + + directory: + recurse: true + + destination: + server: https://kubernetes.default.svc + namespace: default + + syncPolicy: + automated: + prune: true + selfHeal: true + enabled: true + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + - ServerSideApply=true diff --git a/proxmox/argocd/mediamtx.yaml b/proxmox/argocd/mediamtx.yaml new file mode 100644 index 0000000..d8dc504 --- /dev/null +++ b/proxmox/argocd/mediamtx.yaml @@ -0,0 +1,37 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: mediamtx + namespace: argocd +spec: + project: default + source: + repoURL: https://startechnica.github.io/apps + chart: mediamtx + targetRevision: 0.1.1 + helm: + valuesObject: + service: + type: LoadBalancer + configs: + existingConfigMapName: mediamtx-custom + resources: + requests: + cpu: 100m + memory: 128Mi + limits: + cpu: 1000m + memory: 1Gi + + destination: + server: https://kubernetes.default.svc + namespace: mediamtx + + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + - ServerSideApply=true diff --git a/proxmox/argocd/metrics-server.yaml b/proxmox/argocd/metrics-server.yaml new file mode 100644 index 0000000..d7477a4 --- /dev/null +++ b/proxmox/argocd/metrics-server.yaml @@ -0,0 +1,38 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: metrics-server + namespace: argocd +spec: + project: default + source: + repoURL: https://kubernetes-sigs.github.io/metrics-server/ + targetRevision: 3.14.0 + chart: metrics-server + helm: + valuesObject: + args: + - --kubelet-insecure-tls + metrics: + enabled: true + resources: + requests: + cpu: 50m + memory: 100Mi + limits: + cpu: 50m + memory: 100Mi + + destination: + server: https://kubernetes.default.svc + namespace: metrics-server + + syncPolicy: + automated: + prune: true + selfHeal: true + enabled: true + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + - ServerSideApply=true diff --git a/proxmox/argocd/minecraft.yaml b/proxmox/argocd/minecraft.yaml new file mode 100644 index 0000000..bc62299 --- /dev/null +++ b/proxmox/argocd/minecraft.yaml @@ -0,0 +1,54 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: minecraft + namespace: argocd +spec: + project: default + source: + repoURL: https://itzg.github.io/minecraft-server-charts/ + targetRevision: 5.2.0 + chart: minecraft + helm: + valuesObject: + image: + repository: ghcr.io/itzg/minecraft-server + serviceAnnotations: + lbipam.cilium.io/ips: 10.13.46.11 + replicaCount: 1 + minecraftServer: + eula: "TRUE" + difficulty: hard + type: PAPER + motd: '§l §r §c§l|\/|1|\|3(r4f7 1|\| |" + echo -e " Adds an extra address to the subject alternative name of every" + echo -e " agent listener certificate, on top of the ip and dns entries of" + echo -e " each manager node in config.yml. Repeat it for more than one." + echo -e " It is how to name an address agents dial that no single node" + echo -e " owns, such as a load balancer shared by every node of a cluster." + echo -e " Must be used along with one of these options: -A, -wm" + echo -e "" + echo -e " -ap, --api-san " + echo -e " Adds an extra address to the subject alternative name of every" + echo -e " Server API certificate, on top of the ip and dns entries of each" + echo -e " manager node in config.yml and loopback. Repeat it for more than" + echo -e " one. Use it for the address API clients dial, such as a published" + echo -e " name or a load balancer in front of the Server API." + echo -e " Must be used along with one of these options: -A, -wm" + echo -e "" + echo -e " -A, --all" + echo -e " Creates certificates specified in config.yml and admin certificates." + echo -e " If there is no root CA in the CA directory, a new one is created there." + echo -e "" + echo -e " -ca, --root-ca-certificates" + echo -e " Creates the root CA in the CA directory, if it does not exist yet." + echo -e "" + echo -e " -lb, --load-balancer-certificates" + echo -e " Creates the certificates of the load_balancer entries of config.yml." + echo -e " Only needed by a proxy that terminates" + echo -e " TLS: it is then the certificate agents validate, signed by the same" + echo -e " root-ca they pin. A layer 4 passthrough load balancer terminates" + echo -e " nothing and needs -as|--agent-san instead." + echo -e "" + echo -e " -v, --verbose" + echo -e " Enables verbose mode." + echo -e "" + echo -e " -wd, --wazuh-dashboard-certificates" + echo -e " Creates the Wazuh dashboard certificates." + echo -e "" + echo -e " -wi, --wazuh-indexer-certificates" + echo -e " Creates the Wazuh indexer certificates." + echo -e "" + echo -e " -wm, --wazuh-manager-certificates" + echo -e " Creates the Wazuh manager certificates." + echo -e " Each manager node also gets -remoted.pem and -remoted-key.pem," + echo -e " the certificate of the agent listener (remoted and authd), and" + echo -e " -apid.pem and -apid-key.pem, the certificate of the Server API." + echo -e "" + echo -e " -tmp, --cert_tmp_path " + echo -e " Uses this directory to create the certificates, instead of a new one in /tmp." + echo -e " The directory must not exist, or must be an empty directory owned by root." + echo -e " Must be used along with one of these options: -a, -A, -ca, -wi, -wd, -wm, -lb" + echo -e "" + echo -e "ROOT CA" + echo -e " The root CA is read from $(wazuh_ca_get_dir 2>/dev/null), or from the directory set in WAZUH_CA_DIR." + echo -e " Its private key, root-ca.key, stays there and is never copied to the wazuh-certificates directory." + echo -e " The tool must be run as root." + echo -e "" + + exit 1 + +} + +function main() { + + # Set a restrictive umask so new regular files default to 600 and directories to 700, + # limiting access to the current user. + umask 0077 + + # The shared credentials library only creates and reads the root CA as root. + common_checkRoot + cert_checkOpenSSL + + declare -a agent_san=() + declare -a api_san=() + + if [ -n "${1}" ]; then + while [ -n "${1}" ] + do + case "${1}" in + "-a"|"--admin-certificates") + cert_rejectCAPaths "-a|--admin-certificates" "${2}" + cadmin=1 + shift 1 + ;; + "-A"|"--all") + cert_rejectCAPaths "-A|--all" "${2}" + all=1 + shift 1 + ;; + "-as"|"--agent-san") + if [[ -z "${2}" || "${2}" == -* ]]; then + common_logger -e "Error on arguments. Probably missing after -as|--agent-san" + getHelp + exit 1 + else + agent_san+=("${2}") + shift 2 + fi + ;; + "-ap"|"--api-san") + if [[ -z "${2}" || "${2}" == -* ]]; then + common_logger -e "Error on arguments. Probably missing after -ap|--api-san" + getHelp + exit 1 + else + api_san+=("${2}") + shift 2 + fi + ;; + "-ca"|"--root-ca-certificates"|"--root-ca-certificate") + ca=1 + shift 1 + ;; + "-lb"|"--load-balancer-certificates") + cert_rejectCAPaths "-lb|--load-balancer-certificates" "${2}" + clb=1 + shift 1 + ;; + "-h"|"--help") + getHelp + ;; + "-v"|"--verbose") + debugEnabled=1 + shift 1 + ;; + "-wd"|"--wazuh-dashboard-certificates") + cert_rejectCAPaths "-wd|--wazuh-dashboard-certificates" "${2}" + cdashboard=1 + shift 1 + ;; + "-wi"|"--wazuh-indexer-certificates") + cert_rejectCAPaths "-wi|--wazuh-indexer-certificates" "${2}" + cindexer=1 + shift 1 + ;; + "-wm"|"--wazuh-manager-certificates") + cert_rejectCAPaths "-wm|--wazuh-manager-certificates" "${2}" + cmanager=1 + shift 1 + ;; + "-tmp"|"--cert_tmp_path") + if [[ -n "${3}" || ( "${cadmin}" == 1 || "${all}" == 1 || "${ca}" == 1 || "${cdashboard}" == 1 || "${cindexer}" == 1 || "${cmanager}" == 1 || "${clb}" == 1 ) ]]; then + if [[ -z "${2}" || ! "${2}" == /* ]]; then + common_logger -e "Error on arguments. Probably missing or path does not start with '/'." + getHelp + exit 1 + else + cert_tmp_path="${2}" + shift 2 + fi + else + common_logger -e "Error: -tmp must be used along with one of these options: -a, -A, -ca, -wi, -wd, -wm, -lb" + getHelp + exit 1 + fi + ;; + *) + echo "Unknown option: ${1}" + getHelp + esac + done + + common_logger "Verbose logging redirected to ${logfile}" + + cert_validateAgentSan + cert_validateApiSan + + if [[ -d "${base_path}"/wazuh-certificates ]]; then + if [ -n "$(ls -A "${base_path}"/wazuh-certificates)" ]; then + common_logger -e "Directory wazuh-certificates already exists in the same path as the script. Please, remove the certs directory to create new certificates." + exit 1 + fi + # Removed so the temporary directory is moved to this name and not inside it. + rmdir "${base_path}"/wazuh-certificates + fi + + cert_createTmpDir + + cert_readConfig + + if [[ -n "${all}" || -n "${cmanager}" ]]; then + cert_checkListenerReachability "warning" + fi + + if [ -n "${debugEnabled}" ]; then + debug="2>&1 | tee -a ${logfile}" + fi + + if [[ -n "${cadmin}" ]]; then + cert_checkRootCA + cert_generateAdmincertificate + common_logger "Admin certificates created." + cert_cleanFiles + cert_setpermisions + if [ -n "${debugEnabled}" ]; then + mv "${cert_tmp_path}" "${base_path}/wazuh-certificates" + else + mv "${cert_tmp_path}" "${base_path}/wazuh-certificates" > /dev/null 2>&1 + fi + fi + + if [[ -n "${all}" ]]; then + cert_checkRootCA "create" + cert_generateAdmincertificate + common_logger "Admin certificates created." + if cert_generateIndexercertificates; then + common_logger "Wazuh indexer certificates created." + fi + if cert_generateManagercertificates; then + common_logger "Wazuh manager certificates created." + fi + if cert_generateDashboardcertificates; then + common_logger "Wazuh dashboard certificates created." + fi + # Only when config.yml carries a load_balancer section: it is optional and + # its absence is not an error. + if cert_generateLoadbalancercertificates; then + common_logger "Load balancer certificates created." + fi + cert_cleanFiles + cert_setpermisions + if [ -n "${debugEnabled}" ]; then + mv "${cert_tmp_path}" "${base_path}/wazuh-certificates" + else + mv "${cert_tmp_path}" "${base_path}/wazuh-certificates" > /dev/null 2>&1 + fi + cert_verifyRemotedcertificates "${base_path}/wazuh-certificates" + cert_verifyLoadbalancercertificates "${base_path}/wazuh-certificates" + fi + + if [[ -n "${ca}" ]]; then + cert_generateRootCAcertificate + cp "${cert_ca_dir}/root-ca.pem" "${cert_tmp_path}/root-ca.pem" + common_logger "The root CA is in ${cert_ca_dir}. Its private key, root-ca.key, stays there." + cert_cleanFiles + cert_setpermisions + if [ -n "${debugEnabled}" ]; then + mv "${cert_tmp_path}" "${base_path}/wazuh-certificates" + else + mv "${cert_tmp_path}" "${base_path}/wazuh-certificates" > /dev/null 2>&1 + fi + fi + + if [[ -n "${cindexer}" ]]; then + if [ ${#indexer_node_names[@]} -gt 0 ]; then + cert_checkRootCA + cert_generateIndexercertificates + common_logger "Wazuh indexer certificates created." + cert_cleanFiles + cert_setpermisions + if [ -n "${debugEnabled}" ]; then + mv "${cert_tmp_path}" "${base_path}/wazuh-certificates" + else + mv "${cert_tmp_path}" "${base_path}/wazuh-certificates" > /dev/null 2>&1 + fi + else + common_logger -e "Indexer node not present in config.yml." + exit 1 + fi + fi + + if [[ -n "${cmanager}" ]]; then + if [ ${#manager_node_names[@]} -gt 0 ]; then + cert_checkRootCA + cert_generateManagercertificates + common_logger "Wazuh manager certificates created." + cert_cleanFiles + cert_setpermisions + if [ -n "${debugEnabled}" ]; then + mv "${cert_tmp_path}" "${base_path}/wazuh-certificates" + else + mv "${cert_tmp_path}" "${base_path}/wazuh-certificates" > /dev/null 2>&1 + fi + cert_verifyRemotedcertificates "${base_path}/wazuh-certificates" + else + common_logger -e "Manager node not present in config.yml." + exit 1 + fi + fi + + if [[ -n "${clb}" ]]; then + if [ ${#lb_node_names[@]} -gt 0 ]; then + cert_checkRootCA + cert_generateLoadbalancercertificates + common_logger "Load balancer certificates created." + cert_cleanFiles + cert_setpermisions + if [ -n "${debugEnabled}" ]; then + mv "${cert_tmp_path}" "${base_path}/wazuh-certificates" + else + mv "${cert_tmp_path}" "${base_path}/wazuh-certificates" > /dev/null 2>&1 + fi + cert_verifyLoadbalancercertificates "${base_path}/wazuh-certificates" + else + common_logger -e "Load balancer section not present in config.yml." + exit 1 + fi + fi + + if [[ -n "${cdashboard}" ]]; then + if [ ${#dashboard_node_names[@]} -gt 0 ]; then + cert_checkRootCA + cert_generateDashboardcertificates + common_logger "Wazuh dashboard certificates created." + cert_cleanFiles + cert_setpermisions + if [ -n "${debugEnabled}" ]; then + mv "${cert_tmp_path}" "${base_path}/wazuh-certificates" + else + mv "${cert_tmp_path}" "${base_path}/wazuh-certificates" > /dev/null 2>&1 + fi + else + common_logger -e "Dashboard node not present in config.yml." + exit 1 + fi + fi + + else + getHelp + fi + +} \ No newline at end of file diff --git a/proxmox/kustomize/wazuh/wazuh/wazuh-credentials.sh b/proxmox/kustomize/wazuh/wazuh/wazuh-credentials.sh new file mode 100644 index 0000000..45f4e16 --- /dev/null +++ b/proxmox/kustomize/wazuh/wazuh/wazuh-credentials.sh @@ -0,0 +1,957 @@ +#!/bin/sh + +# Shared credential helpers for Wazuh package scripts. +# +# This file is a library. Source it with: +# +# . /usr/share/wazuh-/lib/wazuh-credentials.sh +# +# Importing it performs no action and does not change the caller's shell +# options, umask, IFS, working directory, or traps. +# +# Public functions and return values +# ---------------------------------- +# wazuh_base_get_dir / wazuh_env_get_file +# Base: process WAZUH_BASE_DIR or /etc/wazuh. ENV: /credentials.env. +# The base cannot come from that file (circular lookup). Empty is invalid. +# Getters do not create anything; writers create missing parents safely. +# All helpers on a host MUST use the same base to share the same lock. +# wazuh_ca_get_dir +# Prints the resolved CA directory. Resolution order is the value in +# /credentials.env, then WAZUH_CA_DIR from the process +# environment, with /ca as default. Empty is invalid. +# WAZUH_CA_DIR moves only the CA, never the ENV or the lock. +# +# wazuh_ca_validate +# Returns 0 for a valid anchor, with or without its matching private key. +# Returns non-zero for an absent, partial, invalid, or insecure CA. +# +# wazuh_ca_ensure +# Creates root-ca.pem and root-ca.key only when both are absent. Existing +# material is validated and never regenerated. An anchor without a key is +# a valid external CA; a key without an anchor is an error. +# +# wazuh_env_get NAME +# Reads data only; unquoted values or single/double quoted single lines. +# Writes require a newline-terminated file; multiline values are rejected. +# Prints the last value assigned to NAME in credentials.env without +# sourcing the file. Returns 0 when found, 1 when absent, and 2 when the +# file or request is invalid. +# +# wazuh_env_set NAME VALUE +# Adds or replaces NAME inside the Wazuh-managed block only. +# +# wazuh_env_unset NAME +# Removes NAME from the Wazuh-managed block only. +# +# wazuh_password_generate +# Prints a 32-character password generated from /dev/urandom, drawn from +# the password character set below, with at least one character of each +# of its four classes. +# +# wazuh_password_validate VALUE +# Enforces 12-64 characters drawn only from the password character set +# A-Z a-z 0-9 . , _ + : @ % ^ = ~ -, with at least one uppercase letter, +# one lowercase letter, one digit and one symbol. The rejected value is +# never included in diagnostics. +# +# The library deliberately uses flock(1), GNU stat(1), OpenSSL, awk, and the +# usual Linux userland (including ln -T) on Debian- and RPM-based systems. +# Capture password output; do not use shell xtrace around secret operations. +# Pin BOTH helper files to matching versions: the manager uses private helpers. + +_wazuh_error() ( + printf '%s\n' "wazuh-credentials: $*" >&2 +) + +# Notices go to stderr too, so they never mix with the values callers capture. +_wazuh_info() ( + printf '%s\n' "wazuh-credentials: $*" >&2 +) + +wazuh_base_get_dir() ( + _wazuh_base=${WAZUH_BASE_DIR-/etc/wazuh} + _wazuh_validate_absolute_path "$_wazuh_base" || return 1 + printf '%s\n' "$_wazuh_base" +) + +wazuh_env_get_file() ( + _wazuh_base=$(wazuh_base_get_dir) || return 1 + printf '%s/credentials.env\n' "$_wazuh_base" +) + +# Validate from the root down; never traverse an unchecked symlink first. +# Missing components are allowed by this read-only helper. +_wazuh_check_existing_tree() ( + [ "$1" = / ] && { _wazuh_validate_directory_node / ''; return $?; } + _wazuh_parent=${1%/*} + [ -n "$_wazuh_parent" ] || _wazuh_parent=/ + _wazuh_check_existing_tree "$_wazuh_parent" || return 1 + if [ -e "$1" ] || [ -L "$1" ]; then + _wazuh_validate_directory_node "$1" '' || return 1 + fi +) + +# Create one component at a time, never chmod/chown an existing directory. +# Parent validation excludes group/world writers, including sticky /tmp. +_wazuh_make_secure_tree() ( + [ "$(id -u)" = 0 ] || { _wazuh_error 'root is required'; return 1; } + [ "$1" = / ] && { _wazuh_validate_directory_node / ''; return $?; } + _wazuh_parent=${1%/*} + [ -n "$_wazuh_parent" ] || _wazuh_parent=/ + _wazuh_make_secure_tree "$_wazuh_parent" || return 1 + if [ ! -e "$1" ] && [ ! -L "$1" ]; then + # Another cooperating process may create it first; always revalidate. + (umask 077; mkdir -m 0700 -- "$1") 2>/dev/null || { + [ -d "$1" ] || { _wazuh_error "cannot create directory: $1"; return 1; } + } + fi + _wazuh_validate_directory_node "$1" '' +) + +_wazuh_validate_name() ( + case ${1-} in + ''|[0-9]*|*[!ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]*) + _wazuh_error "invalid environment variable name" + return 1 + ;; + esac +) + +_wazuh_validate_absolute_path() ( + _wazuh_path=${1-} + + case $_wazuh_path in + ''|/) + _wazuh_error "directory must be a non-empty absolute path other than /" + return 1 + ;; + /*) ;; + *) + _wazuh_error "directory must be an absolute path" + return 1 + ;; + esac + + case $_wazuh_path in + *'//'*) + _wazuh_error "directory must not contain repeated slashes" + return 1 + ;; + */./*|*/.|*/../*|*/..) + _wazuh_error "directory must not contain . or .. path components" + return 1 + ;; + */) + _wazuh_error "directory must not end with a slash" + return 1 + ;; + esac + + case $_wazuh_path in + *" +"*) + _wazuh_error "directory must not contain a newline" + return 1 + ;; + esac + _wazuh_cr=$(printf '\r') + case $_wazuh_path in + *"$_wazuh_cr"*) + _wazuh_error "directory must not contain a carriage return" + return 1 + ;; + esac +) + +_wazuh_validate_directory_node() ( + _wazuh_path=${1-} + _wazuh_exact_mode=${2-} + + if [ -L "$_wazuh_path" ]; then + _wazuh_error "refusing symbolic-link directory: $_wazuh_path" + return 1 + fi + if [ ! -d "$_wazuh_path" ]; then + _wazuh_error "not a directory: $_wazuh_path" + return 1 + fi + + _wazuh_owner=$(stat -c '%u:%g' -- "$_wazuh_path" 2>/dev/null) || { + _wazuh_error "cannot inspect directory: $_wazuh_path" + return 1 + } + if [ "$_wazuh_owner" != '0:0' ]; then + _wazuh_error "directory must be owned by root:root: $_wazuh_path" + return 1 + fi + + _wazuh_mode=$(stat -c '%a' -- "$_wazuh_path" 2>/dev/null) || return 1 + if [ -n "$_wazuh_exact_mode" ]; then + if [ "$_wazuh_mode" != "$_wazuh_exact_mode" ]; then + _wazuh_error "directory $_wazuh_path must have mode $_wazuh_exact_mode (found $_wazuh_mode)" + return 1 + fi + return 0 + fi + + _wazuh_world=${_wazuh_mode#${_wazuh_mode%?}} + _wazuh_prefix=${_wazuh_mode%?} + _wazuh_group=${_wazuh_prefix#${_wazuh_prefix%?}} + case $_wazuh_group$_wazuh_world in + *[2367]*) + _wazuh_error "directory must not be group- or world-writable: $_wazuh_path" + return 1 + ;; + esac +) + +_wazuh_validate_ancestors() ( + _wazuh_parent=${1%/*} + [ -n "$_wazuh_parent" ] || _wazuh_parent=/ + _wazuh_check_existing_tree "$_wazuh_parent" || return 1 + _wazuh_validate_directory_node "$_wazuh_parent" '' +) +_wazuh_validate_regular_file() ( + _wazuh_path=${1-} + _wazuh_required_mode=${2-} + + if [ -L "$_wazuh_path" ]; then + _wazuh_error "refusing symbolic-link file: $_wazuh_path" + return 1 + fi + if [ ! -f "$_wazuh_path" ]; then + _wazuh_error "not a regular file: $_wazuh_path" + return 1 + fi + + _wazuh_owner=$(stat -c '%u:%g' -- "$_wazuh_path" 2>/dev/null) || { + _wazuh_error "cannot inspect file: $_wazuh_path" + return 1 + } + if [ "$_wazuh_owner" != '0:0' ]; then + _wazuh_error "file must be owned by root:root: $_wazuh_path" + return 1 + fi + + _wazuh_mode=$(stat -c '%a' -- "$_wazuh_path" 2>/dev/null) || return 1 + if [ "$_wazuh_mode" != "$_wazuh_required_mode" ]; then + _wazuh_error "file $_wazuh_path must have mode $_wazuh_required_mode (found $_wazuh_mode)" + return 1 + fi +) + +_wazuh_restorecon() ( + _wazuh_path=${1-} + if command -v restorecon >/dev/null 2>&1; then + restorecon "$_wazuh_path" >/dev/null 2>&1 || { + _wazuh_error "failed to restore the SELinux context of $_wazuh_path" + return 1 + } + fi +) + +_wazuh_validate_base_dir_if_present() ( + _wazuh_base=$(wazuh_base_get_dir) || return 1 + _wazuh_check_existing_tree "$_wazuh_base" || return 1 + if [ -e "$_wazuh_base" ] || [ -L "$_wazuh_base" ]; then + _wazuh_validate_directory_node "$_wazuh_base" 700 || return 1 + fi +) + +_wazuh_ensure_base_dir() ( + _wazuh_base=$(wazuh_base_get_dir) || return 1 + _wazuh_make_secure_tree "$_wazuh_base" || return 1 + _wazuh_validate_directory_node "$_wazuh_base" 700 || return 1 + _wazuh_restorecon "$_wazuh_base" +) + +_wazuh_validate_credentials_file() ( + _wazuh_validate_base_dir_if_present || return 1 + _wazuh_file=$(wazuh_env_get_file) || return 1 + _wazuh_validate_regular_file "$_wazuh_file" 600 +) + +_wazuh_with_lock() ( + _wazuh_ensure_base_dir || return 1 + _wazuh_base=$(wazuh_base_get_dir) || return 1 + _wazuh_lock=$_wazuh_base/.credentials.lock + + if [ -L "$_wazuh_lock" ]; then + _wazuh_error "refusing symbolic-link lock file: $_wazuh_lock" + return 1 + fi + if [ ! -e "$_wazuh_lock" ]; then + (umask 077; set -C; : >"$_wazuh_lock") 2>/dev/null || { + [ -e "$_wazuh_lock" ] || return 1 + } + _wazuh_restorecon "$_wazuh_lock" || return 1 + fi + _wazuh_validate_regular_file "$_wazuh_lock" 600 || return 1 + + exec 9<>"$_wazuh_lock" || { + _wazuh_error "cannot open lock file: $_wazuh_lock" + return 1 + } + flock -x 9 || { + _wazuh_error "cannot acquire lock: $_wazuh_lock" + return 1 + } + + "$@" +) + +wazuh_env_get() ( + [ "$#" -eq 1 ] || { _wazuh_error 'usage: wazuh_env_get NAME'; return 2; } + _wazuh_name=${1-} + _wazuh_validate_name "$_wazuh_name" || return 2 + _wazuh_file=$(wazuh_env_get_file) || return 2 + if [ ! -e "$_wazuh_file" ] && [ ! -L "$_wazuh_file" ]; then + _wazuh_validate_base_dir_if_present || return 2 + return 1 + fi + _wazuh_validate_credentials_file || return 2 + + awk -v wanted="$_wazuh_name" ' + function trim_left(s) { sub(/^[[:space:]]+/, "", s); return s } + function trim_right(s) { sub(/[[:space:]]+$/, "", s); return s } + function decode_double(s, out, i, c, n) { + out = "" + for (i = 1; i <= length(s); i++) { + c = substr(s, i, 1) + if (c == "\\" && i < length(s)) { + n = substr(s, i + 1, 1) + if (n == "\\" || n == "\"" || n == "$" || n == "`") { + out = out n + i++ + continue + } + } + out = out c + } + return out + } + { + line = trim_left($0) + if (line == "" || substr(line, 1, 1) == "#") + next + + equal = index(line, "=") + if (!equal) + next + + name = trim_right(substr(line, 1, equal - 1)) + if (name != wanted) + next + + value = trim_left(substr(line, equal + 1)) + value = trim_right(value) + if ((substr(value, 1, 1) == "\047" && substr(value, length(value), 1) != "\047") || + (substr(value, 1, 1) == "\"" && substr(value, length(value), 1) != "\"")) { + bad = 1 + next + } + if (length(value) >= 2 && substr(value, 1, 1) == "\047" && + substr(value, length(value), 1) == "\047") { + value = substr(value, 2, length(value) - 2) + } else if (length(value) >= 2 && substr(value, 1, 1) == "\"" && + substr(value, length(value), 1) == "\"") { + value = decode_double(substr(value, 2, length(value) - 2)) + } + result = value + found = 1 + } + END { + if (!found) + exit (bad ? 2 : 1) + if (bad) exit 2 + print result + } + ' "$_wazuh_file" +) + +_wazuh_env_mutate_locked() ( + _wazuh_action=${1-} + _wazuh_name=${2-} + _wazuh_value_file=${3-} + _wazuh_file=$(wazuh_env_get_file) || return 1 + _wazuh_base=$(wazuh_base_get_dir) || return 1 + + if [ -e "$_wazuh_file" ] || [ -L "$_wazuh_file" ]; then + _wazuh_validate_credentials_file || return 1 + if [ -s "$_wazuh_file" ] && [ "$(tail -c 1 -- "$_wazuh_file" | od -An -tu1 | tr -d '[:space:]')" != 10 ]; then + _wazuh_error 'credentials.env must end with a newline; refusing to alter operator bytes' + return 1 + fi + _wazuh_source=$_wazuh_file + else + if [ "$_wazuh_action" = unset ]; then + return 0 + fi + _wazuh_source=/dev/null + fi + + _wazuh_tmp=$(mktemp "$_wazuh_base/.credentials.env.XXXXXX") || { + _wazuh_error 'cannot create a temporary credentials file' + return 1 + } + trap 'rm -f -- "$_wazuh_tmp"' 0 + trap 'return 130' 1 2 3 15 + + if ! awk -v action="$_wazuh_action" -v wanted="$_wazuh_name" \ + -v value_file="$_wazuh_value_file" ' + function lhs_name(line, equal, lhs) { + sub(/^[[:space:]]+/, "", line) + if (substr(line, 1, 1) == "#") + return "" + equal = index(line, "=") + if (!equal) + return "" + lhs = substr(line, 1, equal - 1) + sub(/[[:space:]]+$/, "", lhs) + return lhs + } + function quote_value(s, out, i, c) { + # The password alphabet needs no quoting; anything else is still escaped. + if (s ~ /^[A-Za-z0-9.,_+:@%^=~-]*$/) + return s + out = "\"" + for (i = 1; i <= length(s); i++) { + c = substr(s, i, 1) + if (c == "\\" || c == "\"" || c == "$" || c == "`") + out = out "\\" + out = out c + } + return out "\"" + } + function print_header( i) { + for (i = 1; i <= header_lines; i++) + print header[i] + } + BEGIN { + begin_marker = "# >>> wazuh generated — do not edit <<<" + end_marker = "# >>> end wazuh generated <<<" + # The header follows the begin marker. Every header line, and the ones of earlier + # versions, is dropped from the block and printed again, so it is never duplicated. + header_lines = split("" \ + "# Written by the Wazuh packages and tools. Editing a value here changes nothing.\n" \ + "# To change a password: wazuh-passwords-tool.sh -u \n" \ + "# A host only holds the keys of the components installed on it.\n" \ + "#\n" \ + "# User Key Used for\n" \ + "# Logins:\n" \ + "# admin WAZUH_INDEXER_ADMIN_PASSWORD Wazuh dashboard (web UI) and Wazuh indexer API\n" \ + "# wazuh WAZUH_MANAGER_API_PASSWORD Wazuh server API (curl, scripts)\n" \ + "# Service accounts the components connect with, not logins:\n" \ + "# kibanaserver WAZUH_INDEXER_KIBANASERVER_PASSWORD dashboard to indexer\n" \ + "# wazuh-manager WAZUH_INDEXER_MANAGER_PASSWORD manager to indexer\n" \ + "# wazuh-internal-client WAZUH_MANAGER_WUI_PASSWORD dashboard to server API\n" \ + "#", header, "\n") + for (i = 1; i <= header_lines; i++) + known_header[header[i]] = 1 + # Header lines of earlier versions. + old_header_lines = split("" \ + "# Editing a value here does not change the deployment.\n" \ + "# To rotate, use wazuh-passwords-tool.sh.\n" \ + "# admin: login of the Wazuh dashboard and administrator of the indexer\n" \ + "# User Key Used for\n" \ + "# admin WAZUH_INDEXER_ADMIN_PASSWORD Wazuh dashboard (web UI) and Wazuh indexer API\n" \ + "# wazuh WAZUH_MANAGER_API_PASSWORD Wazuh server API (curl, scripts)\n" \ + "# kibanaserver WAZUH_INDEXER_KIBANASERVER_PASSWORD dashboard to indexer\n" \ + "# wazuh-manager WAZUH_INDEXER_MANAGER_PASSWORD manager to indexer\n" \ + "# wazuh-wui WAZUH_MANAGER_WUI_PASSWORD dashboard to server API", old_header, "\n") + for (i = 1; i <= old_header_lines; i++) + known_header[old_header[i]] = 1 + value = "" + if (action == "set") { + read_status = (getline value < value_file) + close(value_file) + if (read_status < 0) { + print "wazuh-credentials: cannot read temporary value" > "/dev/stderr" + exit 42 + } + assignment = wanted "=" quote_value(value) + } + } + $0 == begin_marker { + if (inside || begin_count > 0) { + bad = 1 + next + } + begin_count++ + inside = 1 + print + print_header() + next + } + $0 == end_marker { + if (!inside || end_count > 0) { + bad = 1 + next + } + if (action == "set" && !written) { + print assignment + written = 1 + } + end_count++ + inside = 0 + print + next + } + { + if (inside && ($0 in known_header)) + next + if (inside && lhs_name($0) == wanted) { + if (action == "set" && !written) { + print assignment + written = 1 + } + next + } + print + } + END { + if (inside || begin_count != end_count || begin_count > 1 || bad) { + print "wazuh-credentials: malformed Wazuh-managed block" > "/dev/stderr" + exit 42 + } + if (begin_count == 0 && action == "set") { + if (NR > 0) + print "" + print begin_marker + print_header() + print assignment + print end_marker + } + } + ' "$_wazuh_source" >"$_wazuh_tmp"; then + _wazuh_error 'credentials file was not modified' + return 1 + fi + + chown root:root "$_wazuh_tmp" || return 1 + chmod 0600 "$_wazuh_tmp" || return 1 + mv -f -- "$_wazuh_tmp" "$_wazuh_file" || { + _wazuh_error 'cannot replace credentials.env atomically' + return 1 + } + trap - 0 1 2 3 15 + _wazuh_restorecon "$_wazuh_file" || return 1 + _wazuh_validate_credentials_file +) + +wazuh_env_set() ( + if [ "$#" -ne 2 ]; then + _wazuh_error 'usage: wazuh_env_set NAME VALUE' + return 1 + fi + _wazuh_name=$1 + _wazuh_value=$2 + _wazuh_validate_name "$_wazuh_name" || return 1 + + case $_wazuh_value in + *" +"*) + _wazuh_error "value for $_wazuh_name must not contain a newline" + return 1 + ;; + esac + _wazuh_cr=$(printf '\r') + case $_wazuh_value in + *"$_wazuh_cr"*) + _wazuh_error "value for $_wazuh_name must not contain a carriage return" + return 1 + ;; + esac + + _wazuh_ensure_base_dir || return 1 + _wazuh_base=$(wazuh_base_get_dir) || return 1 + _wazuh_value_file=$(mktemp "$_wazuh_base/.credential-value.XXXXXX") || { + _wazuh_error 'cannot create a temporary value file' + return 1 + } + trap 'rm -f -- "$_wazuh_value_file"' 0 + trap 'return 130' 1 2 3 15 + chmod 0600 "$_wazuh_value_file" || return 1 + printf '%s' "$_wazuh_value" >"$_wazuh_value_file" || return 1 + + _wazuh_with_lock _wazuh_env_mutate_locked set "$_wazuh_name" "$_wazuh_value_file" +) + +wazuh_env_unset() ( + if [ "$#" -ne 1 ]; then + _wazuh_error 'usage: wazuh_env_unset NAME' + return 1 + fi + _wazuh_validate_name "$1" || return 1 + _wazuh_with_lock _wazuh_env_mutate_locked unset "$1" '' +) + +wazuh_ca_get_dir() ( + _wazuh_ca_dir= + _wazuh_ca_dir_is_set=0 + + _wazuh_status=0 + _wazuh_file_value=$(wazuh_env_get WAZUH_CA_DIR) || _wazuh_status=$? + case $_wazuh_status in + 0) + _wazuh_ca_dir=$_wazuh_file_value + _wazuh_ca_dir_is_set=1 + ;; + 1) ;; + *) return 1 ;; + esac + + if [ "${WAZUH_CA_DIR+x}" = x ]; then + _wazuh_ca_dir=${WAZUH_CA_DIR-} + _wazuh_ca_dir_is_set=1 + fi + + if [ "$_wazuh_ca_dir_is_set" -eq 0 ]; then + _wazuh_base=$(wazuh_base_get_dir) || return 1 + _wazuh_ca_dir=$_wazuh_base/ca + fi + + _wazuh_validate_absolute_path "$_wazuh_ca_dir" || return 1 + printf '%s\n' "$_wazuh_ca_dir" +) + +_wazuh_validate_ca_files() ( + _wazuh_ca_dir=${1-} + _wazuh_cert=$_wazuh_ca_dir/root-ca.pem + _wazuh_key=$_wazuh_ca_dir/root-ca.key + + _wazuh_validate_ancestors "$_wazuh_ca_dir" || return 1 + _wazuh_validate_directory_node "$_wazuh_ca_dir" 700 || return 1 + + _wazuh_cert_exists=0 + _wazuh_key_exists=0 + if [ -e "$_wazuh_cert" ] || [ -L "$_wazuh_cert" ]; then + _wazuh_cert_exists=1 + fi + if [ -e "$_wazuh_key" ] || [ -L "$_wazuh_key" ]; then + _wazuh_key_exists=1 + fi + + if [ "$_wazuh_cert_exists" -eq 0 ] && [ "$_wazuh_key_exists" -eq 0 ]; then + _wazuh_error "CA material is absent from $_wazuh_ca_dir" + return 1 + fi + if [ "$_wazuh_cert_exists" -eq 0 ]; then + _wazuh_error "root-ca.key exists without root-ca.pem in $_wazuh_ca_dir" + return 1 + fi + + _wazuh_validate_regular_file "$_wazuh_cert" 644 || return 1 + if ! openssl x509 -in "$_wazuh_cert" -noout >/dev/null 2>&1; then + _wazuh_error "invalid X.509 certificate: $_wazuh_cert" + return 1 + fi + if ! openssl x509 -in "$_wazuh_cert" -checkend 0 -noout >/dev/null 2>&1; then + _wazuh_error "expired X.509 certificate: $_wazuh_cert" + return 1 + fi + _wazuh_text=$(LC_ALL=C openssl x509 -in "$_wazuh_cert" -noout -text 2>/dev/null) || return 1 + case $_wazuh_text in + *'CA:TRUE'*) ;; + *) _wazuh_error "certificate is not a CA: $_wazuh_cert"; return 1 ;; + esac + openssl verify -CAfile "$_wazuh_cert" "$_wazuh_cert" >/dev/null 2>&1 || { + _wazuh_error "CA certificate is not currently valid: $_wazuh_cert" + return 1 + } + + # Anchor-only is the expected state for an externally managed CA. + if [ "$_wazuh_key_exists" -eq 0 ]; then + return 0 + fi + + _wazuh_validate_regular_file "$_wazuh_key" 400 || return 1 + if ! openssl pkey -in "$_wazuh_key" -passin pass: -check -noout /dev/null 2>&1; then + _wazuh_error "invalid private key: $_wazuh_key" + return 1 + fi + + _wazuh_cert_pub=$(mktemp "$_wazuh_ca_dir/.cert-pub.XXXXXX") || return 1 + _wazuh_key_pub=$(mktemp "$_wazuh_ca_dir/.key-pub.XXXXXX") || { + rm -f -- "$_wazuh_cert_pub" + return 1 + } + trap 'rm -f -- "$_wazuh_cert_pub" "$_wazuh_key_pub"' 0 + trap 'return 130' 1 2 3 15 + chmod 0600 "$_wazuh_cert_pub" "$_wazuh_key_pub" || return 1 + + openssl x509 -in "$_wazuh_cert" -pubkey -noout >"$_wazuh_cert_pub" 2>/dev/null || return 1 + openssl pkey -in "$_wazuh_key" -passin pass: -pubout "$_wazuh_key_pub" 2>/dev/null || return 1 + if ! cmp -s -- "$_wazuh_cert_pub" "$_wazuh_key_pub"; then + _wazuh_error 'root-ca.key does not match root-ca.pem' + return 1 + fi + + rm -f -- "$_wazuh_cert_pub" "$_wazuh_key_pub" + trap - 0 1 2 3 15 +) + +_wazuh_ensure_ca_directory() ( + _wazuh_ca_dir=${1-} + _wazuh_validate_absolute_path "$_wazuh_ca_dir" || return 1 + + if [ -L "$_wazuh_ca_dir" ]; then + _wazuh_error "refusing symbolic-link CA directory: $_wazuh_ca_dir" + return 1 + fi + if [ ! -e "$_wazuh_ca_dir" ]; then + _wazuh_make_secure_tree "$_wazuh_ca_dir" || { + _wazuh_error "cannot create CA directory: $_wazuh_ca_dir" + return 1 + } + _wazuh_restorecon "$_wazuh_ca_dir" || return 1 + fi + + _wazuh_validate_ancestors "$_wazuh_ca_dir" || return 1 + _wazuh_validate_directory_node "$_wazuh_ca_dir" 700 +) + +_wazuh_ca_validate_locked() ( + _wazuh_ca_dir=$(wazuh_ca_get_dir) || return 1 + _wazuh_validate_ca_files "$_wazuh_ca_dir" +) + +wazuh_ca_validate() ( + _wazuh_with_lock _wazuh_ca_validate_locked +) + +_wazuh_ca_ensure_locked() ( + _wazuh_ca_dir=$(wazuh_ca_get_dir) || return 1 + _wazuh_ensure_ca_directory "$_wazuh_ca_dir" || return 1 + + _wazuh_cert=$_wazuh_ca_dir/root-ca.pem + _wazuh_key=$_wazuh_ca_dir/root-ca.key + + _wazuh_cert_exists=0 + _wazuh_key_exists=0 + if [ -e "$_wazuh_cert" ] || [ -L "$_wazuh_cert" ]; then + _wazuh_cert_exists=1 + fi + if [ -e "$_wazuh_key" ] || [ -L "$_wazuh_key" ]; then + _wazuh_key_exists=1 + fi + + if [ "$_wazuh_cert_exists" -eq 1 ] || [ "$_wazuh_key_exists" -eq 1 ]; then + _wazuh_validate_ca_files "$_wazuh_ca_dir" + return $? + fi + + command -v openssl >/dev/null 2>&1 || { + _wazuh_error 'openssl is required to generate the root CA' + return 1 + } + + _wazuh_tmp_dir=$(mktemp -d "$_wazuh_ca_dir/.root-ca.XXXXXX") || { + _wazuh_error "cannot create a temporary directory in $_wazuh_ca_dir" + return 1 + } + trap 'rm -rf -- "$_wazuh_tmp_dir"' 0 + trap 'return 130' 1 2 3 15 + chmod 0700 "$_wazuh_tmp_dir" || return 1 + _wazuh_config=$_wazuh_tmp_dir/openssl.cnf + + (umask 077; printf '%s\n' \ + '[req]' \ + 'distinguished_name = dn' \ + 'x509_extensions = v3_ca' \ + 'prompt = no' \ + '[dn]' \ + 'OU = Wazuh' \ + 'O = Wazuh' \ + 'L = California' \ + '[v3_ca]' \ + 'basicConstraints = critical, CA:TRUE' \ + 'keyUsage = critical, keyCertSign, cRLSign' \ + 'subjectKeyIdentifier = hash' \ + 'authorityKeyIdentifier = keyid:always' \ + >"$_wazuh_config") || return 1 + + if ! (umask 077; openssl req -x509 -new -nodes -newkey rsa:2048 \ + -sha256 -days 3650 -batch -config "$_wazuh_config" \ + -keyout "$_wazuh_tmp_dir/root-ca.key" \ + -out "$_wazuh_tmp_dir/root-ca.pem" >/dev/null 2>&1); then + _wazuh_error 'OpenSSL failed to generate the root CA' + return 1 + fi + + chown root:root "$_wazuh_tmp_dir/root-ca.key" "$_wazuh_tmp_dir/root-ca.pem" || return 1 + chmod 0400 "$_wazuh_tmp_dir/root-ca.key" || return 1 + chmod 0644 "$_wazuh_tmp_dir/root-ca.pem" || return 1 + + # Publishing the key first (hard links refuse existing targets) makes an interrupted installation fail closed as an + # explicit key-without-certificate state instead of silently looking like + # an externally managed anchor. + ln -T -- "$_wazuh_tmp_dir/root-ca.key" "$_wazuh_key" || return 1 + ln -T -- "$_wazuh_tmp_dir/root-ca.pem" "$_wazuh_cert" || return 1 + _wazuh_restorecon "$_wazuh_key" || return 1 + _wazuh_restorecon "$_wazuh_cert" || return 1 + + rm -rf -- "$_wazuh_tmp_dir" + trap - 0 1 2 3 15 + _wazuh_validate_ca_files "$_wazuh_ca_dir" || return 1 + _wazuh_info "created a new CA in $_wazuh_ca_dir. Hosts of the same deployment must share one CA: use the installation assistant, or place this CA in $_wazuh_ca_dir on the other hosts before installing their packages." +) + +wazuh_ca_ensure() ( + _wazuh_with_lock _wazuh_ca_ensure_locked +) + +_wazuh_random_below() ( + _wazuh_limit=${1-} + case $_wazuh_limit in + ''|*[!0-9]*|0) return 1 ;; + esac + + _wazuh_ceiling=$((65536 - (65536 % _wazuh_limit))) + while :; do + _wazuh_number=$(od -An -N2 -tu2 /dev/urandom 2>/dev/null) || return 1 + _wazuh_number=$(printf '%s' "$_wazuh_number" | tr -d '[:space:]') + case $_wazuh_number in + ''|*[!0-9]*) return 1 ;; + esac + if [ "$_wazuh_number" -lt "$_wazuh_ceiling" ]; then + printf '%s\n' $((_wazuh_number % _wazuh_limit)) + return 0 + fi + done +) + +_wazuh_random_char() ( + _wazuh_alphabet=${1-} + _wazuh_length=${#_wazuh_alphabet} + [ "$_wazuh_length" -gt 0 ] || return 1 + _wazuh_index=$(_wazuh_random_below "$_wazuh_length") || return 1 + _wazuh_position=$((_wazuh_index + 1)) + printf '%s' "$_wazuh_alphabet" | cut -c "$_wazuh_position" +) + +_wazuh_replace_char() ( + _wazuh_text=${1-} + _wazuh_position=${2-} + _wazuh_character=${3-} + + if [ "$_wazuh_position" -le 1 ]; then + _wazuh_prefix= + else + _wazuh_prefix=$(printf '%s' "$_wazuh_text" | cut -c "1-$((_wazuh_position - 1))") + fi + _wazuh_suffix=$(printf '%s' "$_wazuh_text" | cut -c "$((_wazuh_position + 1))-" ) + printf '%s%s%s' "$_wazuh_prefix" "$_wazuh_character" "$_wazuh_suffix" +) + +wazuh_password_generate() ( + # The password character set; wazuh_password_validate accepts exactly this. + _wazuh_alphabet='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.,_+:@%^=~-' + + # Finite entropy reads avoid SIGPIPE under a caller's pipefail. Rejection + # sampling (bytes < 219 for a 73-character alphabet) avoids modulo bias. + _wazuh_password= + while [ "${#_wazuh_password}" -lt 32 ]; do + _wazuh_bytes=$(od -An -v -N128 -tu1 /dev/urandom) || return 1 + [ -n "$_wazuh_bytes" ] || return 1 + _wazuh_chunk=$(printf '%s\n' "$_wazuh_bytes" | awk -v a="$_wazuh_alphabet" ' + { for (i=1; i<=NF; i++) if ($i < 219) printf "%s", substr(a, ($i % 73)+1, 1) } + ') || return 1 + _wazuh_password=$_wazuh_password$_wazuh_chunk + done + _wazuh_password=$(printf '%s' "$_wazuh_password" | cut -c 1-32) || return 1 + + _wazuh_index=$(_wazuh_random_below 32) || return 1 + _wazuh_pos_lower=$((_wazuh_index + 1)) + while :; do + _wazuh_index=$(_wazuh_random_below 32) || return 1 + _wazuh_pos_upper=$((_wazuh_index + 1)) + [ "$_wazuh_pos_upper" -ne "$_wazuh_pos_lower" ] && break + done + while :; do + _wazuh_index=$(_wazuh_random_below 32) || return 1 + _wazuh_pos_digit=$((_wazuh_index + 1)) + if [ "$_wazuh_pos_digit" -ne "$_wazuh_pos_lower" ] && + [ "$_wazuh_pos_digit" -ne "$_wazuh_pos_upper" ]; then + break + fi + done + while :; do + _wazuh_index=$(_wazuh_random_below 32) || return 1 + _wazuh_pos_symbol=$((_wazuh_index + 1)) + if [ "$_wazuh_pos_symbol" -ne "$_wazuh_pos_lower" ] && + [ "$_wazuh_pos_symbol" -ne "$_wazuh_pos_upper" ] && + [ "$_wazuh_pos_symbol" -ne "$_wazuh_pos_digit" ]; then + break + fi + done + + _wazuh_char=$(_wazuh_random_char 'abcdefghijklmnopqrstuvwxyz') || return 1 + _wazuh_password=$(_wazuh_replace_char "$_wazuh_password" "$_wazuh_pos_lower" "$_wazuh_char") || return 1 + _wazuh_char=$(_wazuh_random_char 'ABCDEFGHIJKLMNOPQRSTUVWXYZ') || return 1 + _wazuh_password=$(_wazuh_replace_char "$_wazuh_password" "$_wazuh_pos_upper" "$_wazuh_char") || return 1 + _wazuh_char=$(_wazuh_random_char '0123456789') || return 1 + _wazuh_password=$(_wazuh_replace_char "$_wazuh_password" "$_wazuh_pos_digit" "$_wazuh_char") || return 1 + _wazuh_char=$(_wazuh_random_char '.,_+:@%^=~-') || return 1 + _wazuh_password=$(_wazuh_replace_char "$_wazuh_password" "$_wazuh_pos_symbol" "$_wazuh_char") || return 1 + + wazuh_password_validate "$_wazuh_password" >/dev/null || return 1 + printf '%s\n' "$_wazuh_password" +) + +wazuh_password_validate() ( + if [ "$#" -ne 1 ]; then + _wazuh_error 'usage: wazuh_password_validate VALUE' + return 1 + fi + _wazuh_password=$1 + + # Only the generator's character set, spelled out rather than as ranges so + # the match does not depend on the locale. It is checked first because it + # makes every accepted value ASCII: the length below then means the same + # under dash (bytes) as under bash and the consumers (characters). It also + # excludes whitespace, control characters (newline and carriage return + # included), quotes and the characters that need escaping in the file, in + # a shell or in an HTTP Basic credential. + case $_wazuh_password in + *[!ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.,_+:@%^=~-]*) + _wazuh_error 'password must only contain characters from A-Z a-z 0-9 . , _ + : @ % ^ = ~ -' + return 1 + ;; + esac + + _wazuh_length=${#_wazuh_password} + if [ "$_wazuh_length" -lt 12 ] || [ "$_wazuh_length" -gt 64 ]; then + _wazuh_error 'password must contain between 12 and 64 characters' + return 1 + fi + case $_wazuh_password in + *[abcdefghijklmnopqrstuvwxyz]*) ;; + *) + _wazuh_error 'password must contain at least one lowercase letter' + return 1 + ;; + esac + case $_wazuh_password in + *[ABCDEFGHIJKLMNOPQRSTUVWXYZ]*) ;; + *) + _wazuh_error 'password must contain at least one uppercase letter' + return 1 + ;; + esac + case $_wazuh_password in + *[0123456789]*) ;; + *) + _wazuh_error 'password must contain at least one digit' + return 1 + ;; + esac + case $_wazuh_password in + *[.,_+:@%^=~-]*) ;; + *) + _wazuh_error 'password must contain at least one symbol from . , _ + : @ % ^ = ~ -' + return 1 + ;; + esac +) diff --git a/proxmox/kustomize/wazuh/wazuh/wazuh_agents/falco-agent-ds.yaml b/proxmox/kustomize/wazuh/wazuh/wazuh_agents/falco-agent-ds.yaml new file mode 100644 index 0000000..dcb2e42 --- /dev/null +++ b/proxmox/kustomize/wazuh/wazuh/wazuh_agents/falco-agent-ds.yaml @@ -0,0 +1,116 @@ +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: wazuh-falco-agent +spec: + selector: + matchLabels: + app: wazuh-falco-agent + template: + metadata: + labels: + app: wazuh-falco-agent + spec: + automountServiceAccountToken: false + securityContext: + seccompProfile: + type: RuntimeDefault + volumes: + - name: agent-etc + hostPath: + path: /var/lib/wazuh-falco-agent/etc + type: DirectoryOrCreate + - name: falco-events + hostPath: + path: /var/log/falco + type: Directory + initContainers: + - name: initialize-agent-etc + image: wazuh/wazuh-agent:5.0.0-rc1 + command: + - /bin/sh + - -c + - | + set -eu + if [ ! -f /agent-etc/ossec.conf ]; then + cp -a /var/ossec/etc/. /agent-etc/ + fi + if ! grep -Fq '/var/log/falco/events.json' /agent-etc/ossec.conf; then + cat >> /agent-etc/ossec.conf <<'EOF' + + + + /var/log/falco/events.json + json + + + EOF + fi + chown root:101 /agent-etc + chmod 0750 /agent-etc + for config in ossec.conf internal_options.conf local_internal_options.conf; do + if [ -f "/agent-etc/$config" ]; then + chown root:101 "/agent-etc/$config" + chmod 0640 "/agent-etc/$config" + fi + done + # The unprivileged agent writes downloaded shared configuration here. + chown 101:101 /agent-etc/shared + chmod 0750 /agent-etc/shared + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: ["ALL"] + add: ["CHOWN", "DAC_OVERRIDE", "FOWNER"] + volumeMounts: + - name: agent-etc + mountPath: /agent-etc + containers: + - name: wazuh-agent + image: wazuh/wazuh-agent:5.0.0-rc1 + resources: + requests: + cpu: 100m + memory: 64Mi + limits: + cpu: 300m + memory: 512Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: ["ALL"] + # The packaged agent drops privileges to its wazuh user. + add: ["CHOWN", "DAC_OVERRIDE", "FOWNER", "KILL", "SETGID", "SETUID", "SYS_CHROOT"] + startupProbe: + exec: + command: + - /bin/sh + - -c + - 'status=$(/var/ossec/bin/wazuh-control status) && ! printf "%s\n" "$status" | grep -q "not running"' + periodSeconds: 10 + timeoutSeconds: 10 + failureThreshold: 24 + readinessProbe: + exec: + command: + - /bin/sh + - -c + - 'status=$(/var/ossec/bin/wazuh-control status) && ! printf "%s\n" "$status" | grep -q "not running"' + periodSeconds: 30 + timeoutSeconds: 10 + env: + - name: WAZUH_AGENT_NAME + valueFrom: + fieldRef: + fieldPath: spec.nodeName + - name: WAZUH_ENROLLMENT_TOKEN + valueFrom: + secretKeyRef: + name: falco-agent-enrollment + key: token + volumeMounts: + - name: agent-etc + mountPath: /var/ossec/etc + - name: falco-events + mountPath: /var/log/falco + readOnly: true diff --git a/proxmox/kustomize/wazuh/wazuh/wazuh_agents/findings/detector.json b/proxmox/kustomize/wazuh/wazuh/wazuh_agents/findings/detector.json new file mode 100644 index 0000000..5b9d5a3 --- /dev/null +++ b/proxmox/kustomize/wazuh/wazuh/wazuh_agents/findings/detector.json @@ -0,0 +1,26 @@ +{ + "name": "Falco Runtime Detections", + "type": "detector", + "detector_type": "falco", + "enabled": true, + "schedule": { + "period": { + "interval": 1, + "unit": "MINUTES" + } + }, + "inputs": [ + { + "detector_input": { + "description": "Falco Warning and higher events from Wazuh 5", + "indices": ["wazuh-events-v5-security"], + "custom_rules": [ + {"id": "a9088c4a-748e-4622-8c28-f2d1b43aee9c"}, + {"id": "7dce0e18-b662-45c7-a08f-4248378a92b2"} + ], + "pre_packaged_rules": [] + } + } + ], + "triggers": [] +} diff --git a/proxmox/kustomize/wazuh/wazuh/wazuh_agents/findings/falco-decoder.json b/proxmox/kustomize/wazuh/wazuh/wazuh_agents/findings/falco-decoder.json new file mode 100644 index 0000000..80a777d --- /dev/null +++ b/proxmox/kustomize/wazuh/wazuh/wazuh_agents/findings/falco-decoder.json @@ -0,0 +1,34 @@ +{ + "name": "decoder/falco-json/0", + "enabled": true, + "parents": ["decoder/core-wazuh-message/0"], + "metadata": { + "title": "Falco JSON event", + "author": "Homelab", + "description": "Normalize Falco detections and their Kubernetes, container, process and user context." + }, + "check": "exists($_tmp_json.rule) AND exists($_tmp_json.priority) AND exists($_tmp_json.output_fields)", + "normalize": [ + { + "map": [ + {"@timestamp": "get_date()"}, + {"event.kind": "event"}, + {"event.dataset": "falco"}, + {"event.module": "falco"}, + {"event.action": "$_tmp_json.rule"}, + {"log.level": "$_tmp_json.priority"}, + {"message": "$_tmp_json.output"}, + {"host.name": "$_tmp_json.hostname"}, + {"orchestrator.namespace": "$_tmp_json.output_fields.k8s\\.ns\\.name"}, + {"orchestrator.resource.name": "$_tmp_json.output_fields.k8s\\.pod\\.name"}, + {"container.id": "$_tmp_json.output_fields.container\\.id"}, + {"container.name": "$_tmp_json.output_fields.container\\.name"}, + {"container.image.name": "$_tmp_json.output_fields.container\\.image\\.repository"}, + {"process.name": "$_tmp_json.output_fields.proc\\.name"}, + {"process.executable": "$_tmp_json.output_fields.proc\\.exepath"}, + {"process.command_line": "$_tmp_json.output_fields.proc\\.cmdline"}, + {"user.name": "$_tmp_json.output_fields.user\\.name"} + ] + } + ] +} diff --git a/proxmox/kustomize/wazuh/wazuh/wazuh_agents/findings/integration.json b/proxmox/kustomize/wazuh/wazuh/wazuh_agents/findings/integration.json new file mode 100644 index 0000000..c00b9b8 --- /dev/null +++ b/proxmox/kustomize/wazuh/wazuh/wazuh_agents/findings/integration.json @@ -0,0 +1,10 @@ +{ + "category": "security", + "enabled": true, + "metadata": { + "title": "falco", + "author": "Homelab", + "description": "Falco runtime detections collected by the Wazuh agent.", + "references": ["https://falco.org/docs/concepts/alerts/"] + } +} diff --git a/proxmox/kustomize/wazuh/wazuh/wazuh_agents/findings/root-decoder.json b/proxmox/kustomize/wazuh/wazuh/wazuh_agents/findings/root-decoder.json new file mode 100644 index 0000000..7389a3a --- /dev/null +++ b/proxmox/kustomize/wazuh/wazuh/wazuh_agents/findings/root-decoder.json @@ -0,0 +1,16 @@ +{ + "name": "decoder/core-wazuh-message/0", + "enabled": true, + "metadata": { + "title": "Wazuh message decoder for Falco", + "author": "Homelab", + "description": "Parse the agent's JSON log before Falco normalization." + }, + "normalize": [ + { + "map": [ + {"_tmp_json": "parse_json($event.original)"} + ] + } + ] +} diff --git a/proxmox/kustomize/wazuh/wazuh/wazuh_agents/findings/rule-critical.json b/proxmox/kustomize/wazuh/wazuh/wazuh_agents/findings/rule-critical.json new file mode 100644 index 0000000..8abc08a --- /dev/null +++ b/proxmox/kustomize/wazuh/wazuh/wazuh_agents/findings/rule-critical.json @@ -0,0 +1,18 @@ +{ + "metadata": { + "title": "Falco critical: {{event.action}} on {{host.name}}", + "author": "Homelab", + "description": "A Falco runtime detection with Critical, Alert, or Emergency priority." + }, + "enabled": true, + "status": "experimental", + "level": "critical", + "logsource": {"product": "falco"}, + "detection": { + "condition": "selection", + "selection": { + "event.dataset": "falco", + "log.level": ["Critical", "Alert", "Emergency"] + } + } +} diff --git a/proxmox/kustomize/wazuh/wazuh/wazuh_agents/findings/rule-warning.json b/proxmox/kustomize/wazuh/wazuh/wazuh_agents/findings/rule-warning.json new file mode 100644 index 0000000..6a56fd8 --- /dev/null +++ b/proxmox/kustomize/wazuh/wazuh/wazuh_agents/findings/rule-warning.json @@ -0,0 +1,18 @@ +{ + "metadata": { + "title": "Falco: {{event.action}} on {{host.name}}", + "author": "Homelab", + "description": "A Falco runtime detection with Warning or Error priority." + }, + "enabled": true, + "status": "experimental", + "level": "medium", + "logsource": {"product": "falco"}, + "detection": { + "condition": "selection", + "selection": { + "event.dataset": "falco", + "log.level": ["Warning", "Error"] + } + } +} diff --git a/proxmox/kustomize/wazuh/wazuh/wazuh_agents/kustomization.yml b/proxmox/kustomize/wazuh/wazuh/wazuh_agents/kustomization.yml new file mode 100644 index 0000000..d9cff49 --- /dev/null +++ b/proxmox/kustomize/wazuh/wazuh/wazuh_agents/kustomization.yml @@ -0,0 +1,7 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: wazuh-agent +resources: + - namespace.yaml + - falco-agent-ds.yaml + - network-policy.yaml diff --git a/proxmox/kustomize/wazuh/wazuh/wazuh_agents/namespace.yaml b/proxmox/kustomize/wazuh/wazuh/wazuh_agents/namespace.yaml new file mode 100644 index 0000000..f7f5a38 --- /dev/null +++ b/proxmox/kustomize/wazuh/wazuh/wazuh_agents/namespace.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: wazuh-agent + labels: + # Required for the node-local Falco log and the agent's persistent identity. + pod-security.kubernetes.io/enforce: privileged + pod-security.kubernetes.io/warn: baseline diff --git a/proxmox/kustomize/wazuh/wazuh/wazuh_agents/network-policy.yaml b/proxmox/kustomize/wazuh/wazuh/wazuh_agents/network-policy.yaml new file mode 100644 index 0000000..c5a45ed --- /dev/null +++ b/proxmox/kustomize/wazuh/wazuh/wazuh_agents/network-policy.yaml @@ -0,0 +1,44 @@ +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: default-deny-all +spec: + podSelector: {} + policyTypes: + - Ingress + - Egress +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: falco-agent-traffic +spec: + podSelector: + matchLabels: + app: wazuh-falco-agent + policyTypes: + - Ingress + - Egress + egress: + - to: + - namespaceSelector: + matchLabels: + kubernetes.io/metadata.name: wazuh + podSelector: + matchLabels: + app: wazuh-manager + ports: + - protocol: TCP + port: 1517 + - to: + - namespaceSelector: + matchLabels: + kubernetes.io/metadata.name: kube-system + podSelector: + matchLabels: + k8s-app: kube-dns + ports: + - protocol: UDP + port: 53 + - protocol: TCP + port: 53 diff --git a/proxmox/kustomize/wazuh/wazuh/wazuh_managers/network-policies/falco-agent-ingress.yaml b/proxmox/kustomize/wazuh/wazuh/wazuh_managers/network-policies/falco-agent-ingress.yaml new file mode 100644 index 0000000..c13ab00 --- /dev/null +++ b/proxmox/kustomize/wazuh/wazuh/wazuh_managers/network-policies/falco-agent-ingress.yaml @@ -0,0 +1,22 @@ +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: falco-agent-manager-ingress + namespace: wazuh +spec: + podSelector: + matchLabels: + app: wazuh-manager + policyTypes: + - Ingress + ingress: + - from: + - namespaceSelector: + matchLabels: + kubernetes.io/metadata.name: wazuh-agent + podSelector: + matchLabels: + app: wazuh-falco-agent + ports: + - protocol: TCP + port: 1517 diff --git a/proxmox/kustomize/wazuh/wazuh/wazuh_managers/network-policies/manager-egress-external.yaml b/proxmox/kustomize/wazuh/wazuh/wazuh_managers/network-policies/manager-egress-external.yaml new file mode 100644 index 0000000..0879fec --- /dev/null +++ b/proxmox/kustomize/wazuh/wazuh/wazuh_managers/network-policies/manager-egress-external.yaml @@ -0,0 +1,18 @@ +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: manager-egress-external + namespace: wazuh +spec: + podSelector: + matchLabels: + app: wazuh-manager + policyTypes: + - Egress + egress: + - to: + - ipBlock: + cidr: 0.0.0.0/0 + ports: + - protocol: TCP + port: 443 diff --git a/proxmox/kustomize/wazuh/wazuh/wazuh_managers/network-policies/manager-egress.yaml b/proxmox/kustomize/wazuh/wazuh/wazuh_managers/network-policies/manager-egress.yaml new file mode 100644 index 0000000..eab5fcb --- /dev/null +++ b/proxmox/kustomize/wazuh/wazuh/wazuh_managers/network-policies/manager-egress.yaml @@ -0,0 +1,19 @@ +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: manager-egress + namespace: wazuh +spec: + podSelector: + matchLabels: + app: wazuh-manager + policyTypes: + - Egress + egress: + - to: + - podSelector: + matchLabels: + app: wazuh-indexer + ports: + - protocol: TCP + port: 9200 diff --git a/proxmox/kustomize/wazuh/wazuh/wazuh_managers/network-policies/wazuh-master-ingress.yaml b/proxmox/kustomize/wazuh/wazuh/wazuh_managers/network-policies/wazuh-master-ingress.yaml new file mode 100644 index 0000000..2e2c218 --- /dev/null +++ b/proxmox/kustomize/wazuh/wazuh/wazuh_managers/network-policies/wazuh-master-ingress.yaml @@ -0,0 +1,27 @@ +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: wazuh-api-ingress + namespace: wazuh +spec: + podSelector: + matchLabels: + app: wazuh-manager + node-type: master + policyTypes: + - Ingress + ingress: + - from: + - podSelector: + matchLabels: + app: wazuh-dashboard + ports: + - protocol: TCP + port: 55000 + - from: + - podSelector: + matchLabels: + app: wazuh-manager + ports: + - protocol: TCP + port: 1516 diff --git a/proxmox/kustomize/wazuh/wazuh/wazuh_managers/network-policies/wazuh-worker-egress.yaml b/proxmox/kustomize/wazuh/wazuh/wazuh_managers/network-policies/wazuh-worker-egress.yaml new file mode 100644 index 0000000..a4ca4e1 --- /dev/null +++ b/proxmox/kustomize/wazuh/wazuh/wazuh_managers/network-policies/wazuh-worker-egress.yaml @@ -0,0 +1,27 @@ +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: wazuh-worker-egress + namespace: wazuh +spec: + podSelector: + matchLabels: + app: wazuh-manager + node-type: worker + policyTypes: + - Egress + egress: + - to: + - podSelector: + matchLabels: + app: wazuh-manager + ports: + - protocol: TCP + port: 1516 + - to: + - podSelector: + matchLabels: + app: wazuh-manager + ports: + - protocol: TCP + port: 55000 diff --git a/proxmox/kustomize/wazuh/wazuh/wazuh_managers/wazuh-agents-svc.yaml b/proxmox/kustomize/wazuh/wazuh/wazuh_managers/wazuh-agents-svc.yaml new file mode 100644 index 0000000..1f676c9 --- /dev/null +++ b/proxmox/kustomize/wazuh/wazuh/wazuh_managers/wazuh-agents-svc.yaml @@ -0,0 +1,28 @@ +# Copyright (C) 2019, Wazuh Inc. +# +# This program is a free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation. + +# Wazuh manager Service: Wazuh 5.x agent communication and enrollment +# +# Since 5.0.0 remoted serves a single HTTPS channel that carries both the agent +# traffic and the enrollment, so this port replaces the 1514/1515 pair for 5.x +# agents. Every manager node answers it, master included, mirroring the way the +# Docker multi-node deployment balances 1517 across the whole cluster. + +apiVersion: v1 +kind: Service +metadata: + name: wazuh-agents + namespace: wazuh + labels: + app: wazuh-manager +spec: + selector: + app: wazuh-manager + ports: + - name: agents-https + port: 1517 + targetPort: 1517 diff --git a/proxmox/kustomize/wazuh/wazuh/wazuh_managers/wazuh-api-svc.yaml b/proxmox/kustomize/wazuh/wazuh/wazuh_managers/wazuh-api-svc.yaml new file mode 100644 index 0000000..b0f660d --- /dev/null +++ b/proxmox/kustomize/wazuh/wazuh/wazuh_managers/wazuh-api-svc.yaml @@ -0,0 +1,26 @@ +# Copyright (C) 2019, Wazuh Inc. +# +# This program is a free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation. + +# Wazuh master Service: API and registration (authd) + +apiVersion: v1 +kind: Service +metadata: + name: wazuh-api + namespace: wazuh + labels: + app: wazuh-manager + annotations: + service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp +spec: + selector: + app: wazuh-manager + node-type: master + ports: + - name: api + port: 55000 + targetPort: 55000 diff --git a/proxmox/kustomize/wazuh/wazuh/wazuh_managers/wazuh-cluster-svc.yaml b/proxmox/kustomize/wazuh/wazuh/wazuh_managers/wazuh-cluster-svc.yaml new file mode 100644 index 0000000..ce3c7c8 --- /dev/null +++ b/proxmox/kustomize/wazuh/wazuh/wazuh_managers/wazuh-cluster-svc.yaml @@ -0,0 +1,24 @@ +# Copyright (C) 2019, Wazuh Inc. +# +# This program is a free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation. + +# Wazuh cluster Service: Manager nodes communication + +apiVersion: v1 +kind: Service +metadata: + name: wazuh-cluster + namespace: wazuh + labels: + app: wazuh-manager +spec: + selector: + app: wazuh-manager + ports: + - name: cluster + port: 1516 + targetPort: 1516 + clusterIP: None diff --git a/proxmox/kustomize/wazuh/wazuh/wazuh_managers/wazuh-events-svc.yaml b/proxmox/kustomize/wazuh/wazuh/wazuh_managers/wazuh-events-svc.yaml new file mode 100644 index 0000000..21801e7 --- /dev/null +++ b/proxmox/kustomize/wazuh/wazuh/wazuh_managers/wazuh-events-svc.yaml @@ -0,0 +1,24 @@ +# Copyright (C) 2019, Wazuh Inc. +# +# This program is a free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation. + +# Wazuh workers service: Agent reporting + +apiVersion: v1 +kind: Service +metadata: + name: wazuh-events + namespace: wazuh + labels: + app: wazuh-manager +spec: + selector: + app: wazuh-manager + node-type: worker + ports: + - name: agents-events + port: 1514 + targetPort: 1514 diff --git a/proxmox/kustomize/wazuh/wazuh/wazuh_managers/wazuh-master-sts.yaml b/proxmox/kustomize/wazuh/wazuh/wazuh_managers/wazuh-master-sts.yaml new file mode 100644 index 0000000..48e0ac4 --- /dev/null +++ b/proxmox/kustomize/wazuh/wazuh/wazuh_managers/wazuh-master-sts.yaml @@ -0,0 +1,237 @@ +# Copyright (C) 2019, Wazuh Inc. +# +# This program is a free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation. + +# Wazuh master StatefulSet + +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: wazuh-manager-master + namespace: wazuh +spec: + replicas: 1 + selector: + matchLabels: + app: wazuh-manager + node-type: master + serviceName: wazuh-cluster + podManagementPolicy: Parallel + template: + metadata: + labels: + app: wazuh-manager + node-type: master + name: wazuh-manager-master + spec: + # No workload talks to the Kubernetes API. + automountServiceAccountToken: false + volumes: + # The Secret gets the pod's fsGroup and group read, so the service user + # could read it: an init container copies it to a root-only file. + - name: wazuh-credentials + emptyDir: + medium: Memory + sizeLimit: 1Mi + - name: wazuh-credentials-secret + secret: + secretName: manager-credentials + defaultMode: 0400 + - name: wazuh-manager-certs-raw + secret: + secretName: manager-certs + defaultMode: 0400 + - name: wazuh-manager-certs + emptyDir: {} + securityContext: + fsGroup: 101 + initContainers: + - name: install-credentials + image: 'wazuh/wazuh-manager:5.0.0-rc1' + command: + - /bin/sh + - -c + - 'umask 077 && cp /credentials-secret/wazuh-credentials /run/secrets/wazuh-credentials && chmod 0400 /run/secrets/wazuh-credentials' + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + capabilities: + drop: ["ALL"] + resources: + requests: + cpu: 50m + memory: 64Mi + limits: + cpu: 100m + memory: 128Mi + volumeMounts: + - name: wazuh-credentials-secret + mountPath: /credentials-secret + readOnly: true + - name: wazuh-credentials + mountPath: /run/secrets + - name: init-wazuh-etc + image: 'wazuh/wazuh-manager:5.0.0-rc1' + command: + - /bin/sh + - -c + - | + set -eu + if [ -z "$(ls -A /pvc-etc)" ]; then + cp -a /var/wazuh-manager/etc/* /pvc-etc/ + chown root:101 /pvc-etc/certs + chmod 1770 /pvc-etc/certs + fi + # data/ is not in the image's permanent-data snapshot. + if [ -z "$(ls -A /pvc-data)" ]; then + cp -a /var/wazuh-manager/data/. /pvc-data/ + fi + cp /tmp/certs-raw/root-ca.pem /etc/wazuh-certs-final/root-ca.pem + cp /tmp/certs-raw/manager.pem /etc/wazuh-certs-final/indexer-connector.pem + cp /tmp/certs-raw/manager-key.pem /etc/wazuh-certs-final/indexer-connector-key.pem + chown root:101 /etc/wazuh-certs-final/root-ca.pem /etc/wazuh-certs-final/indexer-connector.pem /etc/wazuh-certs-final/indexer-connector-key.pem + chmod 0640 /etc/wazuh-certs-final/root-ca.pem /etc/wazuh-certs-final/indexer-connector.pem /etc/wazuh-certs-final/indexer-connector-key.pem + # The agent listener pair is read by remoted after the manager drops + # privileges, so it is owned by the manager user (101:101) instead of + # root:101 like the files above. + cp /tmp/certs-raw/manager-remoted.pem /etc/wazuh-certs-final/remoted.pem + cp /tmp/certs-raw/manager-remoted-key.pem /etc/wazuh-certs-final/remoted-key.pem + chown 101:101 /etc/wazuh-certs-final/remoted.pem /etc/wazuh-certs-final/remoted-key.pem + chmod 0640 /etc/wazuh-certs-final/remoted.pem /etc/wazuh-certs-final/remoted-key.pem + # The Server API pair, read by the API after it drops privileges. + # Only the master runs the API. + cp /tmp/certs-raw/manager-apid.pem /etc/wazuh-certs-final/apid.pem + cp /tmp/certs-raw/manager-apid-key.pem /etc/wazuh-certs-final/apid-key.pem + chown 101:101 /etc/wazuh-certs-final/apid.pem /etc/wazuh-certs-final/apid-key.pem + chmod 0640 /etc/wazuh-certs-final/apid.pem /etc/wazuh-certs-final/apid-key.pem + volumeMounts: + - name: wazuh-manager-master + mountPath: /pvc-etc + subPath: wazuh/var/wazuh-manager/etc + - name: wazuh-manager-master + mountPath: /pvc-data + subPath: wazuh/var/wazuh-manager/data + - name: wazuh-manager-certs-raw + mountPath: /tmp/certs-raw + - name: wazuh-manager-certs + mountPath: /etc/wazuh-certs-final + containers: + - name: wazuh-manager + image: 'wazuh/wazuh-manager:5.0.0-rc1' + resources: + limits: + cpu: 400m + memory: 1280Mi + securityContext: + capabilities: + add: ["SYS_CHROOT"] + volumeMounts: + - name: wazuh-credentials + mountPath: /run/secrets + readOnly: true + - name: wazuh-manager-master + mountPath: /var/wazuh-manager/api/configuration + subPath: wazuh/var/wazuh-manager/api/configuration + - name: wazuh-manager-master + mountPath: /var/wazuh-manager/etc + subPath: wazuh/var/wazuh-manager/etc + - name: wazuh-manager-certs + mountPath: /var/wazuh-manager/etc/certs/root-ca.pem + subPath: root-ca.pem + - name: wazuh-manager-certs + mountPath: /var/wazuh-manager/etc/certs/indexer-connector.pem + subPath: indexer-connector.pem + - name: wazuh-manager-certs + mountPath: /var/wazuh-manager/etc/certs/indexer-connector-key.pem + subPath: indexer-connector-key.pem + - name: wazuh-manager-certs + mountPath: /var/wazuh-manager/etc/certs/remoted.pem + subPath: remoted.pem + - name: wazuh-manager-certs + mountPath: /var/wazuh-manager/etc/certs/remoted-key.pem + subPath: remoted-key.pem + - name: wazuh-manager-certs + mountPath: /var/wazuh-manager/etc/certs/apid.pem + subPath: apid.pem + - name: wazuh-manager-certs + mountPath: /var/wazuh-manager/etc/certs/apid-key.pem + subPath: apid-key.pem + - name: wazuh-manager-master + mountPath: /var/wazuh-manager/logs + subPath: wazuh/var/wazuh-manager/logs + - name: wazuh-manager-master + mountPath: /var/wazuh-manager/queue + subPath: wazuh/var/wazuh-manager/queue + - name: wazuh-manager-master + mountPath: /var/wazuh-manager/var/multigroups + subPath: wazuh/var/wazuh-manager/var/multigroups + - name: wazuh-manager-master + mountPath: /var/wazuh-manager/data + subPath: wazuh/var/wazuh-manager/data + ports: + - containerPort: 1517 + name: agents-https + - containerPort: 1515 + name: registration + - containerPort: 1516 + name: cluster + - containerPort: 55000 + name: api + startupProbe: + exec: + command: + - /bin/sh + - -c + - /var/wazuh-manager/bin/wazuh-manager-control status 2>/dev/null | grep -qE 'not running|failed to start|refused its configuration' && exit 1 || exit 0 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 12 + readinessProbe: + exec: + command: + - /bin/sh + - -c + - /var/wazuh-manager/bin/wazuh-manager-control status 2>/dev/null | grep -qE 'not running|failed to start|refused its configuration' && exit 1 || exit 0 + periodSeconds: 15 + timeoutSeconds: 5 + failureThreshold: 5 + livenessProbe: + exec: + command: + - /bin/sh + - -c + - /var/wazuh-manager/bin/wazuh-manager-control status 2>/dev/null | grep -qE 'not running|failed to start|refused its configuration' && exit 1 || exit 0 + periodSeconds: 15 + timeoutSeconds: 5 + failureThreshold: 5 + env: + - name: WAZUH_INDEXER_HOSTS + value: 'wazuh-indexer-0.wazuh-indexer:9200,wazuh-indexer-1.wazuh-indexer:9200,wazuh-indexer-2.wazuh-indexer:9200' + - name: WAZUH_NODE_NAME + value: 'master' + - name: WAZUH_NODE_TYPE + value: 'master' + - name: WAZUH_REMOTE_BIND_ADDR + value: '0.0.0.0' + - name: WAZUH_CLUSTER_BIND_ADDR + value: '0.0.0.0' + - name: WAZUH_CLUSTER_NODES + value: 'wazuh-manager-master-0.wazuh-cluster' + - name: WAZUH_CLUSTER_KEY + valueFrom: + secretKeyRef: + name: wazuh-cluster-key + key: key + volumeClaimTemplates: + - metadata: + name: wazuh-manager-master + namespace: wazuh + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 2Gi diff --git a/proxmox/kustomize/wazuh/wazuh/wazuh_managers/wazuh-registration-svc.yaml b/proxmox/kustomize/wazuh/wazuh/wazuh_managers/wazuh-registration-svc.yaml new file mode 100644 index 0000000..8660fa0 --- /dev/null +++ b/proxmox/kustomize/wazuh/wazuh/wazuh_managers/wazuh-registration-svc.yaml @@ -0,0 +1,24 @@ +# Copyright (C) 2019, Wazuh Inc. +# +# This program is a free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation. + +# Wazuh master Service: API and registration (authd) + +apiVersion: v1 +kind: Service +metadata: + name: wazuh-registration + namespace: wazuh + labels: + app: wazuh-manager +spec: + selector: + app: wazuh-manager + node-type: master + ports: + - name: registration + port: 1515 + targetPort: 1515 diff --git a/proxmox/kustomize/wazuh/wazuh/wazuh_managers/wazuh-worker-sts.yaml b/proxmox/kustomize/wazuh/wazuh/wazuh_managers/wazuh-worker-sts.yaml new file mode 100644 index 0000000..19a8864 --- /dev/null +++ b/proxmox/kustomize/wazuh/wazuh/wazuh_managers/wazuh-worker-sts.yaml @@ -0,0 +1,234 @@ +# Copyright (C) 2019, Wazuh Inc. +# +# This program is a free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation. + +# Wazuh workers StatefulSet + +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: wazuh-manager-worker + namespace: wazuh +spec: + replicas: 2 + selector: + matchLabels: + app: wazuh-manager + node-type: worker + serviceName: wazuh-cluster + podManagementPolicy: Parallel + template: + metadata: + labels: + app: wazuh-manager + node-type: worker + name: wazuh-manager-worker + spec: + # No workload talks to the Kubernetes API. + automountServiceAccountToken: false + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + podAffinityTerm: + topologyKey: kubernetes.io/hostname + labelSelector: + matchLabels: + app: wazuh-manager + node-type: worker + volumes: + # The Secret gets the pod's fsGroup and group read, so the service user + # could read it: an init container copies it to a root-only file. + - name: wazuh-credentials + emptyDir: + medium: Memory + sizeLimit: 1Mi + - name: wazuh-credentials-secret + secret: + secretName: manager-credentials + defaultMode: 0400 + - name: wazuh-manager-certs-raw + secret: + secretName: manager-certs + defaultMode: 0400 + - name: wazuh-manager-certs + emptyDir: {} + securityContext: + fsGroup: 101 + initContainers: + - name: install-credentials + image: 'wazuh/wazuh-manager:5.0.0-rc1' + command: + - /bin/sh + - -c + - 'umask 077 && cp /credentials-secret/wazuh-credentials /run/secrets/wazuh-credentials && chmod 0400 /run/secrets/wazuh-credentials' + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + capabilities: + drop: ["ALL"] + resources: + requests: + cpu: 50m + memory: 64Mi + limits: + cpu: 100m + memory: 128Mi + volumeMounts: + - name: wazuh-credentials-secret + mountPath: /credentials-secret + readOnly: true + - name: wazuh-credentials + mountPath: /run/secrets + - name: init-wazuh-etc + image: 'wazuh/wazuh-manager:5.0.0-rc1' + command: + - /bin/sh + - -c + - | + if [ -z "$(ls -A /pvc-etc)" ]; then + cp -a /var/wazuh-manager/etc/* /pvc-etc/ + chown root:101 /pvc-etc/certs + chmod 1770 /pvc-etc/certs + fi + # data/ is not in the image's permanent-data snapshot. + if [ -z "$(ls -A /pvc-data)" ]; then + cp -a /var/wazuh-manager/data/. /pvc-data/ + fi + cp /tmp/certs-raw/root-ca.pem /etc/wazuh-certs-final/root-ca.pem + cp /tmp/certs-raw/manager.pem /etc/wazuh-certs-final/indexer-connector.pem + cp /tmp/certs-raw/manager-key.pem /etc/wazuh-certs-final/indexer-connector-key.pem + chown root:101 /etc/wazuh-certs-final/root-ca.pem /etc/wazuh-certs-final/indexer-connector.pem /etc/wazuh-certs-final/indexer-connector-key.pem + chmod 0640 /etc/wazuh-certs-final/root-ca.pem /etc/wazuh-certs-final/indexer-connector.pem /etc/wazuh-certs-final/indexer-connector-key.pem + # The agent listener pair is read by remoted after the manager drops + # privileges, so it is owned by the manager user (101:101) instead of + # root:101 like the files above. + cp /tmp/certs-raw/manager-remoted.pem /etc/wazuh-certs-final/remoted.pem + cp /tmp/certs-raw/manager-remoted-key.pem /etc/wazuh-certs-final/remoted-key.pem + chown 101:101 /etc/wazuh-certs-final/remoted.pem /etc/wazuh-certs-final/remoted-key.pem + chmod 0640 /etc/wazuh-certs-final/remoted.pem /etc/wazuh-certs-final/remoted-key.pem + volumeMounts: + - name: wazuh-manager-worker + mountPath: /pvc-etc + subPath: wazuh/var/wazuh-manager/etc + - name: wazuh-manager-worker + mountPath: /pvc-data + subPath: wazuh/var/wazuh-manager/data + - name: wazuh-manager-certs-raw + mountPath: /tmp/certs-raw + - name: wazuh-manager-certs + mountPath: /etc/wazuh-certs-final + containers: + - name: wazuh-manager + image: 'wazuh/wazuh-manager:5.0.0-rc1' + resources: + limits: + cpu: 400m + memory: 1280Mi + securityContext: + capabilities: + add: ["SYS_CHROOT"] + volumeMounts: + - name: wazuh-credentials + mountPath: /run/secrets + readOnly: true + - name: wazuh-manager-worker + mountPath: /var/wazuh-manager/api/configuration + subPath: wazuh/var/wazuh-manager/api/configuration + - name: wazuh-manager-worker + mountPath: /var/wazuh-manager/etc + subPath: wazuh/var/wazuh-manager/etc + - name: wazuh-manager-certs + mountPath: /var/wazuh-manager/etc/certs/root-ca.pem + subPath: root-ca.pem + - name: wazuh-manager-certs + mountPath: /var/wazuh-manager/etc/certs/indexer-connector.pem + subPath: indexer-connector.pem + - name: wazuh-manager-certs + mountPath: /var/wazuh-manager/etc/certs/indexer-connector-key.pem + subPath: indexer-connector-key.pem + - name: wazuh-manager-certs + mountPath: /var/wazuh-manager/etc/certs/remoted.pem + subPath: remoted.pem + - name: wazuh-manager-certs + mountPath: /var/wazuh-manager/etc/certs/remoted-key.pem + subPath: remoted-key.pem + - name: wazuh-manager-worker + mountPath: /var/wazuh-manager/logs + subPath: wazuh/var/wazuh-manager/logs + - name: wazuh-manager-worker + mountPath: /var/wazuh-manager/queue + subPath: wazuh/var/wazuh-manager/queue + - name: wazuh-manager-worker + mountPath: /var/wazuh-manager/var/multigroups + subPath: wazuh/var/wazuh-manager/var/multigroups + - name: wazuh-manager-worker + mountPath: /var/wazuh-manager/data + subPath: wazuh/var/wazuh-manager/data + ports: + - containerPort: 1517 + name: agents-https + - containerPort: 1514 + name: agents-events + - containerPort: 1516 + name: cluster + startupProbe: + exec: + command: + - /bin/sh + - -c + - /var/wazuh-manager/bin/wazuh-manager-control status 2>/dev/null | grep -v apid | grep -qE 'not running|failed to start|refused its configuration' && exit 1 || exit 0 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 12 + readinessProbe: + exec: + command: + - /bin/sh + - -c + - /var/wazuh-manager/bin/wazuh-manager-control status 2>/dev/null | grep -v apid | grep -qE 'not running|failed to start|refused its configuration' && exit 1 || exit 0 + periodSeconds: 15 + timeoutSeconds: 5 + failureThreshold: 5 + livenessProbe: + exec: + command: + - /bin/sh + - -c + - /var/wazuh-manager/bin/wazuh-manager-control status 2>/dev/null | grep -v apid | grep -qE 'not running|failed to start|refused its configuration' && exit 1 || exit 0 + periodSeconds: 15 + timeoutSeconds: 5 + failureThreshold: 5 + env: + - name: WAZUH_INDEXER_HOSTS + value: 'wazuh-indexer-0.wazuh-indexer:9200,wazuh-indexer-1.wazuh-indexer:9200,wazuh-indexer-2.wazuh-indexer:9200' + - name: WAZUH_NODE_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: WAZUH_NODE_TYPE + value: 'worker' + - name: WAZUH_REMOTE_BIND_ADDR + value: '0.0.0.0' + - name: WAZUH_CLUSTER_BIND_ADDR + value: '0.0.0.0' + - name: WAZUH_CLUSTER_NODES + value: 'wazuh-manager-master-0.wazuh-cluster' + - name: WAZUH_CLUSTER_KEY + valueFrom: + secretKeyRef: + name: wazuh-cluster-key + key: key + volumeClaimTemplates: + - metadata: + name: wazuh-manager-worker + namespace: wazuh + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 500Mi diff --git a/proxmox/manifests/argocd/infra-repo-password.yaml b/proxmox/manifests/argocd/infra-repo-password.yaml new file mode 100644 index 0000000..19c3c35 --- /dev/null +++ b/proxmox/manifests/argocd/infra-repo-password.yaml @@ -0,0 +1,18 @@ +apiVersion: external-secrets.io/v1 +kind: ExternalSecret +metadata: + name: homelab-repo-password + namespace: argocd +spec: + refreshInterval: 1h + secretStoreRef: + name: infisical + kind: ClusterSecretStore + target: + name: homelab-repo + creationPolicy: Merge + deletionPolicy: Retain + data: + - secretKey: password + remoteRef: + key: /argocd/ARGOCD_REPO_PASSWORD diff --git a/proxmox/manifests/argocd/infra-repo-secret.yaml b/proxmox/manifests/argocd/infra-repo-secret.yaml new file mode 100644 index 0000000..8a89085 --- /dev/null +++ b/proxmox/manifests/argocd/infra-repo-secret.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Secret +metadata: + name: homelab-repo + namespace: argocd + labels: + argocd.argoproj.io/secret-type: repository +stringData: + type: git + url: https://git.itqdev.xyz/Infrastructure/homelab.git + username: ITQ diff --git a/proxmox/manifests/argocd/oidc-client-secret.yaml b/proxmox/manifests/argocd/oidc-client-secret.yaml new file mode 100644 index 0000000..b468e64 --- /dev/null +++ b/proxmox/manifests/argocd/oidc-client-secret.yaml @@ -0,0 +1,18 @@ +apiVersion: external-secrets.io/v1 +kind: ExternalSecret +metadata: + name: argocd-oidc-client-secret + namespace: argocd +spec: + refreshInterval: 1h + secretStoreRef: + name: infisical + kind: ClusterSecretStore + target: + name: argocd-secret + creationPolicy: Merge + deletionPolicy: Retain + data: + - secretKey: oidc.keycloak.clientSecret + remoteRef: + key: /argocd/ARGOCD_OIDC_CLIENT_SECRET diff --git a/proxmox/manifests/argocd/project.yaml b/proxmox/manifests/argocd/project.yaml new file mode 100644 index 0000000..cfbafe7 --- /dev/null +++ b/proxmox/manifests/argocd/project.yaml @@ -0,0 +1,30 @@ +apiVersion: argoproj.io/v1alpha1 +kind: AppProject +metadata: + name: default + namespace: argocd + +spec: + description: Default project with maintenance sync window + + sourceRepos: + - "*" + + destinations: + - namespace: "*" + server: "*" + + syncWindows: + - kind: allow + schedule: "0 3 * * *" + duration: 1h + applications: + - "*" + manualSync: true + + - kind: allow + schedule: "* * * * *" + duration: 24h + applications: + - "root-app" + - "manifests" diff --git a/proxmox/manifests/etcd-backup/cronjob.yaml b/proxmox/manifests/etcd-backup/cronjob.yaml new file mode 100644 index 0000000..f8da9c6 --- /dev/null +++ b/proxmox/manifests/etcd-backup/cronjob.yaml @@ -0,0 +1,92 @@ +apiVersion: talos.dev/v1alpha1 +kind: ServiceAccount +metadata: + name: talos-backup-secrets + namespace: backup-system +spec: + roles: + - os:etcd:backup +--- +apiVersion: batch/v1 +kind: CronJob +metadata: + name: talos-backup + namespace: backup-system +spec: + schedule: "0 0 */7 * *" # At 00:00 on every 7th day-of-month + jobTemplate: + spec: + template: + spec: + containers: + - name: talos-backup + image: ghcr.io/siderolabs/talos-backup:latest + workingDir: /tmp + imagePullPolicy: IfNotPresent + env: + - name: AWS_ACCESS_KEY_ID + valueFrom: + secretKeyRef: + name: etcd-backup-secrets + key: AWS_ACCESS_KEY_ID + - name: AWS_SECRET_ACCESS_KEY + valueFrom: + secretKeyRef: + name: etcd-backup-secrets + key: AWS_SECRET_ACCESS_KEY + - name: AWS_REGION + valueFrom: + secretKeyRef: + name: etcd-backup-secrets + key: AWS_REGION + - name: CUSTOM_S3_ENDPOINT + valueFrom: + secretKeyRef: + name: etcd-backup-secrets + key: CUSTOM_S3_ENDPOINT + - name: BUCKET + valueFrom: + secretKeyRef: + name: etcd-backup-secrets + key: BUCKET + - name: USE_PATH_STYLE + value: "true" + - name: CLUSTER_NAME + value: "prod" + - name: S3_PREFIX + value: "" + - name: AGE_RECIPIENT_PUBLIC_KEY + valueFrom: + secretKeyRef: + name: etcd-backup-secrets + key: AGE_RECIPIENT_PUBLIC_KEY + - name: ENABLE_COMPRESSION + value: "false" + securityContext: + runAsUser: 1000 + runAsGroup: 1000 + allowPrivilegeEscalation: false + runAsNonRoot: true + capabilities: + drop: + - ALL + seccompProfile: + type: RuntimeDefault + command: + - /talos-backup + volumeMounts: + - mountPath: /tmp + name: tmp + - mountPath: /.talos + name: talos + - mountPath: /var/run/secrets/talos.dev + name: talos-secrets + restartPolicy: OnFailure + volumes: + - emptyDir: {} + name: tmp + - emptyDir: {} + name: talos + - name: talos-secrets + secret: + secretName: talos-backup-secrets diff --git a/proxmox/manifests/etcd-backup/secrets.yaml b/proxmox/manifests/etcd-backup/secrets.yaml new file mode 100644 index 0000000..74a6934 --- /dev/null +++ b/proxmox/manifests/etcd-backup/secrets.yaml @@ -0,0 +1,50 @@ +apiVersion: external-secrets.io/v1 +kind: ExternalSecret +metadata: + name: etcd-backup-secrets + namespace: backup-system +spec: + secretStoreRef: + name: infisical + kind: ClusterSecretStore + + target: + name: etcd-backup-secrets + creationPolicy: Owner + template: + engineVersion: v2 + type: Opaque + data: + AWS_ACCESS_KEY_ID: "{{ .awsAccessKeyId }}" + AWS_SECRET_ACCESS_KEY: "{{ .awsSecretAccessKey }}" + AWS_REGION: "{{ .awsRegion }}" + CUSTOM_S3_ENDPOINT: "{{ .customS3Endpoint }}" + BUCKET: "{{ .bucket }}" + AGE_RECIPIENT_PUBLIC_KEY: "{{ .ageRecipientPublicKey }}" + + data: + - secretKey: awsAccessKeyId + remoteRef: + key: /etcd-backup/AWS_ACCESS_KEY_ID + + - secretKey: awsSecretAccessKey + remoteRef: + key: /etcd-backup/AWS_SECRET_ACCESS_KEY + + - secretKey: awsRegion + remoteRef: + key: /etcd-backup/AWS_REGION + + - secretKey: customS3Endpoint + remoteRef: + key: /etcd-backup/CUSTOM_S3_ENDPOINT + + - secretKey: bucket + remoteRef: + key: /etcd-backup/BUCKET + + - secretKey: ageRecipientPublicKey + remoteRef: + key: /etcd-backup/AGE_RECIPIENT_PUBLIC_KEY + + refreshInterval: 1h diff --git a/proxmox/manifests/external-secrets/infisical-cluster-secret-store.yaml b/proxmox/manifests/external-secrets/infisical-cluster-secret-store.yaml new file mode 100644 index 0000000..5bc0cbb --- /dev/null +++ b/proxmox/manifests/external-secrets/infisical-cluster-secret-store.yaml @@ -0,0 +1,20 @@ +apiVersion: external-secrets.io/v1 +kind: ClusterSecretStore +metadata: + name: infisical + annotations: + argocd.argoproj.io/sync-wave: "-1" +spec: + provider: + infisical: + hostAPI: https://vault.itqdev.xyz + auth: + kubernetesAuthCredentials: + identityId: + name: infisical-kubernetes-auth + key: identityId + namespace: external-secrets + secretsScope: + projectSlug: k8s-homelab + environmentSlug: prod + secretsPath: / diff --git a/proxmox/manifests/external-secrets/infisical-kubernetes-auth.yaml b/proxmox/manifests/external-secrets/infisical-kubernetes-auth.yaml new file mode 100644 index 0000000..20c6793 --- /dev/null +++ b/proxmox/manifests/external-secrets/infisical-kubernetes-auth.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: Secret +metadata: + name: infisical-kubernetes-auth + namespace: external-secrets + annotations: + argocd.argoproj.io/sync-wave: "-2" +type: Opaque +stringData: + identityId: 306b967d-5f24-4b78-bbb1-0b49d20c64b0 diff --git a/proxmox/manifests/external-secrets/kubernetes-auth-rbac.yaml b/proxmox/manifests/external-secrets/kubernetes-auth-rbac.yaml new file mode 100644 index 0000000..434d746 --- /dev/null +++ b/proxmox/manifests/external-secrets/kubernetes-auth-rbac.yaml @@ -0,0 +1,28 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: external-secrets-infisical-token-reviewer + annotations: + argocd.argoproj.io/sync-wave: "-2" +rules: + - apiGroups: + - authentication.k8s.io + resources: + - tokenreviews + verbs: + - create +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: external-secrets-infisical-token-reviewer + annotations: + argocd.argoproj.io/sync-wave: "-2" +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: external-secrets-infisical-token-reviewer +subjects: + - kind: ServiceAccount + name: external-secrets-operator + namespace: external-secrets diff --git a/proxmox/manifests/gateway/global-http-redirect.yaml b/proxmox/manifests/gateway/global-http-redirect.yaml new file mode 100644 index 0000000..c42e57b --- /dev/null +++ b/proxmox/manifests/gateway/global-http-redirect.yaml @@ -0,0 +1,22 @@ +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: global-http-redirect + namespace: gateway-system +spec: + parentRefs: + - name: shared-gateway + namespace: gateway-system + sectionName: http-redirect + + rules: + - matches: + - path: + type: PathPrefix + value: / + filters: + - type: RequestRedirect + requestRedirect: + scheme: https + statusCode: 301 + port: 443 diff --git a/proxmox/manifests/gateway/ns.yaml b/proxmox/manifests/gateway/ns.yaml new file mode 100644 index 0000000..3dbea03 --- /dev/null +++ b/proxmox/manifests/gateway/ns.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: gateway-system diff --git a/proxmox/manifests/gateway/routes/argocd/httproute.yaml b/proxmox/manifests/gateway/routes/argocd/httproute.yaml new file mode 100644 index 0000000..9ba6503 --- /dev/null +++ b/proxmox/manifests/gateway/routes/argocd/httproute.yaml @@ -0,0 +1,22 @@ +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: argocd + namespace: argocd +spec: + parentRefs: + - name: shared-gateway + namespace: gateway-system + sectionName: argocd-https + + hostnames: + - "argocd.internal.itqdev.xyz" + + rules: + - matches: + - path: + type: PathPrefix + value: / + backendRefs: + - name: argocd-server + port: 80 diff --git a/proxmox/manifests/gateway/routes/argocd/tls-external-secret.yaml b/proxmox/manifests/gateway/routes/argocd/tls-external-secret.yaml new file mode 100644 index 0000000..c8e2da4 --- /dev/null +++ b/proxmox/manifests/gateway/routes/argocd/tls-external-secret.yaml @@ -0,0 +1,22 @@ +apiVersion: external-secrets.io/v1 +kind: ExternalSecret +metadata: + name: argocd-tls + namespace: gateway-system +spec: + refreshInterval: 1h + secretStoreRef: + name: infisical + kind: ClusterSecretStore + target: + name: argocd-tls + creationPolicy: Owner + template: + type: kubernetes.io/tls + data: + - secretKey: tls.crt + remoteRef: + key: /gateway/ARGOCD_TLS_CERT + - secretKey: tls.key + remoteRef: + key: /gateway/ARGOCD_TLS_KEY diff --git a/proxmox/manifests/gateway/routes/grafana/httprouter.yaml b/proxmox/manifests/gateway/routes/grafana/httprouter.yaml new file mode 100644 index 0000000..54b2855 --- /dev/null +++ b/proxmox/manifests/gateway/routes/grafana/httprouter.yaml @@ -0,0 +1,23 @@ +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: grafana + namespace: grafana +spec: + parentRefs: + - name: shared-gateway + namespace: gateway-system + sectionName: grafana-https + + hostnames: + - "grafana.internal.itqdev.xyz" + + rules: + - matches: + - path: + type: PathPrefix + value: / + backendRefs: + - name: grafana + port: 80 + diff --git a/proxmox/manifests/gateway/routes/grafana/tls-external-secret.yaml b/proxmox/manifests/gateway/routes/grafana/tls-external-secret.yaml new file mode 100644 index 0000000..41e5244 --- /dev/null +++ b/proxmox/manifests/gateway/routes/grafana/tls-external-secret.yaml @@ -0,0 +1,22 @@ +apiVersion: external-secrets.io/v1 +kind: ExternalSecret +metadata: + name: grafana-tls + namespace: gateway-system +spec: + refreshInterval: 1h + secretStoreRef: + name: infisical + kind: ClusterSecretStore + target: + name: grafana-tls + creationPolicy: Owner + template: + type: kubernetes.io/tls + data: + - secretKey: tls.crt + remoteRef: + key: /gateway/GRAFANA_TLS_CERT + - secretKey: tls.key + remoteRef: + key: /gateway/GRAFANA_TLS_KEY diff --git a/proxmox/manifests/gateway/routes/headlamp/httproute.yaml b/proxmox/manifests/gateway/routes/headlamp/httproute.yaml new file mode 100644 index 0000000..2b03be1 --- /dev/null +++ b/proxmox/manifests/gateway/routes/headlamp/httproute.yaml @@ -0,0 +1,22 @@ +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: headlamp + namespace: headlamp +spec: + parentRefs: + - name: shared-gateway + namespace: gateway-system + sectionName: headlamp-https + + hostnames: + - "k8s.internal.itqdev.xyz" + + rules: + - matches: + - path: + type: PathPrefix + value: / + backendRefs: + - name: headlamp + port: 80 diff --git a/proxmox/manifests/gateway/routes/headlamp/tls-external-secret.yaml b/proxmox/manifests/gateway/routes/headlamp/tls-external-secret.yaml new file mode 100644 index 0000000..8ab6f85 --- /dev/null +++ b/proxmox/manifests/gateway/routes/headlamp/tls-external-secret.yaml @@ -0,0 +1,22 @@ +apiVersion: external-secrets.io/v1 +kind: ExternalSecret +metadata: + name: headlamp-tls + namespace: gateway-system +spec: + refreshInterval: 1h + secretStoreRef: + name: infisical + kind: ClusterSecretStore + target: + name: headlamp-tls + creationPolicy: Owner + template: + type: kubernetes.io/tls + data: + - secretKey: tls.crt + remoteRef: + key: /gateway/HEADLAMP_TLS_CERT + - secretKey: tls.key + remoteRef: + key: /gateway/HEADLAMP_TLS_KEY diff --git a/proxmox/manifests/gateway/routes/jellyfin/httproute.yaml b/proxmox/manifests/gateway/routes/jellyfin/httproute.yaml new file mode 100644 index 0000000..04d6ecd --- /dev/null +++ b/proxmox/manifests/gateway/routes/jellyfin/httproute.yaml @@ -0,0 +1,22 @@ +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: jellyfin + namespace: jellyfin +spec: + parentRefs: + - name: shared-gateway + namespace: gateway-system + sectionName: jellyfin-https + + hostnames: + - "jellyfin.itqdev.xyz" + + rules: + - matches: + - path: + type: PathPrefix + value: / + backendRefs: + - name: jellyfin + port: 8096 diff --git a/proxmox/manifests/gateway/routes/jellyfin/tls.yaml b/proxmox/manifests/gateway/routes/jellyfin/tls.yaml new file mode 100644 index 0000000..37d973f --- /dev/null +++ b/proxmox/manifests/gateway/routes/jellyfin/tls.yaml @@ -0,0 +1,15 @@ +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: jellyfin-cert + namespace: gateway-system +spec: + secretName: jellyfin-tls + issuerRef: + name: infisical + kind: ClusterIssuer + group: infisical-issuer.infisical.com + duration: 720h + renewBefore: 240h + dnsNames: + - jellyfin.itqdev.xyz diff --git a/proxmox/manifests/gateway/routes/movienight/tls.yaml b/proxmox/manifests/gateway/routes/movienight/tls.yaml new file mode 100644 index 0000000..db247e0 --- /dev/null +++ b/proxmox/manifests/gateway/routes/movienight/tls.yaml @@ -0,0 +1,15 @@ +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: movienight-cert + namespace: movienight +spec: + secretName: movienight-tls + issuerRef: + name: infisical + kind: ClusterIssuer + group: infisical-issuer.infisical.com + duration: 720h + renewBefore: 240h + dnsNames: + - movienight.itqdev.xyz diff --git a/proxmox/manifests/gateway/routes/vdeniske/tls.yaml b/proxmox/manifests/gateway/routes/vdeniske/tls.yaml new file mode 100644 index 0000000..c4d5cea --- /dev/null +++ b/proxmox/manifests/gateway/routes/vdeniske/tls.yaml @@ -0,0 +1,15 @@ +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: vdeniske-cert + namespace: vdeniske +spec: + secretName: vdeniske-tls + issuerRef: + name: infisical + kind: ClusterIssuer + group: infisical-issuer.infisical.com + duration: 720h + renewBefore: 240h + dnsNames: + - vdeniske.itqdev.xyz diff --git a/proxmox/manifests/gateway/routes/wezuh/tlsroute.yaml b/proxmox/manifests/gateway/routes/wezuh/tlsroute.yaml new file mode 100644 index 0000000..a280ce8 --- /dev/null +++ b/proxmox/manifests/gateway/routes/wezuh/tlsroute.yaml @@ -0,0 +1,16 @@ +apiVersion: gateway.networking.k8s.io/v1 +kind: TLSRoute +metadata: + name: wazuh + namespace: wazuh +spec: + parentRefs: + - name: shared-gateway + namespace: gateway-system + sectionName: wazuh-tls + hostnames: + - wazuh.internal.itqdev.xyz + rules: + - backendRefs: + - name: dashboard + port: 443 diff --git a/proxmox/manifests/gateway/shared-gateway.yaml b/proxmox/manifests/gateway/shared-gateway.yaml new file mode 100644 index 0000000..9838c90 --- /dev/null +++ b/proxmox/manifests/gateway/shared-gateway.yaml @@ -0,0 +1,83 @@ +apiVersion: gateway.networking.k8s.io/v1 +kind: Gateway +metadata: + name: shared-gateway + namespace: gateway-system +spec: + infrastructure: + annotations: + lbipam.cilium.io/ips: 10.13.46.1 + gatewayClassName: cilium + listeners: + - name: http-redirect + port: 80 + protocol: HTTP + allowedRoutes: + namespaces: + from: All + + - name: headlamp-https + port: 443 + protocol: HTTPS + hostname: k8s.internal.itqdev.xyz + tls: + mode: Terminate + certificateRefs: + - kind: Secret + group: "" + name: headlamp-tls + allowedRoutes: + namespaces: + from: All + + - name: argocd-https + port: 443 + protocol: HTTPS + hostname: argocd.internal.itqdev.xyz + tls: + mode: Terminate + certificateRefs: + - kind: Secret + group: "" + name: argocd-tls + allowedRoutes: + namespaces: + from: All + + - name: grafana-https + port: 443 + protocol: HTTPS + hostname: grafana.internal.itqdev.xyz + tls: + mode: Terminate + certificateRefs: + - kind: Secret + group: "" + name: grafana-tls + allowedRoutes: + namespaces: + from: All + + - name: jellyfin-https + port: 443 + protocol: HTTPS + hostname: jellyfin.itqdev.xyz + tls: + mode: Terminate + certificateRefs: + - kind: Secret + group: "" + name: jellyfin-tls + allowedRoutes: + namespaces: + from: All + + - name: wazuh-tls + port: 443 + protocol: TLS + hostname: wazuh.internal.itqdev.xyz + tls: + mode: Passthrough + allowedRoutes: + namespaces: + from: All diff --git a/proxmox/manifests/gitlab-runner/runner-token.yaml b/proxmox/manifests/gitlab-runner/runner-token.yaml new file mode 100644 index 0000000..753e63b --- /dev/null +++ b/proxmox/manifests/gitlab-runner/runner-token.yaml @@ -0,0 +1,22 @@ +apiVersion: external-secrets.io/v1 +kind: ExternalSecret +metadata: + name: gitlab-runner-credentials + namespace: gitlab-runner +spec: + refreshInterval: 1h + secretStoreRef: + name: infisical + kind: ClusterSecretStore + target: + name: gitlab-runner-credentials + creationPolicy: Owner + template: + type: Opaque + data: + runner-token: "{{ .runnerToken }}" + runner-registration-token: "" + data: + - secretKey: runnerToken + remoteRef: + key: /gitlab-runner/RUNNER_TOKEN diff --git a/proxmox/manifests/gitlab/namespace.yaml b/proxmox/manifests/gitlab/namespace.yaml new file mode 100644 index 0000000..05c6da4 --- /dev/null +++ b/proxmox/manifests/gitlab/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: gitlab diff --git a/proxmox/manifests/gitlab/rails-storage.yaml b/proxmox/manifests/gitlab/rails-storage.yaml new file mode 100644 index 0000000..bb924fe --- /dev/null +++ b/proxmox/manifests/gitlab/rails-storage.yaml @@ -0,0 +1,19 @@ +apiVersion: external-secrets.io/v1 +kind: ExternalSecret +metadata: + name: gitlab-rails-storage + namespace: gitlab +spec: + refreshInterval: 1h + secretStoreRef: + name: infisical + kind: ClusterSecretStore + target: + name: gitlab-rails-storage + creationPolicy: Owner + template: + type: Opaque + data: + - secretKey: connection + remoteRef: + key: /gitlab/RAILS_STORAGE_CONNECTION diff --git a/proxmox/manifests/grafana/dashboards/cilium-envoy-downstream.yaml b/proxmox/manifests/grafana/dashboards/cilium-envoy-downstream.yaml new file mode 100644 index 0000000..bf89127 --- /dev/null +++ b/proxmox/manifests/grafana/dashboards/cilium-envoy-downstream.yaml @@ -0,0 +1,1661 @@ +apiVersion: v1 +data: + cilium-envoy-downstream.json: | + { + "apiVersion": "dashboard.grafana.app/v2", + "kind": "Dashboard", + "metadata": { + "name": "cilium-envoy-downstream", + "namespace": "default", + "uid": "81e7cf4f-337e-4cf4-84bf-72b59933fb38", + "resourceVersion": "1788358523093980", + "generation": 1, + "creationTimestamp": "2026-09-02T14:15:22Z", + "labels": { + "grafana.app/deprecatedInternalID": "979789907939328" + }, + "annotations": { + "grafana.app/createdBy": "user:cfx1picle4dmod", + "grafana.app/saved-from-ui": "Grafana v13.2.0 (f681b1359f)" + } + }, + "spec": { + "annotations": [ + { + "kind": "AnnotationQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "grafana", + "version": "v0", + "datasource": { + "name": "-- Grafana --" + }, + "spec": {} + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "builtIn": true, + "legacyOptions": { + "type": "dashboard" + } + } + } + ], + "cursorSync": "Off", + "description": "Detailed downstream connection monitoring for Envoy proxy. Tracks client-facing metrics including request rates, latency percentiles (P50/P95/P99), success rates, active connections, connection lifecycle events, bandwidth usage, and request reset patterns for each HTTP connection manager. Use this dashboard to analyze client behavior, diagnose connection issues, monitor ingress traffic patterns, and identify potential DDoS or abuse scenarios. Supports multi-prefix selection for comparative analysis. The dashboards were generated using [envoy-mixin](https://github.com/adinhodovic/envoy-mixin). Open issues and create feature requests in the repository.", + "editable": false, + "elements": { + "panel-10": { + "kind": "Panel", + "spec": { + "id": 10, + "title": "Downstream Success Rate (Including 4xx errors)", + "description": "Overall client success rate including both 4xx and 5xx as failures. Represents actual end-user experience. Drops may indicate authentication failures, invalid client requests, API contract violations, or backend errors. Use this metric for user-facing SLOs and customer impact assessment.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_http_downstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=\"$envoy_http_conn_manager_prefix\"\n,\n envoy_response_code_class!~\"4|5\"\n }[$__rate_interval]\n )\n)\n/\nsum(\n rate(\n envoy_http_downstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n)\n* 100\n", + "legendFormat": "Success Rate" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "percent", + "custom": { + "axisSoftMax": 100, + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-11": { + "kind": "Panel", + "spec": { + "id": 11, + "title": "Downstream Rate by Code Class", + "description": "Client request rate by HTTP status code class (2xx/3xx/4xx/5xx). Normal traffic is dominated by 2xx. Spikes in 4xx may indicate authentication problems, API misuse, or client bugs. Any 5xx indicates service failures. Monitor 401/403 for security issues and 429 for rate limiting effectiveness.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_http_downstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }[$__rate_interval]\n )\n) by (envoy_response_code_class)\n", + "legendFormat": "{{ envoy_response_code_class }}xx" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps", + "custom": { + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-12": { + "kind": "Panel", + "spec": { + "id": 12, + "title": "Downstream Connections", + "description": "Client connection lifecycle metrics. Active shows current open connections. Destroyed tracks normal connection teardown. High idle timeouts may indicate misconfigured clients, slow clients, or aggressive timeout settings. Correlate with request rates to identify connection efficiency issues.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n envoy_http_downstream_cx_active{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=\"$envoy_http_conn_manager_prefix\"\n\n }\n) by (envoy_http_conn_manager_prefix)\n", + "legendFormat": "Active Connections" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n increase(\n envoy_http_downstream_cx_destroy{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n) by (envoy_http_conn_manager_prefix)\n", + "legendFormat": "Destroyed Connections" + } + }, + "refId": "B", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n increase(\n envoy_http_downstream_cx_idle_timeout{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n) by (envoy_http_conn_manager_prefix)\n", + "legendFormat": "Idle Timeout" + } + }, + "refId": "C", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "custom": { + "fillOpacity": 10 + } + }, + "overrides": [] + } + } + } + } + }, + "panel-13": { + "kind": "Panel", + "spec": { + "id": 13, + "title": "Downstream Connection Bytes", + "description": "Bandwidth usage for client traffic. Received shows data from clients (request bodies, uploads). Transmitted shows data to clients (response bodies, downloads). Use to identify bandwidth-heavy endpoints, detect large file transfers, and plan capacity. Sudden spikes may indicate data exfiltration or abuse.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_http_downstream_cx_rx_bytes_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n) by (envoy_http_conn_manager_prefix)\n", + "legendFormat": "Received" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_http_downstream_cx_tx_bytes_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n) by (envoy_http_conn_manager_prefix)\n", + "legendFormat": "Transmitted" + } + }, + "refId": "B", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "Bps", + "custom": { + "fillOpacity": 10 + } + }, + "overrides": [] + } + } + } + } + }, + "panel-14": { + "kind": "Panel", + "spec": { + "id": 14, + "title": "Downstream Request Resets", + "description": "Abnormal request termination patterns. RX Reset = client aborted request (client disconnect, timeout). TX Reset = Envoy terminated response (upstream failure, policy violation). Timeouts = request exceeded configured deadline. High rates indicate client issues, network problems, or slow backends.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_http_downstream_rq_rx_reset{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n) by (envoy_http_conn_manager_prefix)\n", + "legendFormat": "RX Reset" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_http_downstream_rq_tx_reset{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n) by (envoy_http_conn_manager_prefix)\n", + "legendFormat": "TX Reset" + } + }, + "refId": "B", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_http_downstream_rq_timeout{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n) by (envoy_http_conn_manager_prefix)\n", + "legendFormat": "Timeout" + } + }, + "refId": "C", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps", + "custom": { + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-15": { + "kind": "Panel", + "spec": { + "id": 15, + "title": "Downstream Rate by Pod", + "description": "Client traffic distribution across Envoy proxy pods for this connection manager. Should show even distribution if load balancing works correctly. Imbalanced traffic may indicate L4 load balancer issues, DNS problems, or client-side connection affinity. Use to verify horizontal scaling effectiveness.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_http_downstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n) by (pod, envoy_http_conn_manager_prefix)\n", + "legendFormat": "{{ pod }}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps", + "custom": { + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-16": { + "kind": "Panel", + "spec": { + "id": 16, + "title": "Downstream Active Connections by Pod", + "description": "Active client connections per Envoy pod for this connection manager. Should correlate with request rates and show balanced distribution. High connections with low requests indicate long-lived connections (WebSockets, streaming). Uneven distribution suggests load balancer or DNS issues requiring investigation.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n envoy_http_downstream_cx_active{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=\"$envoy_http_conn_manager_prefix\"\n\n }\n) by (pod, envoy_http_conn_manager_prefix)\n", + "legendFormat": "{{ pod }}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "custom": { + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-2": { + "kind": "Panel", + "spec": { + "id": 2, + "title": "Downstreams Count by Job", + "description": "Distribution of downstream HTTP connection managers across different Prometheus job labels. Helps understand how client-facing listeners are organized across Envoy deployments or environments. Imbalanced distribution may indicate configuration inconsistencies.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "count(\n envoy_http_downstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }\n) by (job)\n", + "instant": true, + "legendFormat": "{{ job }}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "piechart", + "version": "v11.4.0", + "spec": { + "options": { + "displayLabels": [ + "percent" + ], + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "percent" + ] + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "downstreams" + }, + "overrides": [] + } + } + } + } + }, + "panel-3": { + "kind": "Panel", + "spec": { + "id": 3, + "title": "Downstream Rate by Envoy HTTP Conn Manager Prefix [1h]", + "description": "Request rate distribution across downstream connection managers over the past hour (top 20). Identifies which ingress points receive the most client traffic. Use this to validate traffic routing, detect unexpected traffic patterns, and identify hot spots requiring load balancing adjustments.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "topk(20,\n sum(\n rate(\n envoy_http_downstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }[1h]\n )\n ) by (envoy_http_conn_manager_prefix)\n)\n", + "instant": true, + "legendFormat": "{{ envoy_http_conn_manager_prefix }}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "piechart", + "version": "v11.4.0", + "spec": { + "options": { + "displayLabels": [ + "percent" + ], + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "percent" + ] + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps" + }, + "overrides": [] + } + } + } + } + }, + "panel-4": { + "kind": "Panel", + "spec": { + "id": 4, + "title": "Downstream Rate by Code Class [1h]", + "description": "Breakdown of client responses by HTTP status code class over the past hour. Healthy services show 95%+ 2xx responses. High 4xx proportions indicate client errors, authentication issues, or invalid requests. Any 5xx responses indicate service failures requiring immediate investigation.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "sum(\n rate(\n envoy_http_downstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }[1h]\n )\n) by (envoy_response_code_class)\n", + "instant": true, + "legendFormat": "{{ envoy_response_code_class }}xx" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "piechart", + "version": "v11.4.0", + "spec": { + "options": { + "displayLabels": [ + "percent" + ], + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "percent" + ] + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps" + }, + "overrides": [] + } + } + } + } + }, + "panel-5": { + "kind": "Panel", + "spec": { + "id": 5, + "title": "Downstream Active Connections by Envoy HTTP Conn Manager Prefix", + "description": "Distribution of currently active client connections across HTTP connection managers. Shows which ingress points are handling the most concurrent connections. High connection counts relative to request rates may indicate slow clients, long-polling connections, or WebSocket traffic.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "topk(20,\n sum(\n envoy_http_downstream_cx_active{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }\n ) by (envoy_http_conn_manager_prefix)\n)\n", + "instant": true, + "legendFormat": "{{ envoy_http_conn_manager_prefix }}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "piechart", + "version": "v11.4.0", + "spec": { + "options": { + "displayLabels": [ + "percent" + ], + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "percent" + ] + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "short" + }, + "overrides": [] + } + } + } + } + }, + "panel-7": { + "kind": "Panel", + "spec": { + "id": 7, + "title": "Downstream Rate", + "description": "Client request rate per HTTP connection manager over time. Each line represents traffic to a specific ingress listener. Sudden spikes may indicate traffic surges, DDoS attacks, or sudden popularity. Drops suggest client-side issues or upstream routing changes. Use to monitor ingress traffic patterns.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_http_downstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n) by (envoy_http_conn_manager_prefix)\n", + "legendFormat": "{{ envoy_http_conn_manager_prefix }}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps", + "custom": { + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-8": { + "kind": "Panel", + "spec": { + "id": 8, + "title": "Downstream Latency", + "description": "End-to-end request latency as experienced by clients. P50 shows typical response time, P95/P99 reveal tail latency impacting user experience. Rising tail latency often precedes user complaints. Investigate when P95 exceeds SLOs. Correlate with upstream latency to identify bottlenecks. Exemplars enable trace-based debugging.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "histogram_quantile(\n 0.5,\n sum(\n rate(\n envoy_http_downstream_rq_time_bucket{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n ) by (le)\n)\n", + "legendFormat": "P50" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "histogram_quantile(\n 0.95,\n sum(\n rate(\n envoy_http_downstream_rq_time_bucket{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n ) by (le)\n)\n", + "legendFormat": "P95" + } + }, + "refId": "B", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": true, + "expr": "histogram_quantile(\n 0.99,\n sum(\n rate(\n envoy_http_downstream_rq_time_bucket{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n ) by (le)\n)\n", + "legendFormat": "P99" + } + }, + "refId": "C", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "ms", + "custom": { + "fillOpacity": 10 + } + }, + "overrides": [] + } + } + } + } + }, + "panel-9": { + "kind": "Panel", + "spec": { + "id": 9, + "title": "Downstream Success Rate (Excluding 4xx errors)", + "description": "Client success rate excluding 4xx errors (treating client errors as successful). Values below 99.9% indicate service-side problems. Drops correlate with backend failures or Envoy issues. Compare with upstream success rates to determine if failures originate from backends or proxy layer.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_http_downstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=\"$envoy_http_conn_manager_prefix\"\n,\n envoy_response_code_class!=\"5\"\n }[$__rate_interval]\n )\n)\n/\nsum(\n rate(\n envoy_http_downstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n)\n* 100\n", + "legendFormat": "Success Rate" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "percent", + "custom": { + "axisSoftMax": 100, + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + } + }, + "layout": { + "kind": "RowsLayout", + "spec": { + "rows": [ + { + "kind": "RowsLayoutRow", + "spec": { + "title": "Summary", + "collapse": false, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 4, + "width": 6, + "height": 6, + "element": { + "kind": "ElementReference", + "name": "panel-2" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 6, + "y": 4, + "width": 6, + "height": 6, + "element": { + "kind": "ElementReference", + "name": "panel-3" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 4, + "width": 6, + "height": 6, + "element": { + "kind": "ElementReference", + "name": "panel-4" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 18, + "y": 4, + "width": 6, + "height": 6, + "element": { + "kind": "ElementReference", + "name": "panel-5" + } + } + } + ] + } + } + } + }, + { + "kind": "RowsLayoutRow", + "spec": { + "title": "$envoy_http_conn_manager_prefix", + "collapse": false, + "repeat": { + "mode": "variable", + "value": "envoy_http_conn_manager_prefix" + }, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-7" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 0, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-8" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 8, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-9" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 8, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-10" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 16, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-11" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 16, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-12" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 24, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-13" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 24, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-14" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 32, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-15" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 32, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-16" + } + } + } + ] + } + } + } + } + ] + } + }, + "links": [ + { + "title": "Envoy", + "type": "dashboards", + "icon": "", + "tooltip": "", + "tags": [ + "envoy", + "envoy-mixin", + "gateway" + ], + "asDropdown": true, + "targetBlank": true, + "includeVars": false, + "keepTime": true + } + ], + "liveNow": false, + "preload": false, + "tags": [ + "envoy", + "envoy-mixin", + "gateway" + ], + "timeSettings": { + "timezone": "utc", + "from": "now-6h", + "to": "now", + "autoRefresh": "", + "autoRefreshIntervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "hideTimepicker": false, + "fiscalYearStartMonth": 0 + }, + "title": "Cilium / Envoy / Downstream", + "variables": [ + { + "kind": "DatasourceVariable", + "spec": { + "name": "datasource", + "pluginId": "prometheus", + "refresh": "never", + "regex": "", + "current": { + "text": "default", + "value": "default" + }, + "options": [], + "multi": false, + "includeAll": false, + "label": "Data source", + "hide": "dontHide", + "skipUrlSync": false, + "allowCustomValue": true + } + }, + { + "kind": "QueryVariable", + "spec": { + "name": "cluster", + "current": { + "text": "", + "value": "" + }, + "label": "Cluster", + "hide": "hideVariable", + "refresh": "onTimeRangeChanged", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "${datasource}" + }, + "spec": { + "__legacyStringValue": "label_values(envoy_cluster_upstream_rq_xx{}, cluster)" + } + }, + "regex": "", + "sort": "alphabeticalAsc", + "options": [], + "multi": false, + "includeAll": false, + "allowCustomValue": true + } + }, + { + "kind": "QueryVariable", + "spec": { + "name": "namespace", + "current": { + "text": "", + "value": "" + }, + "label": "Namespace", + "hide": "dontHide", + "refresh": "onTimeRangeChanged", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "${datasource}" + }, + "spec": { + "__legacyStringValue": "label_values(envoy_cluster_upstream_rq_xx{cluster=\"$cluster\"}, namespace)" + } + }, + "regex": "", + "sort": "alphabeticalAsc", + "options": [], + "multi": true, + "includeAll": true, + "allowCustomValue": true + } + }, + { + "kind": "QueryVariable", + "spec": { + "name": "job", + "current": { + "text": "", + "value": "" + }, + "label": "Job", + "hide": "dontHide", + "refresh": "onTimeRangeChanged", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "${datasource}" + }, + "spec": { + "__legacyStringValue": "label_values(envoy_cluster_upstream_rq_xx{cluster=\"$cluster\", namespace=~\"$namespace\"}, job)" + } + }, + "regex": "", + "sort": "alphabeticalAsc", + "options": [], + "multi": true, + "includeAll": true, + "allowCustomValue": true + } + }, + { + "kind": "QueryVariable", + "spec": { + "name": "envoy_http_conn_manager_prefix", + "current": { + "text": "", + "value": "" + }, + "label": "Envoy HTTP Conn Manager Prefix", + "hide": "dontHide", + "refresh": "onTimeRangeChanged", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "${datasource}" + }, + "spec": { + "__legacyStringValue": "label_values(envoy_http_downstream_rq_xx{cluster=\"$cluster\", namespace=~\"$namespace\", job=~\"$job\"}, envoy_http_conn_manager_prefix)" + } + }, + "regex": "", + "sort": "alphabeticalAsc", + "options": [], + "multi": true, + "includeAll": false, + "allowCustomValue": true + } + }, + { + "kind": "QueryVariable", + "spec": { + "name": "pod", + "current": { + "text": "", + "value": "" + }, + "label": "Pod", + "hide": "dontHide", + "refresh": "onTimeRangeChanged", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "${datasource}" + }, + "spec": { + "__legacyStringValue": "label_values(envoy_listener_http_downstream_rq_xx{cluster=\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", envoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"}, pod)" + } + }, + "regex": "", + "sort": "alphabeticalAsc", + "options": [], + "multi": true, + "includeAll": true, + "allowCustomValue": true + } + } + ] + } + } +kind: ConfigMap +metadata: + name: cilium-envoy-downstream-grafana-dashboard + namespace: kube-system + labels: + grafana_dashboard: "1" diff --git a/proxmox/manifests/grafana/dashboards/cilium-envoy-overview.yaml b/proxmox/manifests/grafana/dashboards/cilium-envoy-overview.yaml new file mode 100644 index 0000000..1060ef5 --- /dev/null +++ b/proxmox/manifests/grafana/dashboards/cilium-envoy-overview.yaml @@ -0,0 +1,2941 @@ +apiVersion: v1 +data: + cilium-envoy-overview.json: | + { + "apiVersion": "dashboard.grafana.app/v2", + "kind": "Dashboard", + "metadata": { + "name": "cilium-envoy-overview", + "namespace": "default", + "uid": "643b15c8-d5f1-4e4c-81e3-553a20c07b06", + "resourceVersion": "1788358339231006", + "generation": 1, + "creationTimestamp": "2026-09-02T14:12:19Z", + "labels": { + "grafana.app/deprecatedInternalID": "979019200385024" + }, + "annotations": { + "grafana.app/createdBy": "user:cfx1picle4dmod", + "grafana.app/saved-from-ui": "Grafana v13.2.0 (f681b1359f)" + } + }, + "spec": { + "annotations": [ + { + "kind": "AnnotationQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "grafana", + "version": "v0", + "datasource": { + "name": "-- Grafana --" + }, + "spec": {} + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "builtIn": true, + "legacyOptions": { + "type": "dashboard" + } + } + } + ], + "cursorSync": "Off", + "description": "A comprehensive overview dashboard for monitoring Envoy proxy deployments. Provides high-level metrics across all upstreams and downstreams including request rates, latency percentiles, success rates, active connections, and SSL certificate expirations. Use this dashboard to identify trends, spot anomalies, and drill down into specific upstream clusters or downstream connection managers. The dashboards were generated using [envoy-mixin](https://github.com/adinhodovic/envoy-mixin). Open issues and create feature requests in the repository.", + "editable": false, + "elements": { + "panel-10": { + "kind": "Panel", + "spec": { + "id": 10, + "title": "Downstream Rate by Envoy HTTP Conn Manager Prefix [1h]", + "description": "Distribution of incoming client traffic across different HTTP connection managers (listeners) over the past hour. Helps identify which ingress points receive the most traffic and validate routing configurations.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "topk(20,\n sum(\n rate(\n envoy_http_downstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[1h]\n )\n ) by (envoy_http_conn_manager_prefix)\n)\n", + "instant": true, + "legendFormat": "{{ envoy_http_conn_manager_prefix }}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "piechart", + "version": "v11.4.0", + "spec": { + "options": { + "displayLabels": [ + "percent" + ], + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "percent" + ] + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps" + }, + "overrides": [] + } + } + } + } + }, + "panel-11": { + "kind": "Panel", + "spec": { + "id": 11, + "title": "Upstream Rate by Pod [1h]", + "description": "Distribution of upstream requests across Envoy proxy pods over the past hour. Use this to verify load balancing across proxy instances and identify if specific pods are handling disproportionate traffic, which may indicate scaling or routing issues.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[1h]\n )\n) by (pod)\n", + "instant": true, + "legendFormat": "{{ pod }}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "piechart", + "version": "v11.4.0", + "spec": { + "options": { + "displayLabels": [ + "percent" + ], + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "percent" + ] + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps" + }, + "overrides": [] + } + } + } + } + }, + "panel-13": { + "kind": "Panel", + "spec": { + "id": 13, + "title": "Upstream Rate", + "description": "Aggregated upstream request rate across all selected clusters over time. Shows overall backend traffic volume. Sudden drops may indicate upstream failures or circuit breaker activations. Spikes could indicate retry storms or traffic surges.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n)\n", + "legendFormat": "Upstream" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps", + "custom": { + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-14": { + "kind": "Panel", + "spec": { + "id": 14, + "title": "Upstream Latency", + "description": "Upstream request latency percentiles (P50, P95, P99) measured from Envoy to backend services. Includes connection establishment, request transmission, backend processing, and response receipt. Increasing P95/P99 often indicates backend degradation before P50 is affected. Use exemplars to trace high-latency requests.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "histogram_quantile(\n 0.5,\n sum(\n rate(\n envoy_cluster_upstream_rq_time_bucket{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n ) by (le)\n)\n", + "legendFormat": "P50" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "histogram_quantile(\n 0.95,\n sum(\n rate(\n envoy_cluster_upstream_rq_time_bucket{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n ) by (le)\n)\n", + "legendFormat": "P95" + } + }, + "refId": "B", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": true, + "expr": "histogram_quantile(\n 0.99,\n sum(\n rate(\n envoy_cluster_upstream_rq_time_bucket{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n ) by (le)\n)\n", + "legendFormat": "P99" + } + }, + "refId": "C", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "ms", + "custom": { + "fillOpacity": 10 + } + }, + "overrides": [] + } + } + } + } + }, + "panel-15": { + "kind": "Panel", + "spec": { + "id": 15, + "title": "Upstream Success Rate (Excluding 4xx errors)", + "description": "Percentage of successful upstream requests (non-5xx responses). This metric treats 4xx errors as successful since they typically indicate client issues, not backend failures. Values below 99.9% may indicate backend health problems. Correlate drops with circuit breaker openings and health check failures.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n,\n envoy_response_code_class!=\"5\"\n }[$__rate_interval]\n )\n)\n/\nsum(\n rate(\n envoy_cluster_upstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n)\n* 100\n", + "legendFormat": "Success Rate" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "percent", + "custom": { + "axisSoftMax": 100, + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-16": { + "kind": "Panel", + "spec": { + "id": 16, + "title": "Upstream Success Rate (Including 4xx errors)", + "description": "Percentage of successful upstream requests (non-4xx/5xx responses). This stricter metric counts both client errors (4xx) and server errors (5xx) as failures. Use this to assess overall request success from an end-user perspective. Lower rates may indicate API contract issues, authentication problems, or backend failures.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n,\n envoy_response_code_class!~\"4|5\"\n }[$__rate_interval]\n )\n)\n/\nsum(\n rate(\n envoy_cluster_upstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n)\n* 100\n", + "legendFormat": "Success Rate" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "percent", + "custom": { + "axisSoftMax": 100, + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-17": { + "kind": "Panel", + "spec": { + "id": 17, + "title": "Upstream Overview [1h]", + "description": "An overview table showing various upstream metrics by Envoy cluster name [1h].", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "topk(40,\n sum(\n rate(\n envoy_cluster_upstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[1h]\n )\n ) by (envoy_cluster_name)\n)\n", + "format": "table", + "instant": true + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n,\n envoy_response_code_class!=\"5\"\n }[1h]\n )\n) by (job, envoy_cluster_name)\n/\nsum(\n rate(\n envoy_cluster_upstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[1h]\n )\n) by (job, envoy_cluster_name)\n* 100\nand on (envoy_cluster_name) (\n topk(40,\n sum(\n rate(\n envoy_cluster_upstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[1h]\n )\n ) by (envoy_cluster_name)\n)\n\n)\n\n", + "format": "table", + "instant": true + } + }, + "refId": "B", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n,\n envoy_response_code_class!~\"4|5\"\n }[1h]\n )\n) by (job, envoy_cluster_name)\n/\nsum(\n rate(\n envoy_cluster_upstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[1h]\n )\n) by (job, envoy_cluster_name)\n* 100\nand on (envoy_cluster_name) (\n topk(40,\n sum(\n rate(\n envoy_cluster_upstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[1h]\n )\n ) by (envoy_cluster_name)\n)\n\n)\n\n", + "format": "table", + "instant": true + } + }, + "refId": "C", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "histogram_quantile(\n 0.5,\n sum(\n rate(\n envoy_cluster_upstream_rq_time_bucket{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[1h]\n )\n ) by (le, job, envoy_cluster_name)\n)\nand on (envoy_cluster_name) (\n topk(40,\n sum(\n rate(\n envoy_cluster_upstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[1h]\n )\n ) by (envoy_cluster_name)\n)\n\n)\n\n", + "format": "table", + "instant": true + } + }, + "refId": "D", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "histogram_quantile(\n 0.95,\n sum(\n rate(\n envoy_cluster_upstream_rq_time_bucket{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[1h]\n )\n ) by (le, job, envoy_cluster_name)\n)\nand on (envoy_cluster_name) (\n topk(40,\n sum(\n rate(\n envoy_cluster_upstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[1h]\n )\n ) by (envoy_cluster_name)\n)\n\n)\n\n", + "format": "table", + "instant": true + } + }, + "refId": "E", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "sum(\n avg_over_time(\n envoy_cluster_upstream_cx_active{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[1h]\n )\n) by (job, envoy_cluster_name)\nand on (envoy_cluster_name) (\n topk(40,\n sum(\n rate(\n envoy_cluster_upstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[1h]\n )\n ) by (envoy_cluster_name)\n)\n\n)\n\n", + "format": "table", + "instant": true + } + }, + "refId": "F", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "sum(\n increase(\n envoy_cluster_upstream_cx_destroy{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[1h]\n )\n) by (job, envoy_cluster_name)\nand on (envoy_cluster_name) (\n topk(40,\n sum(\n rate(\n envoy_cluster_upstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[1h]\n )\n ) by (envoy_cluster_name)\n)\n\n)\n\n", + "format": "table", + "instant": true + } + }, + "refId": "G", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "sum(\n envoy_cluster_membership_healthy{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }\n) by (job, envoy_cluster_name)\n/\nsum(\n envoy_cluster_membership_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }\n) by (job, envoy_cluster_name)\n* 100\nand on (envoy_cluster_name) (\n topk(40,\n sum(\n rate(\n envoy_cluster_upstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[1h]\n )\n ) by (envoy_cluster_name)\n)\n\n)\n\n", + "format": "table", + "instant": true + } + }, + "refId": "H", + "hidden": false + } + } + ], + "transformations": [ + { + "kind": "Transformation", + "group": "merge", + "spec": { + "options": null + } + }, + { + "kind": "Transformation", + "group": "organize", + "spec": { + "options": { + "excludeByName": { + "Time": true + }, + "indexByName": { + "Value #A": 2, + "Value #B": 3, + "Value #C": 4, + "Value #D": 5, + "Value #E": 6, + "Value #F": 7, + "Value #G": 8, + "Value #H": 9, + "Value #I": 10, + "envoy_cluster_name": 0, + "job": 1 + }, + "renameByName": { + "Value #A": "Request Rate", + "Value #B": "Success Rate (5xx)", + "Value #C": "Success Rate (4xx & 5xx)", + "Value #D": "P50 Latency", + "Value #E": "P95 Latency", + "Value #F": "Active Connections", + "Value #G": "Destroyed Connections", + "Value #H": "Healthy Cluster Percent", + "envoy_cluster_name": "Envoy Cluster Name", + "job": "Job" + } + } + } + } + ], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "table", + "version": "v11.4.0", + "spec": { + "options": { + "footer": { + "enablePagination": true + }, + "sortBy": [ + { + "desc": true, + "displayName": "Request Rate" + } + ] + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "thresholds": { + "mode": "", + "steps": [] + }, + "links": [ + { + "targetBlank": true, + "title": "Go To Upstream", + "type": "dashboard", + "url": "/d/envoy-upstream-skj2/envoy-upstream?&var-envoy_cluster_name=${__data.fields.Envoy Cluster Name}" + } + ] + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "SSL Expirations" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeFromNow" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "P50 Latency" + }, + "properties": [ + { + "id": "unit", + "value": "ms" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "P95 Latency" + }, + "properties": [ + { + "id": "unit", + "value": "ms" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Request Rate" + }, + "properties": [ + { + "id": "unit", + "value": "reqps" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Success Rate (5xx)" + }, + "properties": [ + { + "id": "unit", + "value": "percent" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Success Rate (4xx & 5xx)" + }, + "properties": [ + { + "id": "unit", + "value": "percent" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Healthy Cluster Percent" + }, + "properties": [ + { + "id": "unit", + "value": "percent" + } + ] + } + ] + } + } + } + } + }, + "panel-19": { + "kind": "Panel", + "spec": { + "id": 19, + "title": "Downstream Rate by Envoy HTTP Conn Manager Prefix", + "description": "Client request rate by HTTP connection manager (listener) over time. Shows top 20 busiest ingress points. Use this to identify traffic patterns, detect sudden spikes that may indicate attacks, or validate that traffic is being distributed as expected across listeners.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "topk(20,\n sum(\n rate(\n envoy_http_downstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n ) by (envoy_http_conn_manager_prefix)\n)\n", + "legendFormat": "{{ envoy_http_conn_manager_prefix }}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps", + "custom": { + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-2": { + "kind": "Panel", + "spec": { + "id": 2, + "title": "Envoy Pods", + "description": "Total number of Envoy proxy pods currently being monitored. A sudden drop may indicate pod crashes or deployment issues, while increases should align with scaling events.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "count(\n count (\n envoy_cluster_upstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }\n ) by (pod)\n)\n" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "v11.4.0", + "spec": { + "options": { + "graphMode": "area", + "percentChangeColorMode": "standard", + "showPercentChange": false + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "thresholds": { + "mode": "", + "steps": [ + { + "value": 0, + "color": "green" + } + ] + } + }, + "overrides": [] + } + } + } + } + }, + "panel-20": { + "kind": "Panel", + "spec": { + "id": 20, + "title": "Downstream Latency", + "description": "End-to-end request latency percentiles (P50, P95, P99) as experienced by clients. Includes time from request receipt to response completion. Rising P95/P99 indicates degraded user experience - investigate upstream latency, connection issues, or resource constraints. Use exemplars to trace slow requests.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "histogram_quantile(\n 0.5,\n sum(\n rate(\n envoy_http_downstream_rq_time_bucket{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n ) by (le)\n)\n", + "legendFormat": "P50" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "histogram_quantile(\n 0.95,\n sum(\n rate(\n envoy_http_downstream_rq_time_bucket{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n ) by (le)\n)\n", + "legendFormat": "P95" + } + }, + "refId": "B", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": true, + "expr": "histogram_quantile(\n 0.99,\n sum(\n rate(\n envoy_http_downstream_rq_time_bucket{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n ) by (le)\n)\n", + "legendFormat": "P99" + } + }, + "refId": "C", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "ms", + "custom": { + "fillOpacity": 10 + } + }, + "overrides": [] + } + } + } + } + }, + "panel-21": { + "kind": "Panel", + "spec": { + "id": 21, + "title": "Downstream Success Rate (Excluding 4xx errors)", + "description": "Percentage of successful client requests (non-5xx responses). Treats 4xx as successful since they indicate client errors, not service failures. Values below 99.9% indicate problems with backends or Envoy itself. Correlate with upstream metrics and error logs to diagnose issues.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_http_downstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n,\n envoy_response_code_class!=\"5\"\n }[$__rate_interval]\n )\n)\n/\nsum(\n rate(\n envoy_http_downstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n)\n* 100\n", + "legendFormat": "Success Rate" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "percent", + "custom": { + "axisSoftMax": 100, + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-22": { + "kind": "Panel", + "spec": { + "id": 22, + "title": "Downstream Success Rate (Including 4xx errors)", + "description": "Percentage of successful client requests (non-4xx/5xx responses). Stricter metric counting both client and server errors as failures. Reflects actual user experience - drops indicate authentication issues, invalid requests, or backend failures. Use to assess overall API health from client perspective.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_http_downstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n,\n envoy_response_code_class!~\"4|5\"\n }[$__rate_interval]\n )\n)\n/\nsum(\n rate(\n envoy_http_downstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n)\n* 100\n", + "legendFormat": "Success Rate" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "percent", + "custom": { + "axisSoftMax": 100, + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-23": { + "kind": "Panel", + "spec": { + "id": 23, + "title": "Downstream Overview [1h]", + "description": "An overview table showing various downstream metrics by Envoy HTTP connection manager prefix [1h].", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "topk(40,\n sum(\n rate(\n envoy_http_downstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[1h]\n )\n ) by (envoy_http_conn_manager_prefix)\n)\n", + "format": "table", + "instant": true + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "sum(\n rate(\n envoy_http_downstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n,\n envoy_response_code_class!=\"5\"\n }[1h]\n )\n) by (job, envoy_http_conn_manager_prefix)\n/\nsum(\n rate(\n envoy_http_downstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[1h]\n )\n) by (job, envoy_http_conn_manager_prefix)\n* 100\nand on (envoy_http_conn_manager_prefix) (\n topk(40,\n sum(\n rate(\n envoy_http_downstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[1h]\n )\n ) by (envoy_http_conn_manager_prefix)\n)\n\n)\n\n", + "format": "table", + "instant": true + } + }, + "refId": "B", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "sum(\n rate(\n envoy_http_downstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n,\n envoy_response_code_class!~\"4|5\"\n }[1h]\n )\n) by (job, envoy_http_conn_manager_prefix)\n/\nsum(\n rate(\n envoy_http_downstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[1h]\n )\n) by (job, envoy_http_conn_manager_prefix)\n* 100\nand on (envoy_http_conn_manager_prefix) (\n topk(40,\n sum(\n rate(\n envoy_http_downstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[1h]\n )\n ) by (envoy_http_conn_manager_prefix)\n)\n\n)\n\n", + "format": "table", + "instant": true + } + }, + "refId": "C", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "histogram_quantile(\n 0.5,\n sum(\n rate(\n envoy_http_downstream_rq_time_bucket{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[1h]\n )\n ) by (le, job, envoy_http_conn_manager_prefix)\n)\nand on (envoy_http_conn_manager_prefix) (\n topk(40,\n sum(\n rate(\n envoy_http_downstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[1h]\n )\n ) by (envoy_http_conn_manager_prefix)\n)\n\n)\n\n", + "format": "table", + "instant": true + } + }, + "refId": "D", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "histogram_quantile(\n 0.95,\n sum(\n rate(\n envoy_http_downstream_rq_time_bucket{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[1h]\n )\n ) by (le, job, envoy_http_conn_manager_prefix)\n)\nand on (envoy_http_conn_manager_prefix) (\n topk(40,\n sum(\n rate(\n envoy_http_downstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[1h]\n )\n ) by (envoy_http_conn_manager_prefix)\n)\n\n)\n\n", + "format": "table", + "instant": true + } + }, + "refId": "E", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "sum(\n avg_over_time(\n envoy_http_downstream_cx_active{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[1h]\n )\n) by (job, envoy_http_conn_manager_prefix)\nand on (envoy_http_conn_manager_prefix) (\n topk(40,\n sum(\n rate(\n envoy_http_downstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[1h]\n )\n ) by (envoy_http_conn_manager_prefix)\n)\n\n)\n\n", + "format": "table", + "instant": true + } + }, + "refId": "F", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "sum(\n increase(\n envoy_http_downstream_cx_destroy{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[1h]\n )\n) by (job, envoy_http_conn_manager_prefix)\nand on (envoy_http_conn_manager_prefix) (\n topk(40,\n sum(\n rate(\n envoy_http_downstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[1h]\n )\n ) by (envoy_http_conn_manager_prefix)\n)\n\n)\n\n", + "format": "table", + "instant": true + } + }, + "refId": "G", + "hidden": false + } + } + ], + "transformations": [ + { + "kind": "Transformation", + "group": "merge", + "spec": { + "options": null + } + }, + { + "kind": "Transformation", + "group": "organize", + "spec": { + "options": { + "excludeByName": { + "Time": true + }, + "indexByName": { + "Value #A": 2, + "Value #B": 3, + "Value #C": 4, + "Value #D": 5, + "Value #E": 6, + "Value #F": 7, + "Value #G": 8, + "envoy_http_conn_manager_prefix": 0, + "job": 1 + }, + "renameByName": { + "Value #A": "Request Rate", + "Value #B": "Success Rate (5xx)", + "Value #C": "Success Rate (4xx & 5xx)", + "Value #D": "P50 Latency", + "Value #E": "P95 Latency", + "Value #F": "Active Connections", + "Value #G": "Destroyed Connections", + "envoy_http_conn_manager_prefix": "Envoy HTTP Conn Manager Prefix", + "job": "Job" + } + } + } + } + ], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "table", + "version": "v11.4.0", + "spec": { + "options": { + "footer": { + "enablePagination": true + }, + "sortBy": [ + { + "desc": true, + "displayName": "Request Rate" + } + ] + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "thresholds": { + "mode": "", + "steps": [] + }, + "links": [ + { + "targetBlank": true, + "title": "Go To Downstream", + "type": "dashboard", + "url": "/d/envoy-downstream-skj2/envoy-downstream?var-envoy_http_conn_manager_prefix=${__data.fields.Envoy HTTP Conn Manager Prefix}" + } + ] + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "P50 Latency" + }, + "properties": [ + { + "id": "unit", + "value": "ms" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "P95 Latency" + }, + "properties": [ + { + "id": "unit", + "value": "ms" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Request Rate" + }, + "properties": [ + { + "id": "unit", + "value": "reqps" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Success Rate (5xx)" + }, + "properties": [ + { + "id": "unit", + "value": "percent" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Success Rate (4xx & 5xx)" + }, + "properties": [ + { + "id": "unit", + "value": "percent" + } + ] + } + ] + } + } + } + } + }, + "panel-25": { + "kind": "Panel", + "spec": { + "id": 25, + "title": "HTTP/2 Outbound Flood", + "description": "Rate of connections terminated due to outbound HTTP/2 frame flood protection. Outbound Flood = total outbound frame queue (DATA, HEADERS, etc.) exceeded max_outbound_frames. Outbound Control Flood = control frame queue (PING, SETTINGS, RST_STREAM) exceeded max_outbound_control_frames. Non-zero values indicate slow or unresponsive clients unable to consume frames fast enough, or misconfigured flood limits.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_http2_outbound_flood{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }[$__rate_interval]\n )\n)\n", + "legendFormat": "Outbound Flood" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_http2_outbound_control_flood{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }[$__rate_interval]\n )\n)\n", + "legendFormat": "Outbound Control Flood" + } + }, + "refId": "B", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps", + "custom": { + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-26": { + "kind": "Panel", + "spec": { + "id": 26, + "title": "HTTP/2 Inbound Flood", + "description": "Rate of connections terminated due to inbound HTTP/2 frame flood protection. Empty Frames = consecutive frames with empty payload exceeded max_consecutive_inbound_frames_with_empty_payload. Priority Frames = PRIORITY frame flood exceeded max_inbound_priority_frames_per_stream. Window Update Frames = WINDOW_UPDATE flood exceeded max_inbound_window_update_frames_per_data_frame_sent. Any non-zero rate signals a potential HTTP/2 denial-of-service attack or severely misbehaving client.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_http2_inbound_empty_frames_flood{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }[$__rate_interval]\n )\n)\n", + "legendFormat": "Empty Frames" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_http2_inbound_priority_frames_flood{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }[$__rate_interval]\n )\n)\n", + "legendFormat": "Priority Frames" + } + }, + "refId": "B", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_http2_inbound_window_update_frames_flood{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }[$__rate_interval]\n )\n)\n", + "legendFormat": "Window Update Frames" + } + }, + "refId": "C", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps", + "custom": { + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-28": { + "kind": "Panel", + "spec": { + "id": 28, + "title": "SSL Expirations by Envoy TLS Certificate", + "description": "SSL/TLS certificate expiration dates for each certificate loaded by Envoy listeners. Displays minimum expiration time to highlight the most urgent renewal needed. Monitor this panel to prevent service disruptions due to expired certificates. Set up alerts for certificates expiring within 30 days.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "min(\n envoy_listener_ssl_certificate_expiration_unix_time_seconds{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }\n) by (job, envoy_tls_certificate)\n* 1000\n", + "legendFormat": "{{ envoy_tls_certificate }}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "min" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "min", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "dateTimeAsIso", + "custom": { + "fillOpacity": 10 + } + }, + "overrides": [] + } + } + } + } + }, + "panel-3": { + "kind": "Panel", + "spec": { + "id": 3, + "title": "Upstreams", + "description": "Total count of unique upstream clusters (backend services) configured across all Envoy proxies. Changes in this metric indicate service discovery updates or configuration changes.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "count(\n count(\n envoy_cluster_upstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }\n ) by (envoy_cluster_name)\n)\n" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "v11.4.0", + "spec": { + "options": { + "graphMode": "area", + "percentChangeColorMode": "standard", + "showPercentChange": false + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "thresholds": { + "mode": "", + "steps": [ + { + "value": 0, + "color": "green" + } + ] + } + }, + "overrides": [] + } + } + } + } + }, + "panel-4": { + "kind": "Panel", + "spec": { + "id": 4, + "title": "Downstreams", + "description": "Total count of downstream HTTP connection managers (ingress listeners) across all Envoy proxies. Represents the number of distinct entry points accepting client traffic.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "count(\n count(\n envoy_http_downstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }\n ) by (envoy_http_conn_manager_prefix)\n)\n" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "v11.4.0", + "spec": { + "options": { + "graphMode": "area", + "percentChangeColorMode": "standard", + "showPercentChange": false + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "thresholds": { + "mode": "", + "steps": [ + { + "value": 0, + "color": "green" + } + ] + } + }, + "overrides": [] + } + } + } + } + }, + "panel-5": { + "kind": "Panel", + "spec": { + "id": 5, + "title": "Upstream Active Connections", + "description": "Current number of active TCP connections from Envoy proxies to upstream services. High values may indicate connection pooling issues or slow backend responses. Compare with request rate to assess connection efficiency.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "sum(\n envoy_cluster_upstream_cx_active{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }\n)\n" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "v11.4.0", + "spec": { + "options": { + "graphMode": "area", + "percentChangeColorMode": "standard", + "showPercentChange": false + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "thresholds": { + "mode": "", + "steps": [ + { + "value": 0, + "color": "green" + } + ] + } + }, + "overrides": [] + } + } + } + } + }, + "panel-6": { + "kind": "Panel", + "spec": { + "id": 6, + "title": "Downstream Active Connections", + "description": "Current number of active TCP connections from clients to Envoy proxies. Sudden spikes may indicate traffic surges or slow request processing. Monitor alongside request rates to identify connection leaks.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "sum(\n envoy_http_downstream_cx_active{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }\n)\n" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "v11.4.0", + "spec": { + "options": { + "graphMode": "area", + "percentChangeColorMode": "standard", + "showPercentChange": false + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "thresholds": { + "mode": "", + "steps": [ + { + "value": 0, + "color": "green" + } + ] + } + }, + "overrides": [] + } + } + } + } + }, + "panel-7": { + "kind": "Panel", + "spec": { + "id": 7, + "title": "Membership Healthy Percent", + "description": "Percentage of healthy upstream endpoints across all clusters based on active health checks. Values below 100% indicate failing health checks - investigate unhealthy hosts immediately as this impacts traffic distribution and availability.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "sum(\n envoy_cluster_membership_healthy{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }\n)\n/\nsum(\n envoy_cluster_membership_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }\n)\n* 100\n" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "v11.4.0", + "spec": { + "options": { + "graphMode": "area", + "percentChangeColorMode": "standard", + "showPercentChange": false + }, + "fieldConfig": { + "defaults": { + "unit": "percent", + "thresholds": { + "mode": "", + "steps": [ + { + "value": 0, + "color": "green" + } + ] + } + }, + "overrides": [] + } + } + } + } + }, + "panel-8": { + "kind": "Panel", + "spec": { + "id": 8, + "title": "Upstream Rate by Envoy Cluster Name [1h]", + "description": "Distribution of upstream request traffic across backend clusters over the past hour. Shows which services receive the most traffic. Use this to identify hot spots, validate load distribution, and detect unexpected traffic patterns to specific backends.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "topk(20,\n sum(\n rate(\n envoy_cluster_upstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[1h]\n )\n ) by (envoy_cluster_name)\n)\n", + "instant": true, + "legendFormat": "{{ envoy_cluster_name }}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "piechart", + "version": "v11.4.0", + "spec": { + "options": { + "displayLabels": [ + "percent" + ], + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "percent" + ] + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps" + }, + "overrides": [] + } + } + } + } + }, + "panel-9": { + "kind": "Panel", + "spec": { + "id": 9, + "title": "Upstream Rate by Code Class [1h]", + "description": "Breakdown of upstream responses by HTTP status code class (2xx, 3xx, 4xx, 5xx) over the past hour. High proportions of 4xx may indicate client errors or misconfigurations, while 5xx indicates backend failures requiring immediate attention.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[1h]\n )\n) by (envoy_response_code_class)\n", + "instant": true, + "legendFormat": "{{ envoy_response_code_class }}xx" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "piechart", + "version": "v11.4.0", + "spec": { + "options": { + "displayLabels": [ + "percent" + ], + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "percent" + ] + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps" + }, + "overrides": [] + } + } + } + } + } + }, + "layout": { + "kind": "RowsLayout", + "spec": { + "rows": [ + { + "kind": "RowsLayoutRow", + "spec": { + "title": "Summary", + "collapse": false, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 4, + "height": 4, + "element": { + "kind": "ElementReference", + "name": "panel-2" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 4, + "y": 0, + "width": 4, + "height": 4, + "element": { + "kind": "ElementReference", + "name": "panel-3" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 8, + "y": 0, + "width": 4, + "height": 4, + "element": { + "kind": "ElementReference", + "name": "panel-4" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 0, + "width": 4, + "height": 4, + "element": { + "kind": "ElementReference", + "name": "panel-5" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 16, + "y": 0, + "width": 4, + "height": 4, + "element": { + "kind": "ElementReference", + "name": "panel-6" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 20, + "y": 0, + "width": 4, + "height": 4, + "element": { + "kind": "ElementReference", + "name": "panel-7" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 4, + "width": 6, + "height": 6, + "element": { + "kind": "ElementReference", + "name": "panel-8" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 6, + "y": 4, + "width": 6, + "height": 6, + "element": { + "kind": "ElementReference", + "name": "panel-9" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 4, + "width": 6, + "height": 6, + "element": { + "kind": "ElementReference", + "name": "panel-10" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 18, + "y": 4, + "width": 6, + "height": 6, + "element": { + "kind": "ElementReference", + "name": "panel-11" + } + } + } + ] + } + } + } + }, + { + "kind": "RowsLayoutRow", + "spec": { + "title": "Upstream", + "collapse": false, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-13" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 0, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-14" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 8, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-15" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 8, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-16" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 16, + "width": 24, + "height": 12, + "element": { + "kind": "ElementReference", + "name": "panel-17" + } + } + } + ] + } + } + } + }, + { + "kind": "RowsLayoutRow", + "spec": { + "title": "Downstream", + "collapse": false, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-19" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 0, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-20" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 8, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-21" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 8, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-22" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 16, + "width": 24, + "height": 12, + "element": { + "kind": "ElementReference", + "name": "panel-23" + } + } + } + ] + } + } + } + }, + { + "kind": "RowsLayoutRow", + "spec": { + "title": "HTTP/2", + "collapse": false, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-25" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 0, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-26" + } + } + } + ] + } + } + } + }, + { + "kind": "RowsLayoutRow", + "spec": { + "title": "SSL", + "collapse": false, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 24, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-28" + } + } + } + ] + } + } + } + } + ] + } + }, + "links": [ + { + "title": "Envoy", + "type": "dashboards", + "icon": "", + "tooltip": "", + "tags": [ + "envoy", + "envoy-mixin", + "gateway" + ], + "asDropdown": true, + "targetBlank": true, + "includeVars": false, + "keepTime": true + } + ], + "liveNow": false, + "preload": false, + "tags": [ + "envoy", + "envoy-mixin", + "gateway" + ], + "timeSettings": { + "timezone": "utc", + "from": "now-6h", + "to": "now", + "autoRefresh": "", + "autoRefreshIntervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "hideTimepicker": false, + "fiscalYearStartMonth": 0 + }, + "title": "Cilium / Envoy / Overview", + "variables": [ + { + "kind": "DatasourceVariable", + "spec": { + "name": "datasource", + "pluginId": "prometheus", + "refresh": "never", + "regex": "", + "current": { + "text": "default", + "value": "default" + }, + "options": [], + "multi": false, + "includeAll": false, + "label": "Data source", + "hide": "dontHide", + "skipUrlSync": false, + "allowCustomValue": true + } + }, + { + "kind": "QueryVariable", + "spec": { + "name": "cluster", + "current": { + "text": "", + "value": "" + }, + "label": "Cluster", + "hide": "hideVariable", + "refresh": "onTimeRangeChanged", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "${datasource}" + }, + "spec": { + "__legacyStringValue": "label_values(envoy_cluster_upstream_rq_xx{}, cluster)" + } + }, + "regex": "", + "sort": "alphabeticalAsc", + "options": [], + "multi": false, + "includeAll": false, + "allowCustomValue": true + } + }, + { + "kind": "QueryVariable", + "spec": { + "name": "namespace", + "current": { + "text": "", + "value": "" + }, + "label": "Namespace", + "hide": "dontHide", + "refresh": "onTimeRangeChanged", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "${datasource}" + }, + "spec": { + "__legacyStringValue": "label_values(envoy_cluster_upstream_rq_xx{cluster=\"$cluster\"}, namespace)" + } + }, + "regex": "", + "sort": "alphabeticalAsc", + "options": [], + "multi": true, + "includeAll": true, + "allowCustomValue": true + } + }, + { + "kind": "QueryVariable", + "spec": { + "name": "job", + "current": { + "text": "", + "value": "" + }, + "label": "Job", + "hide": "dontHide", + "refresh": "onTimeRangeChanged", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "${datasource}" + }, + "spec": { + "__legacyStringValue": "label_values(envoy_cluster_upstream_rq_xx{cluster=\"$cluster\", namespace=~\"$namespace\"}, job)" + } + }, + "regex": "", + "sort": "alphabeticalAsc", + "options": [], + "multi": true, + "includeAll": true, + "allowCustomValue": true + } + }, + { + "kind": "QueryVariable", + "spec": { + "name": "envoy_cluster_name", + "current": { + "text": "", + "value": "" + }, + "label": "Envoy Cluster Name", + "hide": "dontHide", + "refresh": "onTimeRangeChanged", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "${datasource}" + }, + "spec": { + "__legacyStringValue": "label_values(envoy_cluster_upstream_rq_xx{cluster=\"$cluster\", namespace=~\"$namespace\", job=~\"$job\"}, envoy_cluster_name)" + } + }, + "regex": "", + "sort": "alphabeticalAsc", + "options": [], + "multi": true, + "includeAll": true, + "allowCustomValue": true + } + }, + { + "kind": "QueryVariable", + "spec": { + "name": "envoy_http_conn_manager_prefix", + "current": { + "text": "", + "value": "" + }, + "label": "Envoy HTTP Conn Manager Prefix", + "hide": "dontHide", + "refresh": "onTimeRangeChanged", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "${datasource}" + }, + "spec": { + "__legacyStringValue": "label_values(envoy_http_downstream_rq_xx{cluster=\"$cluster\", namespace=~\"$namespace\", job=~\"$job\"}, envoy_http_conn_manager_prefix)" + } + }, + "regex": "", + "sort": "alphabeticalAsc", + "options": [], + "multi": true, + "includeAll": true, + "allowCustomValue": true + } + }, + { + "kind": "QueryVariable", + "spec": { + "name": "pod", + "current": { + "text": "", + "value": "" + }, + "label": "Pod", + "hide": "dontHide", + "refresh": "onTimeRangeChanged", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "${datasource}" + }, + "spec": { + "__legacyStringValue": "label_values(envoy_listener_http_downstream_rq_xx{cluster=\"$cluster\", namespace=~\"$namespace\", job=~\"$job\"}, pod)" + } + }, + "regex": "", + "sort": "alphabeticalAsc", + "options": [], + "multi": true, + "includeAll": true, + "allowCustomValue": true + } + } + ] + } + } +kind: ConfigMap +metadata: + name: cilium-envoy-overview-grafana-dashboard + namespace: kube-system + labels: + grafana_dashboard: "1" diff --git a/proxmox/manifests/grafana/dashboards/cilium-envoy-upstream.yaml b/proxmox/manifests/grafana/dashboards/cilium-envoy-upstream.yaml new file mode 100644 index 0000000..302ea0e --- /dev/null +++ b/proxmox/manifests/grafana/dashboards/cilium-envoy-upstream.yaml @@ -0,0 +1,2153 @@ +apiVersion: v1 +data: + cilium-envoy-upstream.json: | + { + "apiVersion": "dashboard.grafana.app/v2", + "kind": "Dashboard", + "metadata": { + "name": "cilium-envoy-upstream", + "namespace": "default", + "uid": "8ff01bf5-fa52-4e7a-bd73-6e177d44a369", + "resourceVersion": "1788358446375990", + "generation": 1, + "creationTimestamp": "2026-09-02T14:14:06Z", + "labels": { + "grafana.app/deprecatedInternalID": "979467957358592" + }, + "annotations": { + "grafana.app/createdBy": "user:cfx1picle4dmod", + "grafana.app/saved-from-ui": "Grafana v13.2.0 (f681b1359f)" + } + }, + "spec": { + "annotations": [ + { + "kind": "AnnotationQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "grafana", + "version": "v0", + "datasource": { + "name": "-- Grafana --" + }, + "spec": {} + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "builtIn": true, + "legacyOptions": { + "type": "dashboard" + } + } + } + ], + "cursorSync": "Off", + "description": "Detailed upstream cluster monitoring for Envoy proxy. Tracks request rates, latency distributions (P50/P95/P99), success rates, connection health, circuit breaker status, retry behavior, and timeout patterns for each upstream cluster. Use this dashboard to troubleshoot backend service issues, identify performance bottlenecks, and monitor cluster health across all Envoy pods. Supports multi-cluster selection for comparative analysis. The dashboards were generated using [envoy-mixin](https://github.com/adinhodovic/envoy-mixin). Open issues and create feature requests in the repository.", + "editable": false, + "elements": { + "panel-10": { + "kind": "Panel", + "spec": { + "id": 10, + "title": "Upstream Success Rate (Including 4xx errors)", + "description": "Overall success rate counting both 4xx and 5xx as failures. Reflects end-user experience including authentication, authorization, and validation errors. Lower rates may indicate API contract mismatches, breaking changes, or integration issues between services.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n,\n envoy_response_code_class!~\"4|5\"\n }[$__rate_interval]\n )\n)\n/\nsum(\n rate(\n envoy_cluster_upstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n)\n* 100\n", + "legendFormat": "Success Rate" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "percent", + "custom": { + "axisSoftMax": 100, + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-11": { + "kind": "Panel", + "spec": { + "id": 11, + "title": "Upstream Rate by Code Class", + "description": "Request rate breakdown by HTTP status code class (2xx/3xx/4xx/5xx). Normal traffic shows dominant 2xx responses. Sudden 4xx spikes suggest client-side issues or API changes. Any 5xx indicates backend failures. Monitor 5xx rate to detect cascading failures early.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n) by (envoy_response_code_class)\n", + "legendFormat": "{{ envoy_response_code_class }}xx" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps", + "custom": { + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-12": { + "kind": "Panel", + "spec": { + "id": 12, + "title": "Upstream Rate by Code", + "description": "Detailed request rate by specific HTTP status code (200, 404, 500, etc.). Use this to identify specific error patterns. For example, 503 may indicate overload, 502 suggests gateway issues, and 429 shows rate limiting activation. Helps pinpoint exact failure modes.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n) by (envoy_response_code)\n", + "legendFormat": "{{ envoy_response_code }}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps", + "custom": { + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-13": { + "kind": "Panel", + "spec": { + "id": 13, + "title": "Upstream Healthy Percent", + "description": "Percentage of healthy endpoints per cluster based on active health checks. 100% indicates all endpoints passing health checks. Drops suggest failing instances - check pod logs, resource usage, and health check configurations. Envoy removes unhealthy endpoints from load balancing rotation.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n envoy_cluster_membership_healthy{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }\n) by (envoy_cluster_name)\n/\nsum(\n envoy_cluster_membership_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }\n) by (envoy_cluster_name)\n* 100\n", + "legendFormat": "{{ envoy_cluster_name }}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "percent", + "custom": { + "axisSoftMax": 100, + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-14": { + "kind": "Panel", + "spec": { + "id": 14, + "title": "Upstream Concurrency", + "description": "Current request and connection concurrency for the selected upstream cluster. Rising active requests with relatively flat connections points to request-level pressure. Rising connections and connection overflow points to connection-level pressure.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n envoy_cluster_upstream_rq_active{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }\n) by (envoy_cluster_name)\n", + "legendFormat": "Active Requests" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n envoy_cluster_upstream_cx_active{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }\n) by (envoy_cluster_name)\n", + "legendFormat": "Active Connections" + } + }, + "refId": "B", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "custom": { + "fillOpacity": 10 + } + }, + "overrides": [] + } + } + } + } + }, + "panel-15": { + "kind": "Panel", + "spec": { + "id": 15, + "title": "Upstream Pending and Overflow", + "description": "Pending queue activity and overflow signals for the selected upstream cluster. Pending overflow can indicate connection-pool overflow or request-breaker overflow, so a high overflow rate with low pending-active can still mean request concurrency pressure rather than a full queue.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n envoy_cluster_upstream_rq_pending_active{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }\n) by (envoy_cluster_name)\n", + "legendFormat": "Pending Requests Active" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_pending_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n) by (envoy_cluster_name)\n", + "legendFormat": "Pending Requests Rate" + } + }, + "refId": "B", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_pending_overflow{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n) by (envoy_cluster_name)\n", + "legendFormat": "Pending Overflow Rate" + } + }, + "refId": "C", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n increase(\n envoy_cluster_upstream_cx_overflow{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n) by (envoy_cluster_name)\n", + "legendFormat": "Connection Overflow Rate" + } + }, + "refId": "D", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "custom": { + "fillOpacity": 10 + } + }, + "overrides": [] + } + } + } + } + }, + "panel-16": { + "kind": "Panel", + "spec": { + "id": 16, + "title": "Upstream Connections", + "description": "Connection lifecycle metrics for the selected upstream cluster. Overflow indicates connection-related breaker pressure. Destroyed tracks normal or failed connection teardown. Connect failures suggest network issues, DNS problems, TLS issues, or unreachable backends.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n increase(\n envoy_cluster_upstream_cx_overflow{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n) by (envoy_cluster_name)\n", + "legendFormat": "Overflow Connections" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n increase(\n envoy_cluster_upstream_cx_destroy{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n) by (envoy_cluster_name)\n", + "legendFormat": "Destroyed Connections" + } + }, + "refId": "B", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n increase(\n envoy_cluster_upstream_cx_connect_fail{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n) by (envoy_cluster_name)\n", + "legendFormat": "Connect Failures" + } + }, + "refId": "C", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "custom": { + "fillOpacity": 10 + } + }, + "overrides": [] + } + } + } + } + }, + "panel-17": { + "kind": "Panel", + "spec": { + "id": 17, + "title": "Upstream Circuit Breakers", + "description": "Circuit breaker state for the selected upstream cluster. Non-zero values indicate protection mechanisms are currently open. Open Connections tracks the connection breaker, Open Pool Connections tracks connection-pool breaker pressure, and Open Requests tracks request breaker pressure rather than only a full pending queue.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n envoy_cluster_circuit_breakers_default_cx_open{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }\n) by (envoy_cluster_name)\n", + "legendFormat": "Open Connections" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n envoy_cluster_circuit_breakers_default_cx_pool_open{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }\n) by (envoy_cluster_name)\n", + "legendFormat": "Open Pool Connections" + } + }, + "refId": "B", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n envoy_cluster_circuit_breakers_default_rq_open{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }\n) by (envoy_cluster_name)\n", + "legendFormat": "Open Requests" + } + }, + "refId": "C", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "custom": { + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-18": { + "kind": "Panel", + "spec": { + "id": 18, + "title": "Upstream Resets, Timeouts, and Retries", + "description": "Failure-mode signals for the selected upstream cluster. Tx resets often reflect local fast-fail behavior, breaker pressure, or local connection issues. Rx resets point to the upstream side closing early. Timeouts highlight slow backends, and retry overflow shows retry budget or retry concurrency pressure.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_tx_reset{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n) by (envoy_cluster_name)\n", + "legendFormat": "Tx Reset Rate" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_rx_reset{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n) by (envoy_cluster_name)\n", + "legendFormat": "Rx Reset Rate" + } + }, + "refId": "B", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_timeout{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n) by (envoy_cluster_name)\n", + "legendFormat": "Timeout Rate" + } + }, + "refId": "C", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_retry{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n) by (envoy_cluster_name)\n", + "legendFormat": "Retry Rate" + } + }, + "refId": "D", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_retry_overflow{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n) by (envoy_cluster_name)\n", + "legendFormat": "Retry Overflow Rate" + } + }, + "refId": "E", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps", + "custom": { + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-19": { + "kind": "Panel", + "spec": { + "id": 19, + "title": "Upstream Rate by Pod", + "description": "Request distribution across Envoy proxy pods for this upstream cluster. Ideally shows even distribution. Imbalanced traffic may indicate pod scheduling issues, uneven client distribution, or connection affinity problems. Use to verify horizontal scaling effectiveness.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n) by (pod, envoy_cluster_name)\n", + "legendFormat": "{{ pod }}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps", + "custom": { + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-2": { + "kind": "Panel", + "spec": { + "id": 2, + "title": "Upstreams Count by Job", + "description": "Distribution of upstream clusters across different Prometheus job labels. Useful for understanding how backend services are organized across different Envoy deployments or environments. Imbalanced distribution may indicate configuration inconsistencies.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "count(\n envoy_cluster_upstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }\n) by (job)\n", + "instant": true, + "legendFormat": "{{ job }}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "piechart", + "version": "v11.4.0", + "spec": { + "options": { + "displayLabels": [ + "percent" + ], + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "percent" + ] + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "upstreams" + }, + "overrides": [] + } + } + } + } + }, + "panel-20": { + "kind": "Panel", + "spec": { + "id": 20, + "title": "Upstream Active Connections by Pod", + "description": "Active connections per Envoy pod to this upstream cluster. Should correlate with request rates. High connections with low requests suggest connection pooling inefficiency or slow-draining connections. Uneven distribution may indicate pod-level issues requiring investigation.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n envoy_cluster_upstream_cx_active{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }\n) by (pod, envoy_cluster_name)\n", + "legendFormat": "{{ pod }}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "custom": { + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-3": { + "kind": "Panel", + "spec": { + "id": 3, + "title": "Upstream Rate by Envoy Cluster Name [1h]", + "description": "Request rate distribution across upstream clusters over the past hour (top 20). Identifies which backend services receive the most traffic. Use this to validate load distribution, detect traffic shifts after deployments, and identify hot services that may need scaling.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "topk(20,\n sum(\n rate(\n envoy_cluster_upstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }[1h]\n )\n ) by (envoy_cluster_name)\n)\n", + "instant": true, + "legendFormat": "{{ envoy_cluster_name }}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "piechart", + "version": "v11.4.0", + "spec": { + "options": { + "displayLabels": [ + "percent" + ], + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "percent" + ] + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps" + }, + "overrides": [] + } + } + } + } + }, + "panel-4": { + "kind": "Panel", + "spec": { + "id": 4, + "title": "Upstream Rate by Code Class [1h]", + "description": "Breakdown of upstream responses by HTTP status code class over the past hour. Healthy services typically show 95%+ 2xx responses. High 4xx proportions suggest API contract issues or client misconfigurations. Any 5xx responses indicate backend failures requiring immediate investigation.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }[1h]\n )\n) by (envoy_response_code_class)\n", + "instant": true, + "legendFormat": "{{ envoy_response_code_class }}xx" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "piechart", + "version": "v11.4.0", + "spec": { + "options": { + "displayLabels": [ + "percent" + ], + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "percent" + ] + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps" + }, + "overrides": [] + } + } + } + } + }, + "panel-5": { + "kind": "Panel", + "spec": { + "id": 5, + "title": "Upstream Active Connections by Envoy Cluster Name", + "description": "Distribution of currently active TCP connections to upstream services. Shows which backend clusters are consuming the most connections. Disproportionately high connection counts may indicate connection pooling issues, slow backends, or HTTP/1.1 connection inefficiency. Compare with request rates to assess connection reuse.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "topk(20,\n sum(\n envoy_cluster_upstream_cx_active{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }\n ) by (envoy_cluster_name)\n)\n", + "instant": true, + "legendFormat": "{{ envoy_cluster_name }}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "piechart", + "version": "v11.4.0", + "spec": { + "options": { + "displayLabels": [ + "percent" + ], + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "percent" + ] + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "short" + }, + "overrides": [] + } + } + } + } + }, + "panel-7": { + "kind": "Panel", + "spec": { + "id": 7, + "title": "Upstream Rate", + "description": "Request rate per upstream cluster over time. Each line represents traffic to a specific backend service. Sudden drops may indicate circuit breaker activation, upstream failures, or routing changes. Gradual increases suggest growing load. Use this to identify which clusters need scaling or optimization.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n) by (envoy_cluster_name)\n", + "legendFormat": "{{ envoy_cluster_name }}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps", + "custom": { + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-8": { + "kind": "Panel", + "spec": { + "id": 8, + "title": "Upstream Latency", + "description": "Backend service response time percentiles. P50 represents typical latency, while P95/P99 show tail latency affecting a subset of requests. Rising P99 often precedes visible performance degradation. Investigate backends when P95 exceeds SLO targets. Exemplars link to distributed traces for root cause analysis.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "histogram_quantile(\n 0.5,\n sum(\n rate(\n envoy_cluster_upstream_rq_time_bucket{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n ) by (le)\n)\n", + "legendFormat": "P50" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "histogram_quantile(\n 0.95,\n sum(\n rate(\n envoy_cluster_upstream_rq_time_bucket{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n ) by (le)\n)\n", + "legendFormat": "P95" + } + }, + "refId": "B", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": true, + "expr": "histogram_quantile(\n 0.99,\n sum(\n rate(\n envoy_cluster_upstream_rq_time_bucket{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n ) by (le)\n)\n", + "legendFormat": "P99" + } + }, + "refId": "C", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "ms", + "custom": { + "fillOpacity": 10 + } + }, + "overrides": [] + } + } + } + } + }, + "panel-9": { + "kind": "Panel", + "spec": { + "id": 9, + "title": "Upstream Success Rate (Excluding 4xx errors)", + "description": "Backend success rate treating 4xx as successful (client errors, not backend failures). Drops below 99.9% indicate backend health issues. Correlate with circuit breaker metrics, health check status, and backend logs. Sustained low rates may trigger automatic circuit breaking.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n,\n envoy_response_code_class!=\"5\"\n }[$__rate_interval]\n )\n)\n/\nsum(\n rate(\n envoy_cluster_upstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n)\n* 100\n", + "legendFormat": "Success Rate" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "percent", + "custom": { + "axisSoftMax": 100, + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + } + }, + "layout": { + "kind": "RowsLayout", + "spec": { + "rows": [ + { + "kind": "RowsLayoutRow", + "spec": { + "title": "Summary", + "collapse": false, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 4, + "width": 6, + "height": 6, + "element": { + "kind": "ElementReference", + "name": "panel-2" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 6, + "y": 4, + "width": 6, + "height": 6, + "element": { + "kind": "ElementReference", + "name": "panel-3" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 4, + "width": 6, + "height": 6, + "element": { + "kind": "ElementReference", + "name": "panel-4" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 18, + "y": 4, + "width": 6, + "height": 6, + "element": { + "kind": "ElementReference", + "name": "panel-5" + } + } + } + ] + } + } + } + }, + { + "kind": "RowsLayoutRow", + "spec": { + "title": "$envoy_cluster_name", + "collapse": false, + "repeat": { + "mode": "variable", + "value": "envoy_cluster_name" + }, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-7" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 0, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-8" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 8, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-9" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 8, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-10" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 16, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-11" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 16, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-12" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 24, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-13" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 24, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-14" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 32, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-15" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 32, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-16" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 40, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-17" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 40, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-18" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 48, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-19" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 48, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-20" + } + } + } + ] + } + } + } + } + ] + } + }, + "links": [ + { + "title": "Envoy", + "type": "dashboards", + "icon": "", + "tooltip": "", + "tags": [ + "envoy", + "envoy-mixin", + "gateway" + ], + "asDropdown": true, + "targetBlank": true, + "includeVars": false, + "keepTime": true + } + ], + "liveNow": false, + "preload": false, + "tags": [ + "envoy", + "envoy-mixin", + "gateway" + ], + "timeSettings": { + "timezone": "utc", + "from": "now-6h", + "to": "now", + "autoRefresh": "", + "autoRefreshIntervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "hideTimepicker": false, + "fiscalYearStartMonth": 0 + }, + "title": "Cilium / Envoy / Upstream", + "variables": [ + { + "kind": "DatasourceVariable", + "spec": { + "name": "datasource", + "pluginId": "prometheus", + "refresh": "never", + "regex": "", + "current": { + "text": "default", + "value": "default" + }, + "options": [], + "multi": false, + "includeAll": false, + "label": "Data source", + "hide": "dontHide", + "skipUrlSync": false, + "allowCustomValue": true + } + }, + { + "kind": "QueryVariable", + "spec": { + "name": "cluster", + "current": { + "text": "", + "value": "" + }, + "label": "Cluster", + "hide": "hideVariable", + "refresh": "onTimeRangeChanged", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "${datasource}" + }, + "spec": { + "__legacyStringValue": "label_values(envoy_cluster_upstream_rq_xx{}, cluster)" + } + }, + "regex": "", + "sort": "alphabeticalAsc", + "options": [], + "multi": false, + "includeAll": false, + "allowCustomValue": true + } + }, + { + "kind": "QueryVariable", + "spec": { + "name": "namespace", + "current": { + "text": "", + "value": "" + }, + "label": "Namespace", + "hide": "dontHide", + "refresh": "onTimeRangeChanged", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "${datasource}" + }, + "spec": { + "__legacyStringValue": "label_values(envoy_cluster_upstream_rq_xx{cluster=\"$cluster\"}, namespace)" + } + }, + "regex": "", + "sort": "alphabeticalAsc", + "options": [], + "multi": true, + "includeAll": true, + "allowCustomValue": true + } + }, + { + "kind": "QueryVariable", + "spec": { + "name": "job", + "current": { + "text": "", + "value": "" + }, + "label": "Job", + "hide": "dontHide", + "refresh": "onTimeRangeChanged", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "${datasource}" + }, + "spec": { + "__legacyStringValue": "label_values(envoy_cluster_upstream_rq_xx{cluster=\"$cluster\", namespace=~\"$namespace\"}, job)" + } + }, + "regex": "", + "sort": "alphabeticalAsc", + "options": [], + "multi": true, + "includeAll": true, + "allowCustomValue": true + } + }, + { + "kind": "QueryVariable", + "spec": { + "name": "envoy_cluster_name", + "current": { + "text": "", + "value": "" + }, + "label": "Envoy Cluster Name", + "hide": "dontHide", + "refresh": "onTimeRangeChanged", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "${datasource}" + }, + "spec": { + "__legacyStringValue": "label_values(envoy_cluster_upstream_rq_xx{cluster=\"$cluster\", namespace=~\"$namespace\", job=~\"$job\"}, envoy_cluster_name)" + } + }, + "regex": "", + "sort": "alphabeticalAsc", + "options": [], + "multi": true, + "includeAll": false, + "allowCustomValue": true + } + }, + { + "kind": "QueryVariable", + "spec": { + "name": "pod", + "current": { + "text": "", + "value": "" + }, + "label": "Pod", + "hide": "dontHide", + "refresh": "onTimeRangeChanged", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "${datasource}" + }, + "spec": { + "__legacyStringValue": "label_values(envoy_cluster_upstream_rq_xx{cluster=\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", envoy_cluster_name=~\"$envoy_cluster_name\"}, pod)" + } + }, + "regex": "", + "sort": "alphabeticalAsc", + "options": [], + "multi": true, + "includeAll": true, + "allowCustomValue": true + } + } + ] + } + } +kind: ConfigMap +metadata: + name: cilium-envoy-upstream-grafana-dashboard + namespace: kube-system + labels: + grafana_dashboard: "1" diff --git a/proxmox/manifests/grafana/dashboards/cilium-hubble.yaml b/proxmox/manifests/grafana/dashboards/cilium-hubble.yaml new file mode 100644 index 0000000..1102011 --- /dev/null +++ b/proxmox/manifests/grafana/dashboards/cilium-hubble.yaml @@ -0,0 +1,4490 @@ +apiVersion: v1 +data: + cilium-hubble.json: | + { + "apiVersion": "dashboard.grafana.app/v2", + "kind": "Dashboard", + "metadata": { + "name": "cilium-hubble", + "namespace": "default", + "uid": "12818d0e-1272-4d36-b4dc-8bef8a4fbd40", + "resourceVersion": "1788358313445992", + "generation": 1, + "creationTimestamp": "2026-09-02T14:11:53Z", + "labels": { + "grafana.app/deprecatedInternalID": "978911201251328" + }, + "annotations": { + "grafana.app/createdBy": "user:cfx1picle4dmod", + "grafana.app/saved-from-ui": "Grafana v13.2.0 (f681b1359f)" + } + }, + "spec": { + "annotations": [ + { + "kind": "AnnotationQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "", + "version": "v0", + "spec": {} + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "builtIn": true, + "legacyOptions": { + "type": "dashboard" + } + } + } + ], + "cursorSync": "Off", + "description": "Dashboard for the Cilium v1.12 (https://cilium.io/) Hubble metrics", + "editable": true, + "elements": { + "panel-10": { + "kind": "Panel", + "spec": { + "id": 10, + "title": "TCPv4", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_tcp_flags_total{family=\"IPv4\"}[1m])) by (pod, flag)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{flag}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "fillGradient": 0, + "hiddenSeries": false, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "fin", + "yaxis": 1 + }, + { + "alias": "FIN", + "yaxis": 2 + }, + { + "alias": "RST", + "yaxis": 2 + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "pps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + }, + "dataLinks": [] + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-12": { + "kind": "Panel", + "spec": { + "id": 12, + "title": "Flows processed Per Node", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "avg(sum(rate(hubble_flows_processed_total[1m])) by (pod))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "avg" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "min(sum(rate(hubble_flows_processed_total[1m])) by (pod))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "min" + } + }, + "refId": "B", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "max(sum(rate(hubble_flows_processed_total[1m])) by (pod))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "max" + } + }, + "refId": "C", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "fillGradient": 0, + "hiddenSeries": false, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "max", + "fillBelowTo": "avg", + "lines": false + }, + { + "alias": "avg", + "fill": 0, + "fillBelowTo": "min" + }, + { + "alias": "min", + "lines": false + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 1, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "ops", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + }, + "dataLinks": [] + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-18": { + "kind": "Panel", + "spec": { + "id": 18, + "title": "Top 10 Port Distribution", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "topk(10, sum (rate(hubble_port_distribution_total{port!=\"0\"}[1m])) by (pod, port, protocol))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{port}}/{{protocol}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "fillGradient": 0, + "hiddenSeries": false, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "pps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + }, + "dataLinks": [] + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-2": { + "kind": "Panel", + "spec": { + "id": 2, + "title": "DNS Requests", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_dns_queries_total[1m])) by (pod, qtypes)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{qtypes}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "reqps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + } + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-20": { + "kind": "Panel", + "spec": { + "id": 20, + "title": "Top 10 DNS Queries per minute", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "topk(10, sum(rate(hubble_dns_queries_total[10m])*60) by (query, qtypes))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{query}} ({{qtypes}})" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "none", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + } + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-28": { + "kind": "Panel", + "spec": { + "id": 28, + "title": "DNS Errors", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_dns_responses_total{rcode!=\"No Error\"}[1m])) by (pod, qtypes, rcode)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{rcode}} ({{qtypes}})" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 4, + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + } + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-31": { + "kind": "Panel", + "spec": { + "id": 31, + "title": "ICMPv4", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_icmp_total{family=\"IPv4\"}[1m])) by (pod, type)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{type}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "fillGradient": 0, + "hiddenSeries": false, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + }, + "dataLinks": [] + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-32": { + "kind": "Panel", + "spec": { + "id": 32, + "title": "Flows Types", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_flows_processed_total[1m])) by (pod, type)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{type}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "fillGradient": 0, + "hiddenSeries": false, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "ops", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + }, + "dataLinks": [] + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-33": { + "kind": "Panel", + "spec": { + "id": 33, + "title": "Forwarded vs Dropped", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_flows_processed_total[1m])) by (pod, verdict)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{verdict}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "fillGradient": 0, + "hiddenSeries": false, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "ops", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + }, + "dataLinks": [] + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-34": { + "kind": "Panel", + "spec": { + "id": 34, + "title": "Protocol Usage", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum (rate(hubble_port_distribution_total[1m])) by (pod, protocol)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{protocol}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "fillGradient": 0, + "hiddenSeries": false, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": true, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "pps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + }, + "dataLinks": [] + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-35": { + "kind": "Panel", + "spec": { + "id": 35, + "title": "TCPv6", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_tcp_flags_total{family=\"IPv6\"}[1m])) by (pod, flag)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{flag}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "fillGradient": 0, + "hiddenSeries": false, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "fin", + "yaxis": 1 + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "pps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + }, + "dataLinks": [] + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-36": { + "kind": "Panel", + "spec": { + "id": 36, + "title": "ICMPv6", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_icmp_total{family=\"IPv6\"}[1m])) by (pod, type)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{type}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "fillGradient": 0, + "hiddenSeries": false, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + }, + "dataLinks": [] + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-4": { + "kind": "Panel", + "spec": { + "id": 4, + "title": "DNS responses", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_dns_responses_total{rcode=\"No Error\"}[1m])) by (pod, qtypes)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{qtypes}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 1, + "format": "reqps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + } + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-40": { + "kind": "Panel", + "spec": { + "id": 40, + "title": "DNS Response Record Type", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_dns_response_types_total[1m])) by (pod, type)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{type}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 1, + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + } + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-43": { + "kind": "Panel", + "spec": { + "id": 43, + "title": "Denies by Reason", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_drop_total{reason=\"Policy denied\"}[1m])) by (pod, reason)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{reason}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "pps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + } + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-45": { + "kind": "Panel", + "spec": { + "id": 45, + "title": "HTTP Requests", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_http_requests_total[1m])) by (pod, method)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{method}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 1, + "format": "reqps", + "label": "", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + } + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-49": { + "kind": "Panel", + "spec": { + "id": 49, + "title": "HTTP responses", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_http_responses_total[1m])) by (pod, status)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{status}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 1, + "format": "reqps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + } + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-51": { + "kind": "Panel", + "spec": { + "id": 51, + "title": "HTTP Request/Response Latency (p50)", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "histogram_quantile(0.5, rate(hubble_http_request_duration_seconds_bucket[1m]))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{method}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "s", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + } + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-53": { + "kind": "Panel", + "spec": { + "id": 53, + "title": "HTTP Protocol Usage", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_http_requests_total[5m])) by (pod, protocol)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{protocol}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": true, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 0, + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + } + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-54": { + "kind": "Panel", + "spec": { + "id": 54, + "title": "Top 10 Destination Pods with Denied Packets", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "topk(10, sum(rate(hubble_drop_total{reason=\"Policy denied\"}[1m])) by (pod, destination))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{destination}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "pps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + } + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-55": { + "kind": "Panel", + "spec": { + "id": 55, + "title": "Top 10 Source Pods with Denied Packets", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "topk(10, sum(rate(hubble_drop_total{reason=\"Policy denied\"}[1m])) by (pod, source))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{source}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "pps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + } + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-56": { + "kind": "Panel", + "spec": { + "id": 56, + "title": "Pods with DNS errors", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "topk(10,sum(rate(hubble_dns_responses_total{rcode!=\"No Error\"}[1m])) by (pod, destination))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{destination}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 4, + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + } + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-57": { + "kind": "Panel", + "spec": { + "id": 57, + "title": "DNS Response IPs Returned", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_dns_responses_total{rcode=\"No Error\"}[1m])) by (pod,ips_returned)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{ips_returned}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 1, + "format": "reqps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + } + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-58": { + "kind": "Panel", + "spec": { + "id": 58, + "title": "HTTP Request/Response Latency (p99)", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "histogram_quantile(0.99, rate(hubble_http_request_duration_seconds_bucket[1m]))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{method}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "s", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + } + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-59": { + "kind": "Panel", + "spec": { + "id": 59, + "title": "L7 Flow Distribution", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_flows_processed_total{type=\"L7\"}[1m])) by (pod, subtype)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{subtype}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "fillGradient": 0, + "hiddenSeries": false, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "ops", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + }, + "dataLinks": [] + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-60": { + "kind": "Panel", + "spec": { + "id": 60, + "title": "Trace Flow Distribution", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_flows_processed_total{type=\"Trace\"}[1m])) by (pod, subtype)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{subtype}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "fillGradient": 0, + "hiddenSeries": false, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "ops", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + }, + "dataLinks": [] + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-61": { + "kind": "Panel", + "spec": { + "id": 61, + "title": "Denied Packets by Protocol", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_drop_total{reason=\"Policy denied\"}[1m])) by (pod, protocol)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{protocol}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "pps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + } + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-62": { + "kind": "Panel", + "spec": { + "id": 62, + "title": "Missing TCPv4 SYN-ACKs", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_tcp_flags_total{family=\"IPv4\", flag=\"SYN\"}[1m])) by (pod) - sum(rate(hubble_tcp_flags_total{family=\"IPv4\", flag=\"SYN-ACK\"}[1m])) by (pod)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "Missing SYN-ACK" + } + }, + "refId": "B", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "alert": { + "conditions": [ + { + "evaluator": { + "params": [ + 0.2 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "B", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "avg" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Missing TCP SYN-ACK", + "noDataState": "no_data", + "notifications": [] + }, + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "fillGradient": 0, + "hiddenSeries": false, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "fin", + "yaxis": 1 + }, + { + "alias": "FIN", + "yaxis": 2 + }, + { + "alias": "RST", + "yaxis": 2 + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [ + { + "colorMode": "critical", + "fill": true, + "line": true, + "op": "gt", + "value": 0.2 + } + ], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "pps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + }, + "dataLinks": [] + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-63": { + "kind": "Panel", + "spec": { + "id": 63, + "title": "Missing TCPv6 SYN-ACKs", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_tcp_flags_total{family=\"IPv6\", flag=\"SYN\"}[1m])) by (pod) - sum(rate(hubble_tcp_flags_total{family=\"IPv6\", flag=\"SYN-ACK\"}[1m])) by (pod)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "Missing SYN-ACK" + } + }, + "refId": "B", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "alert": { + "conditions": [ + { + "evaluator": { + "params": [ + 0.2 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "B", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "avg" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Missing TCPv6 SYN-ACKs alert", + "noDataState": "no_data", + "notifications": [] + }, + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "fillGradient": 0, + "hiddenSeries": false, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "fin", + "yaxis": 1 + }, + { + "alias": "FIN", + "yaxis": 2 + }, + { + "alias": "RST", + "yaxis": 2 + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [ + { + "colorMode": "critical", + "fill": true, + "line": true, + "op": "gt", + "value": 0.2 + } + ], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "pps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + }, + "dataLinks": [] + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-64": { + "kind": "Panel", + "spec": { + "id": 64, + "title": "Missing ICMPv4 Echo-Reply", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_icmp_total{family=\"IPv4\", type=\"EchoRequest\"}[1m])) by (pod) - sum(rate(hubble_icmp_total{family=\"IPv4\", type=\"EchoReply\"}[1m])) by (pod)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "Missing ICMP Echo-Reply" + } + }, + "refId": "B", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "alert": { + "conditions": [ + { + "evaluator": { + "params": [ + 0.1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "B", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "avg" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Missing ICMPv4 Echo-Reply alert", + "noDataState": "no_data", + "notifications": [] + }, + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "fillGradient": 0, + "hiddenSeries": false, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [ + { + "colorMode": "critical", + "fill": true, + "line": true, + "op": "gt", + "value": 0.1 + } + ], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "pps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + }, + "dataLinks": [] + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-65": { + "kind": "Panel", + "spec": { + "id": 65, + "title": "Missing ICMPv6 Echo-Reply", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_icmp_total{family=\"IPv6\", type=\"EchoRequest\"}[1m])) by (pod) - sum(rate(hubble_icmp_total{family=\"IPv6\", type=\"EchoReply\"}[1m])) by (pod)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "Missing ICMP Echo-Reply" + } + }, + "refId": "B", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "fillGradient": 0, + "hiddenSeries": false, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "pps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + }, + "dataLinks": [] + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-66": { + "kind": "Panel", + "spec": { + "id": 66, + "title": "Missing DNS Responses", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_dns_queries_total[1m])) by (pod, qtypes) - sum(rate(hubble_dns_responses_total[1m])) by (pod, qtypes)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{qtypes}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "alert": { + "conditions": [ + { + "evaluator": { + "params": [ + 0.5 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "avg" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "DNS Request/Response Symmetry alert", + "noDataState": "no_data", + "notifications": [] + }, + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [ + { + "colorMode": "critical", + "fill": true, + "line": true, + "op": "gt", + "value": 0.5 + } + ], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "reqps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + } + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-8": { + "kind": "Panel", + "spec": { + "id": 8, + "title": "Drop Reason", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_drop_total[1m])) by (pod, reason)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{reason}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "fillGradient": 0, + "hiddenSeries": false, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "pps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + }, + "dataLinks": [] + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + } + }, + "layout": { + "kind": "RowsLayout", + "spec": { + "rows": [ + { + "kind": "RowsLayoutRow", + "spec": { + "title": "General Processing", + "collapse": false, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-12" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 0, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-32" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 5, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-59" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 5, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-60" + } + } + } + ] + } + } + } + }, + { + "kind": "RowsLayoutRow", + "spec": { + "title": "Network", + "collapse": false, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-33" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 0, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-8" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 5, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-34" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 5, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-18" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 10, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-10" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 10, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-62" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 15, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-35" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 15, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-63" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 20, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-31" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 20, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-64" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 25, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-36" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 25, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-65" + } + } + } + ] + } + } + } + }, + { + "kind": "RowsLayoutRow", + "spec": { + "title": "Network Policy", + "collapse": false, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 12, + "height": 4, + "element": { + "kind": "ElementReference", + "name": "panel-43" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 0, + "width": 12, + "height": 4, + "element": { + "kind": "ElementReference", + "name": "panel-61" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 4, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-55" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 4, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-54" + } + } + } + ] + } + } + } + }, + { + "kind": "RowsLayoutRow", + "spec": { + "title": "HTTP", + "collapse": false, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 12, + "height": 6, + "element": { + "kind": "ElementReference", + "name": "panel-45" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 0, + "width": 12, + "height": 6, + "element": { + "kind": "ElementReference", + "name": "panel-49" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 6, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-51" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 6, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-58" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 11, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-53" + } + } + } + ] + } + } + } + }, + { + "kind": "RowsLayoutRow", + "spec": { + "title": "DNS", + "collapse": false, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 8, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-2" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 8, + "y": 0, + "width": 8, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-4" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 16, + "y": 0, + "width": 8, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-66" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 5, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-40" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 5, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-57" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 10, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-28" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 10, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-56" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 15, + "width": 24, + "height": 6, + "element": { + "kind": "ElementReference", + "name": "panel-20" + } + } + } + ] + } + } + } + } + ] + } + }, + "links": [], + "liveNow": false, + "preload": false, + "tags": [], + "timeSettings": { + "from": "now-6h", + "to": "now", + "autoRefresh": "30s", + "autoRefreshIntervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "hideTimepicker": false, + "fiscalYearStartMonth": 0 + }, + "title": "Cilium / Hubble", + "variables": [] + } + } +kind: ConfigMap +metadata: + name: cilium-hubble-grafana-dashboard + namespace: kube-system + labels: + grafana_dashboard: "1" diff --git a/proxmox/manifests/grafana/dashboards/cilium-network-monitoring.yaml b/proxmox/manifests/grafana/dashboards/cilium-network-monitoring.yaml new file mode 100644 index 0000000..2ae97c2 --- /dev/null +++ b/proxmox/manifests/grafana/dashboards/cilium-network-monitoring.yaml @@ -0,0 +1,1627 @@ +apiVersion: v1 +data: + cilium-network-monitoring.json: | + { + "apiVersion": "dashboard.grafana.app/v2", + "kind": "Dashboard", + "metadata": { + "name": "cilium-network-monitoring", + "namespace": "default", + "uid": "82922795-ba6f-4336-9b90-efc140d42ef9", + "resourceVersion": "1788358240737998", + "generation": 1, + "creationTimestamp": "2026-09-02T14:10:40Z", + "labels": { + "grafana.app/deprecatedInternalID": "978606250184704" + }, + "annotations": { + "grafana.app/createdBy": "user:cfx1picle4dmod", + "grafana.app/saved-from-ui": "Grafana v13.2.0 (f681b1359f)" + } + }, + "spec": { + "annotations": [ + { + "kind": "AnnotationQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "grafana", + "version": "v0", + "datasource": { + "name": "-- Grafana --" + }, + "spec": {} + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "builtIn": true, + "legacyOptions": { + "type": "dashboard" + } + } + } + ], + "cursorSync": "Off", + "description": "Comprehensive Cilium network monitoring dashboard for Kubernetes clusters. Features instance filtering by Cilium instances (IP:port), endpoint state monitoring, BPF map usage, API performance metrics, and node connectivity status.", + "editable": true, + "elements": { + "panel-1": { + "kind": "Panel", + "spec": { + "id": 1, + "title": "Cilium Agent Bootstrap Time", + "description": "Shows how long it takes for Cilium agents to start up and become ready. **Overall Bootstrap** is total startup time, **Daemon Init** is core daemon initialization, and **K8s Init** is Kubernetes integration setup. Green = fast (<5s), Yellow = slow (5-10s), Red = very slow (>10s). High values may indicate resource constraints or network issues.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "cilium_agent_bootstrap_seconds{scope=\"overall\", instance=~\".*\"}", + "legendFormat": "Overall Bootstrap - {{instance}}" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "cilium_agent_bootstrap_seconds{scope=\"daemonInit\", instance=~\".*\"}", + "legendFormat": "Daemon Init - {{instance}}" + } + }, + "refId": "B", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "cilium_agent_bootstrap_seconds{scope=\"k8sInit\", instance=~\".*\"}", + "legendFormat": "K8s Init - {{instance}}" + } + }, + "refId": "C", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "12.1.1", + "spec": { + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" + }, + { + "value": 5, + "color": "orange" + }, + { + "value": 10, + "color": "dark-red" + } + ] + }, + "color": { + "mode": "thresholds" + } + }, + "overrides": [] + } + } + } + } + }, + "panel-10": { + "kind": "Panel", + "spec": { + "id": 10, + "title": "Node Health Connectivity - NODE_IP_3", + "description": "Shows the connectivity status between Cilium nodes. **Reachable** = nodes can communicate with each other, **Unreachable** = network connectivity issues, **Unknown** = status cannot be determined. All nodes should show as 'Reachable' for proper cluster operation. Unreachable nodes may indicate network failures, firewall issues, or node problems. This is critical for cluster-wide network policy enforcement and service mesh functionality.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "cilium_node_health_connectivity_status{instance=\"NODE_IP_3:9962\"}", + "legendFormat": "{{status}} - {{type}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "12.1.1", + "spec": { + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] + } + }, + "overrides": [] + } + } + } + } + }, + "panel-11": { + "kind": "Panel", + "spec": { + "id": 11, + "title": "Node Health Connectivity - NODE_IP_4", + "description": "Shows the connectivity status between Cilium nodes. **Reachable** = nodes can communicate with each other, **Unreachable** = network connectivity issues, **Unknown** = status cannot be determined. All nodes should show as 'Reachable' for proper cluster operation. Unreachable nodes may indicate network failures, firewall issues, or node problems. This is critical for cluster-wide network policy enforcement and service mesh functionality.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "cilium_node_health_connectivity_status{instance=\"NODE_IP_4:9962\"}", + "legendFormat": "{{status}} - {{type}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "12.1.1", + "spec": { + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] + } + }, + "overrides": [] + } + } + } + } + }, + "panel-12": { + "kind": "Panel", + "spec": { + "id": 12, + "title": "Node Health Connectivity - NODE_IP_2", + "description": "Shows the connectivity status between Cilium nodes. **Reachable** = nodes can communicate with each other, **Unreachable** = network connectivity issues, **Unknown** = status cannot be determined. All nodes should show as 'Reachable' for proper cluster operation. Unreachable nodes may indicate network failures, firewall issues, or node problems. This is critical for cluster-wide network policy enforcement and service mesh functionality.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "cilium_node_health_connectivity_status{instance=\"NODE_IP_2:9962\"}", + "legendFormat": "{{status}} - {{type}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "12.1.1", + "spec": { + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] + } + }, + "overrides": [] + } + } + } + } + }, + "panel-13": { + "kind": "Panel", + "spec": { + "id": 13, + "title": "Cilium Errors & Warnings", + "description": "Shows the total count of errors and warnings from Cilium components across all worker nodes. **ERROR** level indicates serious issues that may affect network functionality, **WARN** level indicates potential problems, **INFO** level shows normal operational messages. Zero counts are ideal. Spikes in errors may indicate network policy conflicts, resource exhaustion, or configuration issues. Monitor for sustained error rates or unusual warning patterns.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "cilium_errors_warnings_total{level=\"INFO\"}", + "legendFormat": "{{level}} {{subsystem}} - ({{instance}})", + "useBackend": false + } + }, + "refId": "B", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "bargauge", + "version": "12.1.1", + "spec": { + "options": { + "displayMode": "gradient", + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "maxVizHeight": 300, + "minVizHeight": 16, + "minVizWidth": 8, + "namePlacement": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": true, + "sizing": "auto", + "valueMode": "color" + }, + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "percentage", + "steps": [ + { + "value": 0, + "color": "super-light-blue" + }, + { + "value": 70, + "color": "light-blue" + }, + { + "value": 85, + "color": "blue" + } + ] + }, + "color": { + "mode": "thresholds" + } + }, + "overrides": [] + } + } + } + } + }, + "panel-14": { + "kind": "Panel", + "spec": { + "id": 14, + "title": "Cilium Warnings", + "description": "Shows the total count of errors and warnings from Cilium components across all worker nodes. **ERROR** level indicates serious issues that may affect network functionality, **WARN** level indicates potential problems, **INFO** level shows normal operational messages. Zero counts are ideal. Spikes in errors may indicate network policy conflicts, resource exhaustion, or configuration issues. Monitor for sustained error rates or unusual warning patterns.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "cilium_errors_warnings_total{level=\"WARN\"}", + "legendFormat": "{{level}} {{subsystem}} {{instance}}", + "useBackend": false + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "12.1.1", + "spec": { + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "center", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" + }, + { + "value": 1, + "color": "orange" + }, + { + "value": 3, + "color": "red" + } + ] + }, + "color": { + "mode": "thresholds" + } + }, + "overrides": [] + } + } + } + } + }, + "panel-2": { + "kind": "Panel", + "spec": { + "id": 2, + "title": "Cilium Errors", + "description": "Shows the total count of errors and warnings from Cilium components across all worker nodes. **ERROR** level indicates serious issues that may affect network functionality, **WARN** level indicates potential problems, **INFO** level shows normal operational messages. Zero counts are ideal. Spikes in errors may indicate network policy conflicts, resource exhaustion, or configuration issues. Monitor for sustained error rates or unusual warning patterns.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "cilium_errors_warnings_total{level=\"ERROR\"}", + "legendFormat": "{{level}} {{subsystem}} {{instance}}", + "useBackend": false + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "12.1.1", + "spec": { + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "center", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" + }, + { + "value": 1, + "color": "orange" + }, + { + "value": 3, + "color": "dark-red" + } + ] + }, + "color": { + "mode": "thresholds" + } + }, + "overrides": [] + } + } + } + } + }, + "panel-3": { + "kind": "Panel", + "spec": { + "id": 3, + "title": "Cilium Endpoint States", + "description": "Shows the distribution of endpoint states in your cluster. **Ready** (green) = endpoints are fully operational, **Regenerating** (yellow) = endpoints are updating policies, **Waiting-for-identity** (orange) = endpoints waiting for security identity assignment, **Restoring** (red) = endpoints recovering from failures. Most endpoints should be in 'Ready' state. High numbers of non-ready endpoints indicate network policy changes, security issues, or cluster instability.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "cilium_endpoint_state{instance=~\".*\"}", + "legendFormat": "{{instance}} - {{endpoint_state}}", + "useBackend": false + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "bargauge", + "version": "12.1.1", + "spec": { + "options": { + "displayMode": "gradient", + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "maxVizHeight": 300, + "minVizHeight": 16, + "minVizWidth": 8, + "namePlacement": "top", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": true, + "sizing": "auto", + "valueMode": "color" + }, + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" + } + ] + }, + "color": { + "mode": "continuous-BlPu" + } + }, + "overrides": [] + } + } + } + } + }, + "panel-4": { + "kind": "Panel", + "spec": { + "id": 4, + "title": "Cilium API Success Rate", + "description": "Shows the distribution of API request methods across Cilium instances. **GET** requests are typically health checks and status queries, **POST** requests are policy updates and configuration changes. Higher rates indicate more active cluster management. Monitor for unusual patterns that might indicate issues or heavy administrative activity.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "cilium_agent_api_process_time_seconds_count{instance=~\".*\"}", + "legendFormat": "{{method}} ({{return_code}}) - {{instance}} - {{path}}", + "useBackend": false + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "12.1.1", + "spec": { + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] + }, + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-5": { + "kind": "Panel", + "spec": { + "id": 5, + "title": "BPF Map Memory Usage", + "description": "Shows total memory usage of all BPF (Berkeley Packet Filter) maps combined for each Cilium instance. BPF maps store network state like connection tracking, IP cache, load balancer backends, and container network mappings. Higher values indicate more network state being tracked. Monitor for total capacity approaching limits which could cause performance issues or packet drops.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "cilium_bpf_map_capacity{instance=~\".*\"}", + "legendFormat": "{{instance}} - {{map_group}}", + "useBackend": false + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "heatmap", + "version": "12.1.1", + "spec": { + "options": { + "calculate": false, + "cellGap": 1, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "max": 8500000, + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdYlBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": false + }, + "yAxis": { + "axisPlacement": "hidden", + "reverse": false + } + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-6": { + "kind": "Panel", + "spec": { + "id": 6, + "title": "BPF Map Operations Rate", + "description": "Shows the rate of operations (create, update, delete) on BPF maps. High operation rates indicate active network state changes like new connections, policy updates, or endpoint modifications. **Update** operations are most common during normal operation. **Delete** operations may indicate connection cleanup or policy changes. Monitor for unusual spikes that could indicate network issues, policy conflicts, or resource pressure.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "rate(cilium_bpf_map_ops_total{instance=~\".*\"}[5m])", + "legendFormat": "{{map_name}} - {{operation}} ({{instance}})" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "12.1.1", + "spec": { + "options": { + "legend": { + "calcs": [ + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] + }, + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "vis": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-7": { + "kind": "Panel", + "spec": { + "id": 7, + "title": "Kubernetes Events Received", + "description": "Tracks the rate of Kubernetes events (create, update, delete) that Cilium agents receive from the Kubernetes API server. These events trigger network policy updates, endpoint state changes, and service discovery updates. **Create** events = new pods/services, **Update** events = configuration changes, **Delete** events = resource cleanup. High event rates may indicate cluster churn, deployments, or configuration changes. Monitor for correlation with network issues.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "cilium_kubernetes_events_received_total{instance=~\".*\"}", + "legendFormat": "({{instance}}) {{scope}} - {{action}}", + "useBackend": false + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "12.1.1", + "spec": { + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] + }, + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-8": { + "kind": "Panel", + "spec": { + "id": 8, + "title": "Node Health Connectivity - NODE_IP_1", + "description": "Shows the connectivity status between Cilium nodes. **Reachable** = nodes can communicate with each other, **Unreachable** = network connectivity issues, **Unknown** = status cannot be determined. All nodes should show as 'Reachable' for proper cluster operation. Unreachable nodes may indicate network failures, firewall issues, or node problems. This is critical for cluster-wide network policy enforcement and service mesh functionality.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "cilium_node_health_connectivity_status{instance=\"NODE_IP_1:9962\"}", + "legendFormat": "{{status}} - {{type}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "12.1.1", + "spec": { + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] + } + }, + "overrides": [] + } + } + } + } + }, + "panel-9": { + "kind": "Panel", + "spec": { + "id": 9, + "title": "Cilium Agent API Process Time Rate", + "description": "Shows the processing time for API requests to Cilium agents. Higher values indicate slower API response times, which may affect cluster management operations, policy updates, or troubleshooting activities. **GET /v1/healthz** = health check latency, **GET /v1/cluster** = cluster status queries. Monitor for sustained high latency which could indicate resource constraints, network issues, or agent performance problems. Critical for operational responsiveness.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "rate(cilium_agent_api_process_time_seconds_count{instance=~\".*\"}[5m])", + "legendFormat": "{{method}} {{path}} - {{return_code}} ({{instance}})" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "12.1.1", + "spec": { + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] + }, + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "vis": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + } + }, + "overrides": [] + } + } + } + } + } + }, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 6, + "height": 24, + "element": { + "kind": "ElementReference", + "name": "panel-1" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 6, + "y": 0, + "width": 18, + "height": 3, + "element": { + "kind": "ElementReference", + "name": "panel-2" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 6, + "y": 3, + "width": 18, + "height": 3, + "element": { + "kind": "ElementReference", + "name": "panel-14" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 6, + "y": 6, + "width": 11, + "height": 18, + "element": { + "kind": "ElementReference", + "name": "panel-4" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 17, + "y": 6, + "width": 7, + "height": 18, + "element": { + "kind": "ElementReference", + "name": "panel-13" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 24, + "width": 6, + "height": 32, + "element": { + "kind": "ElementReference", + "name": "panel-3" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 6, + "y": 24, + "width": 18, + "height": 32, + "element": { + "kind": "ElementReference", + "name": "panel-5" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 56, + "width": 24, + "height": 11, + "element": { + "kind": "ElementReference", + "name": "panel-9" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 67, + "width": 12, + "height": 16, + "element": { + "kind": "ElementReference", + "name": "panel-7" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 67, + "width": 12, + "height": 16, + "element": { + "kind": "ElementReference", + "name": "panel-6" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 83, + "width": 24, + "height": 6, + "element": { + "kind": "ElementReference", + "name": "panel-8" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 89, + "width": 24, + "height": 6, + "element": { + "kind": "ElementReference", + "name": "panel-12" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 95, + "width": 24, + "height": 6, + "element": { + "kind": "ElementReference", + "name": "panel-10" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 101, + "width": 24, + "height": 6, + "element": { + "kind": "ElementReference", + "name": "panel-11" + } + } + } + ] + } + }, + "links": [], + "liveNow": false, + "preload": false, + "tags": [], + "timeSettings": { + "from": "now-1h", + "to": "now", + "autoRefresh": "30s", + "autoRefreshIntervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "hideTimepicker": false, + "fiscalYearStartMonth": 0 + }, + "title": "Cilium / Network Monitoring", + "variables": [] + } + } +kind: ConfigMap +metadata: + name: cilium-network-monitoring-grafana-dashboard + namespace: kube-system + labels: + grafana_dashboard: "1" diff --git a/proxmox/manifests/grafana/dashboards/etcd.yaml b/proxmox/manifests/grafana/dashboards/etcd.yaml new file mode 100644 index 0000000..2930115 --- /dev/null +++ b/proxmox/manifests/grafana/dashboards/etcd.yaml @@ -0,0 +1,548 @@ +apiVersion: v1 +data: + etcd.json: | + { + "description": "etcd sample Grafana dashboard with Prometheus", + "panels": [ + { + "datasource": { + "type": "datasource", + "uid": "-- Mixed --" + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 0 + }, + "id": 1, + "interval": "1m", + "options": { + "colorMode": "none", + "graphMode": "none", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ] + } + }, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "sum(etcd_server_has_leader{job=~\".*etcd.*\", job=\"$cluster\"})", + "legendFormat": "{{cluster}} - {{namespace}}\n" + } + ], + "title": "Up", + "type": "stat" + }, + { + "datasource": { + "type": "datasource", + "uid": "-- Mixed --" + }, + "fieldConfig": { + "defaults": { + "custom": { + "fillOpacity": 0, + "lineWidth": 2, + "showPoints": "never" + }, + "unit": "ops" + } + }, + "gridPos": { + "h": 7, + "w": 10, + "x": 6, + "y": 0 + }, + "id": 2, + "interval": "1m", + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "sum(rate(grpc_server_started_total{job=~\".*etcd.*\", job=\"$cluster\",grpc_type=\"unary\"}[$__rate_interval]))", + "legendFormat": "RPC rate" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "sum(rate(grpc_server_handled_total{job=~\".*etcd.*\", job=\"$cluster\",grpc_type=\"unary\",grpc_code=~\"Unknown|FailedPrecondition|ResourceExhausted|Internal|Unavailable|DataLoss|DeadlineExceeded\"}[$__rate_interval]))", + "legendFormat": "RPC failed rate" + } + ], + "title": "RPC rate", + "type": "timeseries" + }, + { + "datasource": { + "type": "datasource", + "uid": "-- Mixed --" + }, + "fieldConfig": { + "defaults": { + "custom": { + "fillOpacity": 0, + "lineWidth": 2, + "showPoints": "never" + } + } + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 0 + }, + "id": 3, + "interval": "1m", + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "sum(grpc_server_started_total{job=~\".*etcd.*\",job=\"$cluster\",grpc_service=\"etcdserverpb.Watch\",grpc_type=\"bidi_stream\"}) - sum(grpc_server_handled_total{job=\"$cluster\",grpc_service=\"etcdserverpb.Watch\",grpc_type=\"bidi_stream\"})", + "legendFormat": "Watch streams" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "sum(grpc_server_started_total{job=~\".*etcd.*\",job=\"$cluster\",grpc_service=\"etcdserverpb.Lease\",grpc_type=\"bidi_stream\"}) - sum(grpc_server_handled_total{job=\"$cluster\",grpc_service=\"etcdserverpb.Lease\",grpc_type=\"bidi_stream\"})", + "legendFormat": "Lease streams" + } + ], + "title": "Active streams", + "type": "timeseries" + }, + { + "datasource": { + "type": "datasource", + "uid": "-- Mixed --" + }, + "fieldConfig": { + "defaults": { + "custom": { + "fillOpacity": 0, + "lineWidth": 2, + "showPoints": "never" + }, + "unit": "bytes" + } + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 25 + }, + "id": 4, + "interval": "1m", + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "etcd_mvcc_db_total_size_in_bytes{job=~\".*etcd.*\", job=\"$cluster\"}", + "legendFormat": "{{instance}} DB size" + } + ], + "title": "DB size", + "type": "timeseries" + }, + { + "datasource": { + "type": "datasource", + "uid": "-- Mixed --" + }, + "fieldConfig": { + "defaults": { + "custom": { + "fillOpacity": 0, + "lineWidth": 2, + "showPoints": "never" + }, + "unit": "s" + } + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 8, + "y": 25 + }, + "id": 5, + "interval": "1m", + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "histogram_quantile(0.99, sum(rate(etcd_disk_wal_fsync_duration_seconds_bucket{job=~\".*etcd.*\", job=\"$cluster\"}[$__rate_interval])) by (instance, le))", + "legendFormat": "{{instance}} WAL fsync" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "histogram_quantile(0.99, sum(rate(etcd_disk_backend_commit_duration_seconds_bucket{job=~\".*etcd.*\", job=\"$cluster\"}[$__rate_interval])) by (instance, le))", + "legendFormat": "{{instance}} DB fsync" + } + ], + "title": "Disk sync duration", + "type": "timeseries" + }, + { + "datasource": { + "type": "datasource", + "uid": "-- Mixed --" + }, + "fieldConfig": { + "defaults": { + "custom": { + "fillOpacity": 0, + "lineWidth": 2, + "showPoints": "never" + }, + "unit": "bytes" + } + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 25 + }, + "id": 6, + "interval": "1m", + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "process_resident_memory_bytes{job=~\".*etcd.*\", job=\"$cluster\"}", + "legendFormat": "{{instance}} resident memory" + } + ], + "title": "Memory", + "type": "timeseries" + }, + { + "datasource": { + "type": "datasource", + "uid": "-- Mixed --" + }, + "fieldConfig": { + "defaults": { + "custom": { + "fillOpacity": 0, + "lineWidth": 2, + "showPoints": "never" + }, + "unit": "Bps" + } + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 50 + }, + "id": 7, + "interval": "1m", + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "rate(etcd_network_client_grpc_received_bytes_total{job=~\".*etcd.*\", job=\"$cluster\"}[$__rate_interval])", + "legendFormat": "{{instance}} client traffic in" + } + ], + "title": "Client traffic in", + "type": "timeseries" + }, + { + "datasource": { + "type": "datasource", + "uid": "-- Mixed --" + }, + "fieldConfig": { + "defaults": { + "custom": { + "fillOpacity": 0, + "lineWidth": 2, + "showPoints": "never" + }, + "unit": "Bps" + } + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 50 + }, + "id": 8, + "interval": "1m", + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "rate(etcd_network_client_grpc_sent_bytes_total{job=~\".*etcd.*\", job=\"$cluster\"}[$__rate_interval])", + "legendFormat": "{{instance}} client traffic out" + } + ], + "title": "Client traffic out", + "type": "timeseries" + }, + { + "datasource": { + "type": "datasource", + "uid": "-- Mixed --" + }, + "fieldConfig": { + "defaults": { + "custom": { + "fillOpacity": 0, + "lineWidth": 2, + "showPoints": "never" + }, + "unit": "Bps" + } + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 12, + "y": 50 + }, + "id": 9, + "interval": "1m", + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "sum(rate(etcd_network_peer_received_bytes_total{job=~\".*etcd.*\", job=\"$cluster\"}[$__rate_interval])) by (instance)", + "legendFormat": "{{instance}} peer traffic in" + } + ], + "title": "Peer traffic in", + "type": "timeseries" + }, + { + "datasource": { + "type": "datasource", + "uid": "-- Mixed --" + }, + "fieldConfig": { + "defaults": { + "custom": { + "fillOpacity": 0, + "lineWidth": 2, + "showPoints": "never" + }, + "unit": "Bps" + } + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 18, + "y": 50 + }, + "id": 10, + "interval": "1m", + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "sum(rate(etcd_network_peer_sent_bytes_total{job=~\".*etcd.*\", job=\"$cluster\"}[$__rate_interval])) by (instance)", + "legendFormat": "{{instance}} peer traffic out" + } + ], + "title": "Peer traffic out", + "type": "timeseries" + }, + { + "datasource": { + "type": "datasource", + "uid": "-- Mixed --" + }, + "fieldConfig": { + "defaults": { + "custom": { + "fillOpacity": 0, + "lineWidth": 2, + "showPoints": "never" + } + } + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 75 + }, + "id": 11, + "interval": "1m", + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "changes(etcd_server_leader_changes_seen_total{job=~\".*etcd.*\", job=\"$cluster\"}[1d])", + "legendFormat": "{{instance}} total leader elections per day" + } + ], + "title": "Raft proposals", + "type": "timeseries" + }, + { + "datasource": { + "type": "datasource", + "uid": "-- Mixed --" + }, + "fieldConfig": { + "defaults": { + "custom": { + "fillOpacity": 0, + "lineWidth": 2, + "showPoints": "never" + } + } + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 8, + "y": 75 + }, + "id": 12, + "interval": "1m", + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "changes(etcd_server_leader_changes_seen_total{job=~\".*etcd.*\", job=\"$cluster\"}[1d])", + "legendFormat": "{{instance}} total leader elections per day" + } + ], + "title": "Total leader elections per day", + "type": "timeseries" + }, + { + "datasource": { + "type": "datasource", + "uid": "-- Mixed --" + }, + "fieldConfig": { + "defaults": { + "custom": { + "fillOpacity": 0, + "lineWidth": 2, + "showPoints": "never" + }, + "unit": "s" + } + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 75 + }, + "id": 13, + "interval": "1m", + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "histogram_quantile(0.99, sum by (instance, le) (rate(etcd_network_peer_round_trip_time_seconds_bucket{job=~\".*etcd.*\", job=\"$cluster\"}[$__rate_interval])))", + "legendFormat": "{{instance}} peer round trip time" + } + ], + "title": "Peer round trip time", + "type": "timeseries" + } + ], + "refresh": "10s", + "schemaVersion": 36, + "tags": [ + "etcd-mixin" + ], + "templating": { + "list": [ + { + "label": "Data Source", + "name": "datasource", + "query": "prometheus", + "type": "datasource" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "label": "cluster", + "name": "cluster", + "query": "label_values(etcd_server_has_leader{job=~\".*etcd.*\"}, job)", + "refresh": 2, + "type": "query" + } + ] + }, + "time": { + "from": "now-15m", + "to": "now" + }, + "timezone": "utc", + "title": "Kubernetes / etcd", + "uid": "c2f4e12cdf69feb95caa41a5a1b423d9" + } +kind: ConfigMap +metadata: + name: etcd-grafana-dashboard + namespace: kube-system + labels: + grafana_dashboard: "1" diff --git a/proxmox/manifests/grafana/grafana-secrets.yaml b/proxmox/manifests/grafana/grafana-secrets.yaml new file mode 100644 index 0000000..a2ce018 --- /dev/null +++ b/proxmox/manifests/grafana/grafana-secrets.yaml @@ -0,0 +1,23 @@ +apiVersion: external-secrets.io/v1 +kind: ExternalSecret +metadata: + name: grafana-secrets + namespace: grafana +spec: + secretStoreRef: + name: infisical + kind: ClusterSecretStore + + target: + name: grafana-secrets + creationPolicy: Owner + template: + engineVersion: v2 + type: Opaque + + data: + - secretKey: client-secret + remoteRef: + key: /grafana/GRAFANA_OAUTH_CLIENT_SECRET + + refreshInterval: 1h diff --git a/proxmox/manifests/infisical-pki-issuer/cluster-issuer.yaml b/proxmox/manifests/infisical-pki-issuer/cluster-issuer.yaml new file mode 100644 index 0000000..c4065f9 --- /dev/null +++ b/proxmox/manifests/infisical-pki-issuer/cluster-issuer.yaml @@ -0,0 +1,18 @@ +apiVersion: infisical-issuer.infisical.com/v1alpha1 +kind: ClusterIssuer +metadata: + name: infisical +spec: + url: https://vault.itqdev.xyz + application: default + profile: default-letsencrypt-tls-server + authentication: + method: kubernetes + kubernetes: + identityIdRef: + name: infisical-identity + namespace: infisical-pki-issuer + key: identityId + serviceAccountRef: + name: infisical-issuer-auth + namespace: infisical-pki-issuer diff --git a/proxmox/manifests/infisical-pki-issuer/infisical-identity-secret.yaml b/proxmox/manifests/infisical-pki-issuer/infisical-identity-secret.yaml new file mode 100644 index 0000000..48809ba --- /dev/null +++ b/proxmox/manifests/infisical-pki-issuer/infisical-identity-secret.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: Secret +metadata: + name: infisical-identity + namespace: infisical-pki-issuer +type: Opaque +stringData: + identityId: 53d8d4b5-6108-4512-833d-c598d1534256 diff --git a/proxmox/manifests/infisical-pki-issuer/rbac.yaml b/proxmox/manifests/infisical-pki-issuer/rbac.yaml new file mode 100644 index 0000000..5134e03 --- /dev/null +++ b/proxmox/manifests/infisical-pki-issuer/rbac.yaml @@ -0,0 +1,57 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: infisical-issuer-auth + namespace: infisical-pki-issuer +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: cert-manager-approve-infisical +rules: + - apiGroups: + - cert-manager.io + resources: + - signers + verbs: + - approve + resourceNames: + - clusterissuers.infisical-issuer.infisical.com/infisical +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: cert-manager-approve-infisical +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cert-manager-approve-infisical +subjects: + - kind: ServiceAccount + name: cert-manager + namespace: cert-manager +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: infisical-token-reviewer +rules: + - apiGroups: + - authentication.k8s.io + resources: + - tokenreviews + verbs: + - create +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: infisical-issuer-token-reviewer +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: infisical-token-reviewer +subjects: + - kind: ServiceAccount + name: infisical-issuer-auth + namespace: infisical-pki-issuer diff --git a/proxmox/manifests/infrastructure/cilium/l2announcement.yaml b/proxmox/manifests/infrastructure/cilium/l2announcement.yaml new file mode 100644 index 0000000..9c970dd --- /dev/null +++ b/proxmox/manifests/infrastructure/cilium/l2announcement.yaml @@ -0,0 +1,10 @@ +apiVersion: cilium.io/v2alpha1 +kind: CiliumL2AnnouncementPolicy +metadata: + name: default +spec: + loadBalancerIPs: true + interfaces: + - ens18 + nodeSelector: + matchLabels: {} diff --git a/proxmox/manifests/infrastructure/cilium/loadbalancerippool.yaml b/proxmox/manifests/infrastructure/cilium/loadbalancerippool.yaml new file mode 100644 index 0000000..27ae578 --- /dev/null +++ b/proxmox/manifests/infrastructure/cilium/loadbalancerippool.yaml @@ -0,0 +1,7 @@ +apiVersion: cilium.io/v2 +kind: CiliumLoadBalancerIPPool +metadata: + name: default-pool +spec: + blocks: + - cidr: 10.13.46.0/24 diff --git a/proxmox/manifests/infrastructure/proxmox-csi/config-secret.yaml b/proxmox/manifests/infrastructure/proxmox-csi/config-secret.yaml new file mode 100644 index 0000000..eec9346 --- /dev/null +++ b/proxmox/manifests/infrastructure/proxmox-csi/config-secret.yaml @@ -0,0 +1,27 @@ +apiVersion: external-secrets.io/v1 +kind: ExternalSecret +metadata: + name: proxmox-csi-config + namespace: proxmox-csi-plugin +spec: + refreshInterval: 1h + secretStoreRef: + name: infisical + kind: ClusterSecretStore + target: + name: proxmox-csi-config + creationPolicy: Owner + template: + type: Opaque + data: + config.yaml: | + clusters: + - url: https://10.13.0.1:8006/api2/json + insecure: true + token_id: kubernetes-csi@pve!csi + token_secret: "{{ .tokenSecret }}" + region: Region1 + data: + - secretKey: tokenSecret + remoteRef: + key: /proxmox-csi/TOKEN_SECRET diff --git a/proxmox/manifests/infrastructure/proxmox-csi/manifests/hdd.yaml b/proxmox/manifests/infrastructure/proxmox-csi/manifests/hdd.yaml new file mode 100644 index 0000000..ed5a723 --- /dev/null +++ b/proxmox/manifests/infrastructure/proxmox-csi/manifests/hdd.yaml @@ -0,0 +1,13 @@ +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + name: proxmox-hdd +parameters: + csi.storage.k8s.io/fstype: ext4 + storage: external-hdd-lvm + cache: none + ssd: "false" +provisioner: csi.proxmox.sinextra.dev +allowVolumeExpansion: true +reclaimPolicy: Delete +volumeBindingMode: WaitForFirstConsumer diff --git a/proxmox/manifests/infrastructure/proxmox-csi/manifests/ssd.yaml b/proxmox/manifests/infrastructure/proxmox-csi/manifests/ssd.yaml new file mode 100644 index 0000000..efd8e49 --- /dev/null +++ b/proxmox/manifests/infrastructure/proxmox-csi/manifests/ssd.yaml @@ -0,0 +1,15 @@ +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + name: proxmox-ssd + annotations: + storageclass.kubernetes.io/is-default-class: "true" +parameters: + csi.storage.k8s.io/fstype: ext4 + storage: local-lvm + cache: none + ssd: "true" +provisioner: csi.proxmox.sinextra.dev +allowVolumeExpansion: true +reclaimPolicy: Delete +volumeBindingMode: WaitForFirstConsumer diff --git a/proxmox/manifests/mediamtx/configmap.yaml b/proxmox/manifests/mediamtx/configmap.yaml new file mode 100644 index 0000000..9a94bba --- /dev/null +++ b/proxmox/manifests/mediamtx/configmap.yaml @@ -0,0 +1,813 @@ +apiVersion: v1 +data: + mediamtx.yml: |- + ############################################### + # Global settings + + # Settings in this section are applied anywhere. + + ############################################### + # Global settings -> General + + # Verbosity of the program; available values are "error", "warn", "info", "debug". + logLevel: info + # Destinations of log messages; available values are "stdout", "file" and "syslog". + logDestinations: [stdout] + # When destination is "stdout" or "file", emit logs in structured format (JSONL). + logStructured: false + # When "file" is in logDestinations, this is the file which will receive logs. + logFile: mediamtx.log + # When "syslog" is in logDestinations, use prefix for logs. + sysLogPrefix: mediamtx + # Dump packets to disk. This is useful for debugging. + dumpPackets: false + + # Timeout of read operations. + readTimeout: 10s + # Timeout of write operations. + writeTimeout: 10s + # Size of the queue of outgoing packets. + # A higher value allows to increase throughput, a lower value allows to save RAM. + writeQueueSize: 512 + # Maximum size of outgoing UDP payloads. + # It defaults to the maximum packet size on ethernet (1500) minus IPv6 and UDP headers (48). + # This can be decreased to avoid fragmentation on networks with a low MTU. + udpMaxPayloadSize: 1452 + # Size of the read buffer of every UDP socket. + # This can be increased to decrease packet losses. + # It defaults to the default value of the operating system. + udpReadBufferSize: 0 + + # Command to run when a client connects to the server. + # This is terminated with SIGINT when a client disconnects from the server. + # The following environment variables are available: + # * MTX_CONN_TYPE: connection type + # * MTX_CONN_ID: connection ID + # * RTSP_PORT: RTSP server port + runOnConnect: + # Restart the command if it exits. + runOnConnectRestart: false + # Command to run when a client disconnects from the server. + # Environment variables are the same as runOnConnect. + runOnDisconnect: + + ############################################### + # Global settings -> Authentication + + # Authentication method. Available values are: + # * internal: credentials are stored in the configuration file + # * http: an external HTTP URL is contacted to perform authentication + # * jwt: an external identity server provides authentication through JWTs + authMethod: internal + + # Internal authentication. + # Enabled users. + authInternalUsers: + # Default unprivileged user. + # Username. 'any' means any user, including anonymous ones. + - user: any + # Password. Not used in case of 'any' user. + pass: + # IPs or networks allowed to use this user. An empty list means any IP. + ips: [] + # Permissions. + permissions: + # Available actions are: publish, read, playback, api, metrics, pprof. + - action: publish + # Paths can be set to further restrict access to a specific path. + # An empty path means any path. + # Regular expressions can be used by using a tilde as prefix. + path: + - action: read + path: + - action: playback + path: + + # Default administrator. + # This allows to use API, metrics and PPROF without authentication, + # if the IP is localhost. + - user: any + pass: + ips: ['127.0.0.1', '::1'] + permissions: + - action: api + - action: metrics + - action: pprof + + # HTTP-based authentication. + # URL called to perform authentication. Every time a user wants + # to authenticate, the server calls this URL with the POST method + # and a body containing: + # { + # "user": "user", + # "password": "password", + # "token": "token", + # "ip": "ip", + # "action": "publish|read|playback|api|metrics|pprof", + # "path": "path", + # "protocol": "rtsp|rtmp|hls|webrtc|srt", + # "id": "id", + # "query": "query" + # } + # If the response code is 20x, authentication is accepted, otherwise + # it is discarded. + authHTTPAddress: + # If the HTTP authentication URL has a self-signed or invalid certificate, + # you can provide the fingerprint of the certificate in order to + # validate it anyway. It can be obtained by running: + # openssl s_client -connect auth_http_domain:443 /dev/null | sed -n '/BEGIN/,/END/p' > server.crt + # openssl x509 -in server.crt -noout -fingerprint -sha256 | cut -d "=" -f2 | tr -d ':' + authHTTPFingerprint: + # Actions to exclude from HTTP-based authentication. + # Format is the same as the one of user permissions. + authHTTPExclude: + - action: api + - action: metrics + - action: pprof + + # JWT-based authentication. + # Users have to log in through an external identity server and obtain a JWT. + # This JWT must contain the claim "mediamtx_permissions" with permissions, + # for instance: + # { + # "mediamtx_permissions": [ + # { + # "action": "publish", + # "path": "somepath" + # } + # ] + # } + # Users are expected to pass the JWT in the Authorization header or as password. + # This is the JWKS URL that will be used to pull (once) the public key that allows + # to validate JWTs. + authJWTJWKS: + # If the JWKS URL has a self-signed or invalid certificate, + # you can provide the fingerprint of the certificate in order to + # validate it anyway. It can be obtained by running: + # openssl s_client -connect jwt_jwks_domain:443 /dev/null | sed -n '/BEGIN/,/END/p' > server.crt + # openssl x509 -in server.crt -noout -fingerprint -sha256 | cut -d "=" -f2 | tr -d ':' + authJWTJWKSFingerprint: + # name of the claim that contains permissions. + authJWTClaimKey: mediamtx_permissions + # Actions to exclude from JWT-based authentication. + # Format is the same as the one of user permissions. + authJWTExclude: [] + # Allow passing the JWT through query parameters of HTTP requests (i.e. ?jwt=JWT). + # This is a security risk and will be disabled in the future. + # RTSP and RTMP always allow JWT in query even if disabled, since there is no alternative. + authJWTInHTTPQuery: true + # Expected issuer (iss) claim in the JWT. Leave empty to skip validation. + authJWTIssuer: + # Expected audience (aud) claim in the JWT. Leave empty to skip validation. + authJWTAudience: + + ############################################### + # Global settings -> Control API + + # Allow clients to control the server through the Control API. + api: false + # Address of the Control API listener. + apiAddress: :9997 + # Enable HTTPS on the Control API server. + apiEncryption: false + # Path to the server key. This is needed only when encryption is yes. + # This can be generated with: + # openssl genrsa -out server.key 2048 + # openssl req -new -x509 -sha256 -key server.key -out server.crt -days 3650 + apiServerKey: server.key + # Path to the server certificate. + apiServerCert: server.crt + # Allowed CORS origins. + # Supports wildcards: ['http://*.example.com'] + apiAllowOrigins: ['*'] + # IPs or CIDRs of proxies placed before the HTTP server. + # These proxies can use the X-Forwarded-For header to set the real IP of clients, + # and the X-Forwarded-Proto header to set the original protocol. + apiTrustedProxies: [] + + ############################################### + # Global settings -> Metrics + + # Allow clients to extract Prometheus-compatible metrics. + metrics: false + # Address of the metrics HTTP listener. + metricsAddress: :9998 + # Enable HTTPS on the Metrics server. + metricsEncryption: false + # Path to the server key. This is needed only when encryption is yes. + # This can be generated with: + # openssl genrsa -out server.key 2048 + # openssl req -new -x509 -sha256 -key server.key -out server.crt -days 3650 + metricsServerKey: server.key + # Path to the server certificate. + metricsServerCert: server.crt + # Allowed CORS origins. + # Supports wildcards: ['http://*.example.com'] + metricsAllowOrigins: ['*'] + # IPs or CIDRs of proxies placed before the HTTP server. + # These proxies can use the X-Forwarded-For header to set the real IP of clients, + # and the X-Forwarded-Proto header to set the original protocol. + metricsTrustedProxies: [] + + ############################################### + # Global settings -> PPROF + + # Allow clients to extract pprof-compatible performance reports. + pprof: false + # Address of the pprof listener. + pprofAddress: :9999 + # Enable HTTPS on the pprof server. + pprofEncryption: false + # Path to the server key. This is needed only when encryption is yes. + # This can be generated with: + # openssl genrsa -out server.key 2048 + # openssl req -new -x509 -sha256 -key server.key -out server.crt -days 3650 + pprofServerKey: server.key + # Path to the server certificate. + pprofServerCert: server.crt + # Allowed CORS origins. + # Supports wildcards: ['http://*.example.com'] + pprofAllowOrigins: ['*'] + # IPs or CIDRs of proxies placed before the HTTP server. + # These proxies can use the X-Forwarded-For header to set the real IP of clients, + # and the X-Forwarded-Proto header to set the original protocol. + pprofTrustedProxies: [] + + ############################################### + # Global settings -> Playback server + + # Allow clients to download recordings from the playback server. + playback: false + # Address of the playback server listener. + playbackAddress: :9996 + # Enable HTTPS on the playback server. + playbackEncryption: false + # Path to the server key. This is needed only when encryption is yes. + # This can be generated with: + # openssl genrsa -out server.key 2048 + # openssl req -new -x509 -sha256 -key server.key -out server.crt -days 3650 + playbackServerKey: server.key + # Path to the server certificate. + playbackServerCert: server.crt + # Allowed CORS origins. + # Supports wildcards: ['http://*.example.com'] + playbackAllowOrigins: ['*'] + # IPs or CIDRs of proxies placed before the HTTP server. + # These proxies can use the X-Forwarded-For header to set the real IP of clients, + # and the X-Forwarded-Proto header to set the original protocol. + playbackTrustedProxies: [] + + ############################################### + # Global settings -> RTSP server + + # Allow clients to publish and read streams with the RTSP protocol. + rtsp: true + # Enabled RTSP transport protocols. The handshake is always performed with TCP. + rtspTransports: [udp, multicast, tcp] + # Use secure protocol variants (RTSPS, SRTP, SRTCP). + # Available values are "no", "strict", "optional". + rtspEncryption: "no" + # Address of the TCP/RTSP listener. This is needed only when encryption is "no" or "optional". + rtspAddress: :8554 + # Address of the TCP/RTSPS listener. This is needed only when encryption is "strict" or "optional". + rtspsAddress: :8322 + # Address of the UDP/RTP listener. This is needed only when "udp" is in rtspTransports and encryption is "no" or "optional". + rtpAddress: :8000 + # Address of the UDP/RTCP listener. This is needed only when "udp" is in rtspTransports and encryption is "no" or "optional". + rtcpAddress: :8001 + # IP range of all UDP-multicast listeners. This is needed only when "multicast" is in rtspTransports and encryption is "no" or "optional". + multicastIPRange: 224.1.0.0/16 + # Port of all UDP-multicast/RTP listeners. This is needed only when "multicast" is in rtspTransports and encryption is "no" or "optional". + multicastRTPPort: 8002 + # Port of all UDP-multicast/RTCP listeners. This is needed only when "multicast" is in rtspTransports and encryption is "no" or "optional". + multicastRTCPPort: 8003 + # Address of the UDP/SRTP listener. This is needed only when "udp" is in rtspTransports and encryption is "strict" or "optional". + srtpAddress: :8004 + # Address of the UDP/SRTCP listener. This is needed only when "udp" is in rtspTransports and encryption is "strict" or "optional". + srtcpAddress: :8005 + # Port of all UDP-multicast/SRTP listeners. This is needed only when "multicast" is in rtspTransports and encryption is "strict" or "optional". + multicastSRTPPort: 8006 + # Port of all UDP-multicast/SRTCP listeners. This is needed only when "multicast" is in rtspTransports and encryption is "strict" or "optional". + multicastSRTCPPort: 8007 + # Path to the server key. This is needed only when encryption is "strict" or "optional". + # This can be generated with: + # openssl genrsa -out server.key 2048 + # openssl req -new -x509 -sha256 -key server.key -out server.crt -days 3650 + rtspServerKey: server.key + # Path to the server certificate. This is needed only when encryption is "strict" or "optional". + rtspServerCert: server.crt + # Authentication methods. Available are "basic" and "digest". + # "digest" doesn't provide any additional security and is available for compatibility only. + rtspAuthMethods: [basic] + + ############################################### + # Global settings -> RTMP server + + # Allow clients to publish and read streams with the RTMP protocol. + rtmp: true + # Use the secure protocol variant (RTMPS). + # Available values are "no", "strict", "optional". + rtmpEncryption: "no" + # Address of the RTMP listener. This is needed only when encryption is "no" or "optional". + rtmpAddress: :1935 + # Address of the RTMPS listener. This is needed only when encryption is "strict" or "optional". + rtmpsAddress: :1936 + # Path to the server key. This is needed only when encryption is "strict" or "optional". + # This can be generated with: + # openssl genrsa -out server.key 2048 + # openssl req -new -x509 -sha256 -key server.key -out server.crt -days 3650 + rtmpServerKey: server.key + # Path to the server certificate. This is needed only when encryption is "strict" or "optional". + rtmpServerCert: server.crt + + ############################################### + # Global settings -> HLS server + + # Allow clients to read streams with the HLS protocol. + hls: true + # Address of the HLS listener. + hlsAddress: :8888 + # Enable HTTPS on the HLS server. + # This is required for Low-Latency HLS to function correctly on Apple devices. + hlsEncryption: false + # Path to the server key. This is needed only when encryption is yes. + # This can be generated with: + # openssl genrsa -out server.key 2048 + # openssl req -new -x509 -sha256 -key server.key -out server.crt -days 3650 + hlsServerKey: server.key + # Path to the server certificate. + hlsServerCert: server.crt + # Allowed CORS origins. + # Supports wildcards: ['http://*.example.com'] + hlsAllowOrigins: ['*'] + # IPs or CIDRs of proxies placed before the HLS server. + # If the server receives a request from one of these entries, IP in logs + # will be taken from the X-Forwarded-For header. + hlsTrustedProxies: [] + # By default, HLS is generated only when requested by a user. + # This option allows to generate it always, avoiding the delay between request and generation. + hlsAlwaysRemux: false + # Variant of the HLS protocol to use. Available options are: + # * mpegts - uses MPEG-TS segments, for maximum compatibility. + # * fmp4 - uses fragmented MP4 segments, more efficient. + # * lowLatency - uses Low-Latency HLS. + hlsVariant: mpegts + # Number of HLS segments to keep on the server. + # Segments allow to seek through the stream. + # Their number doesn't influence latency. + hlsSegmentCount: 7 + # Minimum duration of each segment. + # A player usually puts 3 segments in a buffer before reproducing the stream. + # The final segment duration is also influenced by the interval between IDR frames, + # since the server changes the duration in order to include at least one IDR frame + # in each segment. + hlsSegmentDuration: 2s + # Minimum duration of each part. + # A player usually puts 3 parts in a buffer before reproducing the stream. + # Parts are used in Low-Latency HLS in place of segments. + # Part duration is influenced by the distance between video/audio samples + # and is adjusted in order to produce segments with a similar duration. + hlsPartDuration: "0" + # Maximum size of each segment. + # This prevents RAM exhaustion. + hlsSegmentMaxSize: 50M + # Directory in which to save segments, instead of keeping them in the RAM. + # This decreases performance, since reading from disk is less performant than + # reading from RAM, but allows to save RAM. + hlsDirectory: '' + # The muxer will be closed when there are no + # reader requests and this amount of time has passed. + hlsMuxerCloseAfter: 60s + + ############################################### + # Global settings -> WebRTC server + + # Allow clients to publish and read streams with the WebRTC protocol. + webrtc: true + # Address of the WebRTC HTTP listener. + webrtcAddress: :8889 + # Enable HTTPS on the WebRTC server. + # This covers only the WebRTC handshake and does not influence the encryption of WebRTC streams + # which are always encrypted, with a key that is exchanged during the WebRTC handshake. + webrtcEncryption: false + # Path to the server key. + # This can be generated with: + # openssl genrsa -out server.key 2048 + # openssl req -new -x509 -sha256 -key server.key -out server.crt -days 3650 + webrtcServerKey: server.key + # Path to the server certificate. + webrtcServerCert: server.crt + # Allowed CORS origins. + # Supports wildcards: ['http://*.example.com'] + webrtcAllowOrigins: ['*'] + # IPs or CIDRs of proxies placed before the WebRTC server. + # If the server receives a request from one of these entries, IP in logs + # will be taken from the X-Forwarded-For header. + webrtcTrustedProxies: [] + # Address of a local UDP listener that will receive connections. + # Use a blank string to disable. + webrtcLocalUDPAddress: :8189 + # Address of a local TCP listener that will receive connections. + # This is disabled by default since TCP is less efficient than UDP and + # introduces a progressive delay when network is congested. + webrtcLocalTCPAddress: '' + # WebRTC clients need to know the IP of the server. + # Gather IPs from interfaces and send them to clients. + webrtcIPsFromInterfaces: true + # Interfaces whose IPs will be sent to clients. + # An empty value means to use all available interfaces. + webrtcIPsFromInterfacesList: [] + # Additional hosts or IPs to send to clients. + webrtcAdditionalHosts: [] + # ICE servers. Needed only when local listeners can't be reached by clients. + # STUN servers allow to obtain and share the public IP of the server. + # TURN/TURNS servers force all traffic through them. + webrtcICEServers2: [] + # - url: stun:stun.l.google.com:19302 + # if user is "AUTH_SECRET", then authentication is secret based. + # the secret must be inserted into the password field. + # username: '' + # password: '' + # clientOnly: false + # Maximum time to gather STUN candidates. + webrtcSTUNGatherTimeout: 5s + # Time to wait for the WebRTC handshake to complete. + webrtcHandshakeTimeout: 10s + # Maximum time to gather tracks. + webrtcTrackGatherTimeout: 2s + + ############################################### + # Global settings -> SRT server + + # Allow clients to publish and read streams with the SRT protocol. + srt: true + # Address of the SRT listener. + srtAddress: :8890 + + ############################################### + # Default path settings + + # Settings in "pathDefaults" are applied anywhere, + # unless they are overridden in "paths". + pathDefaults: + + ############################################### + # Default path settings -> General + + # Source of the stream. This can be: + # * publisher -> the stream is provided by a RTSP, RTMP, WebRTC or SRT client + # * rtsp://existing-url -> the stream is pulled from another RTSP server / camera + # * rtsps://existing-url -> the stream is pulled from another RTSP server / camera with RTSPS + # * rtsp+http://existing-url -> the stream is pulled from another RTSP server / camera, with HTTP tunneling + # * rtsps+http://existing-url -> the stream is pulled from another RTSP server / camera, with HTTPS tunneling + # * rtsp+ws://existing-url -> the stream is pulled from another RTSP server / camera, with WebSocket tunneling + # * rtsps+ws://existing-url -> the stream is pulled from another RTSP server / camera, with secure WebSocket tunneling + # * rtmp://existing-url -> the stream is pulled from another RTMP server / camera + # * rtmps://existing-url -> the stream is pulled from another RTMP server / camera with RTMPS + # * http://existing-url/stream.m3u8 -> the stream is pulled from another HLS server / camera + # * https://existing-url/stream.m3u8 -> the stream is pulled from another HLS server / camera with HTTPS + # * udp+mpegts://ip:port -> the stream is pulled from MPEG-TS over UDP, by listening on the specified address + # * unix+mpegts://socket -> the stream is pulled from MPEG-TS over Unix socket, by using the socket + # * udp+rtp://ip:port -> the stream is pulled from RTP over UDP, by listening on the specified address + # * srt://existing-url -> the stream is pulled from another SRT server / camera + # * whep://existing-url -> the stream is pulled from another WebRTC server / camera with HTTP+WHEP + # * wheps://existing-url -> the stream is pulled from another WebRTC server / camera with HTTPS+WHEP + # * redirect -> the stream is provided by another path or server + # * rpiCamera -> the stream is provided by a Raspberry Pi Camera + # The following variables can be used in the source string: + # * $MTX_QUERY: query parameters (passed by first reader) + # * $G1, $G2, ...: regular expression groups, if path name is + # a regular expression. + source: publisher + # If the source is a URL, and the source TLS certificate is self-signed + # or invalid, you can provide the fingerprint of the certificate in order to + # validate it anyway. It can be obtained by running: + # openssl s_client -connect source_ip:source_port /dev/null | sed -n '/BEGIN/,/END/p' > server.crt + # openssl x509 -in server.crt -noout -fingerprint -sha256 | cut -d "=" -f2 | tr -d ':' + sourceFingerprint: + # If the source is a URL, it will be pulled only when at least + # one reader is connected, saving bandwidth. + sourceOnDemand: false + # If sourceOnDemand is "yes", readers will be put on hold until the source is + # ready or until this amount of time has passed. + sourceOnDemandStartTimeout: 10s + # If sourceOnDemand is "yes", the source will be closed when there are no + # readers connected and this amount of time has passed. + sourceOnDemandCloseAfter: 10s + # Maximum number of readers. Zero means no limit. + maxReaders: 0 + # SRT encryption passphrase required to read from this path. + srtReadPassphrase: + # Use absolute timestamp of frames, instead of replacing them with the current time. + useAbsoluteTimestamp: false + + ############################################### + # Default path settings -> Always available + + # Enable always-available mode, in which an offline segment is played on repeat when the stream is not available. + alwaysAvailable: false + # Tracks of the default offline segment. + alwaysAvailableTracks: [] + # Available values are: AV1, VP9, H265, H264, Opus, MPEG4Audio, G711, LPCM + # - codec: H264 + # # in case of MPEG4Audio, G711, LPCM, sampleRate and ChannelCount must be provided too. + # sampleRate: 48000 + # channelCount: 2 + # # in case of G711, muLaw must be provided too. + # muLaw: false + # An MP4 file can be used instead of the default offline segment. + alwaysAvailableFile: '' + + ############################################### + # Default path settings -> Record + + # Record streams to disk. + record: false + # Path of recording segments. + # Extension is added automatically. + # Available variables are %path (path name), %Y %m %d (year, month, day), + # %H %M %S (hours, minutes, seconds), %f (microseconds), %z (time zone), %s (unix epoch). + recordPath: ./recordings/%path/%Y-%m-%d_%H-%M-%S-%f + # Format of recorded segments. + # Available formats are "fmp4" (fragmented MP4) and "mpegts" (MPEG-TS). + recordFormat: fmp4 + # fMP4 segments are concatenation of small MP4 files (parts), each with this duration. + # MPEG-TS segments are concatenation of 188-bytes packets, flushed to disk with this period. + # When a system failure occurs, the last part gets lost. + # Therefore, the part duration is equal to the RPO (recovery point objective). + recordPartDuration: 1s + # This prevents RAM exhaustion. + recordMaxPartSize: 50M + # Minimum duration of each segment. + recordSegmentDuration: 1h + # Delete segments after this timespan. + # Set to 0s to disable automatic deletion. + recordDeleteAfter: 1d + + ############################################### + # Default path settings -> Publisher source (when source is "publisher") + + # Allow another client to disconnect the current publisher and publish in its place. + overridePublisher: true + # SRT encryption passphrase required to publish to this path. + srtPublishPassphrase: + # Demux MPEG-TS over RTSP into elementary streams. + # When enabled, RTSP publishers sending MP2T/90000 will be demultiplexed + # and their elementary streams (H.264, H.265, AAC, etc.) exposed as native tracks. + # This allows HLS, WebRTC, and other outputs to work transparently with MPEG-TS sources. + rtspDemuxMpegts: false + + ############################################### + # Default path settings -> RTSP source (when source is a RTSP or a RTSPS URL) + + # Transport protocol used to pull the stream. available values are "automatic", "udp", "multicast", "tcp". + rtspTransport: automatic + # Support sources that don't provide server ports or use random server ports. This is a security issue + # and must be used only when interacting with sources that require it. + rtspAnyPort: false + # Range header to send to the source, in order to start streaming from the specified offset. + # available values: + # * clock: Absolute time + # * npt: Normal Play Time + # * smpte: SMPTE timestamps relative to the start of the recording + rtspRangeType: + # Available values: + # * clock: UTC ISO 8601 combined date and time string, e.g. 20230812T120000Z + # * npt: duration such as "300ms", "1.5m" or "2h45m", valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h" + # * smpte: duration such as "300ms", "1.5m" or "2h45m", valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h" + rtspRangeStart: + # Range of ports used as source port in outgoing UDP packets. + rtspUDPSourcePortRange: [10000, 65535] + + ############################################### + # Default path settings -> RTP source (when source is RTP) + + # session description protocol (SDP) of the RTP stream. + rtpSDP: + + ############################################### + # Default path settings -> WebRTC / WHEP source (when source is WHEP) + + # Token to insert in the Authorization: Bearer header. + whepBearerToken: '' + # Maximum time to gather STUN candidates. + whepSTUNGatherTimeout: 5s + # Time to wait for the WebRTC handshake to complete. + whepHandshakeTimeout: 10s + # Maximum time to gather tracks. + whepTrackGatherTimeout: 2s + + ############################################### + # Default path settings -> Redirect source (when source is "redirect") + + # Path to which clients will be redirected. + # It can be a relative path (i.e. /otherstream) or an absolute RTSP URL. + sourceRedirect: + + ############################################### + # Default path settings -> Raspberry Pi Camera source (when source is "rpiCamera") + + # ID of the camera. + rpiCameraCamID: 0 + # Whether this is a secondary stream. + rpiCameraSecondary: false + # Width of frames. + rpiCameraWidth: 1920 + # Height of frames. + rpiCameraHeight: 1080 + # Flip horizontally. + rpiCameraHFlip: false + # Flip vertically. + rpiCameraVFlip: false + # Brightness [-1, 1]. + rpiCameraBrightness: 0 + # Contrast [0, 16]. + rpiCameraContrast: 1 + # Saturation [0, 16]. + rpiCameraSaturation: 1 + # Sharpness [0, 16]. + rpiCameraSharpness: 1 + # Exposure mode. + # values: normal, short, long, custom. + rpiCameraExposure: normal + # Auto-white-balance mode. + # (auto, incandescent, tungsten, fluorescent, indoor, daylight, cloudy or custom). + rpiCameraAWB: auto + # Auto-white-balance fixed gains. This can be used in place of rpiCameraAWB. + # format: [red,blue]. + rpiCameraAWBGains: [0, 0] + # Denoise operating mode (off, cdn_off, cdn_fast, cdn_hq). + rpiCameraDenoise: "off" + # Fixed shutter speed, in microseconds. + rpiCameraShutter: 0 + # Metering mode of the AEC/AGC algorithm (centre, spot, matrix or custom). + rpiCameraMetering: centre + # Fixed gain. + rpiCameraGain: 0 + # EV compensation of the image in range [-10, 10]. + rpiCameraEV: 0 + # Region of interest, in format x,y,width,height (all normalized between 0 and 1). + rpiCameraROI: + # Whether to enable HDR on Raspberry Camera 3. + rpiCameraHDR: false + # Tuning file. + rpiCameraTuningFile: + # Sensor mode, in format [width]:[height]:[bit-depth]:[packing] + # bit-depth and packing are optional. + rpiCameraMode: + # frames per second. + rpiCameraFPS: 30 + # Autofocus mode (auto, manual or continuous). + rpiCameraAfMode: continuous + # Autofocus range (normal, macro or full). + rpiCameraAfRange: normal + # Autofocus speed (normal or fast). + rpiCameraAfSpeed: normal + # Lens position (for manual autofocus only), will be set to focus to a specific distance + # calculated by the following formula: d = 1 / value + # Examples: 0 moves the lens to infinity. + # 0.5 moves the lens to focus on objects 2m away. + # 2 moves the lens to focus on objects 50cm away. + rpiCameraLensPosition: 0.0 + # Autofocus window, in the form x,y,width,height where the coordinates + # are given as a proportion of the entire image. + rpiCameraAfWindow: + # Manual flicker correction period, in microseconds. + rpiCameraFlickerPeriod: 0 + # Enables printing text on each frame. + rpiCameraTextOverlayEnable: false + # Text that is printed on each frame. + # format is the one of the strftime() function. + rpiCameraTextOverlay: '%Y-%m-%d %H:%M:%S - MediaMTX' + # Codec (auto, hardwareH264, softwareH264 or mjpeg). + # When is "auto" and stream is primary, it defaults to hardwareH264 (if available) or softwareH264. + # When is "auto" and stream is secondary, it defaults to mjpeg. + rpiCameraCodec: auto + # Period between IDR frames (when codec is hardwareH264 or softwareH264). + rpiCameraIDRPeriod: 60 + # Bitrate (when codec is hardwareH264 or softwareH264). + rpiCameraBitrate: 5000000 + # Hardware H264 profile (baseline, main or high) (when codec is hardwareH264). + rpiCameraHardwareH264Profile: main + # Hardware H264 level (4.0, 4.1 or 4.2) (when codec is hardwareH264). + rpiCameraHardwareH264Level: '4.1' + # Software H264 profile (baseline, main or high) (when codec is softwareH264). + rpiCameraSoftwareH264Profile: baseline + # Software H264 level (4.0, 4.1 or 4.2) (when codec is softwareH264). + rpiCameraSoftwareH264Level: '4.1' + # M-JPEG JPEG quality (when codec is mjpeg). + rpiCameraMJPEGQuality: 60 + + ############################################### + # Default path settings -> Hooks + + # Command to run when this path is initialized. + # This can be used to publish a stream when the server is launched. + # This is terminated with SIGINT when the program closes. + # The following environment variables are available: + # * MTX_PATH: path name + # * RTSP_PORT: RTSP server port + # * G1, G2, ...: regular expression groups, if path name is + # a regular expression. + runOnInit: + # Restart the command if it exits. + runOnInitRestart: false + + # Command to run when this path is requested by a reader + # and no one is publishing to this path yet. + # This can be used to publish a stream on demand. + # This is terminated with SIGINT when there are no readers anymore. + # The following environment variables are available: + # * MTX_PATH: path name + # * MTX_QUERY: query parameters (passed by first reader) + # * RTSP_PORT: RTSP server port + # * G1, G2, ...: regular expression groups, if path name is + # a regular expression. + runOnDemand: + # Restart the command if it exits. + runOnDemandRestart: false + # Readers will be put on hold until the runOnDemand command starts publishing + # or until this amount of time has passed. + runOnDemandStartTimeout: 10s + # The command will be closed when there are no + # readers connected and this amount of time has passed. + runOnDemandCloseAfter: 10s + # Command to run when there are no readers anymore. + # Environment variables are the same as runOnDemand. + runOnUnDemand: + + # Command to run when the stream is ready to be read, whenever it is + # published by a client or pulled from a server / camera. + # This is terminated with SIGINT when the stream is not ready anymore. + # The following environment variables are available: + # * MTX_PATH: path name + # * MTX_QUERY: query parameters (passed by publisher) + # * MTX_SOURCE_TYPE: source type + # * MTX_SOURCE_ID: source ID + # * RTSP_PORT: RTSP server port + # * G1, G2, ...: regular expression groups, if path name is + # a regular expression. + runOnReady: + # Restart the command if it exits. + runOnReadyRestart: false + # Command to run when the stream is not available anymore. + # Environment variables are the same as runOnReady. + runOnNotReady: + + # Command to run when a client starts reading. + # This is terminated with SIGINT when a client stops reading. + # The following environment variables are available: + # * MTX_PATH: path name + # * MTX_QUERY: query parameters (passed by reader) + # * MTX_READER_TYPE: reader type + # * MTX_READER_ID: reader ID + # * RTSP_PORT: RTSP server port + # * G1, G2, ...: regular expression groups, if path name is + # a regular expression. + runOnRead: + # Restart the command if it exits. + runOnReadRestart: false + # Command to run when a client stops reading. + # Environment variables are the same as runOnRead. + runOnUnread: + + # Command to run when a recording segment is created. + # The following environment variables are available: + # * MTX_PATH: path name + # * MTX_SEGMENT_PATH: segment file path + # * RTSP_PORT: RTSP server port + # * G1, G2, ...: regular expression groups, if path name is + # a regular expression. + runOnRecordSegmentCreate: + + # Command to run when a recording segment is complete. + # The following environment variables are available: + # * MTX_PATH: path name + # * MTX_SEGMENT_PATH: segment file path + # * MTX_SEGMENT_DURATION: segment duration + # * RTSP_PORT: RTSP server port + # * G1, G2, ...: regular expression groups, if path name is + # a regular expression. + runOnRecordSegmentComplete: + + ############################################### + # Path settings + + # Settings in "paths" are applied to specific paths, and the map key + # is the name of the path. + # Any setting in "pathDefaults" can be overridden here. + # It's possible to use regular expressions by using a tilde as prefix, + # for example "~^(test1|test2)$" will match both "test1" and "test2", + # for example "~^prefix" will match all paths that start with "prefix". + paths: + # example: + # my_camera: + # source: rtsp://my_camera + + # Settings under path "all_others" are applied to all paths that + # do not match another entry. + all_others: +kind: ConfigMap +metadata: + name: mediamtx + namespace: mediamtx diff --git a/proxmox/manifests/mediamtx/mediamtx.xml b/proxmox/manifests/mediamtx/mediamtx.xml new file mode 100644 index 0000000..c8a70f2 --- /dev/null +++ b/proxmox/manifests/mediamtx/mediamtx.xml @@ -0,0 +1,28 @@ + + + + MediaMTX + + + MediaMTX RTMP + srt://10.13.46.3:8890?streamid=publish:main + + + + + + MediaMTX 1080p + + + + + + diff --git a/proxmox/manifests/secrets/etcd-certs.yaml b/proxmox/manifests/secrets/etcd-certs.yaml new file mode 100644 index 0000000..5681520 --- /dev/null +++ b/proxmox/manifests/secrets/etcd-certs.yaml @@ -0,0 +1,25 @@ +apiVersion: external-secrets.io/v1 +kind: ExternalSecret +metadata: + name: etcd-certs + namespace: observability +spec: + refreshInterval: 1h + secretStoreRef: + name: infisical + kind: ClusterSecretStore + target: + name: etcd-certs + creationPolicy: Owner + template: + type: Opaque + data: + - secretKey: ca.crt + remoteRef: + key: /observability/ETCD_CA_CERT + - secretKey: client.crt + remoteRef: + key: /observability/ETCD_CLIENT_CERT + - secretKey: client.key + remoteRef: + key: /observability/ETCD_CLIENT_KEY diff --git a/proxmox/manifests/secrets/submariner-broker-credentials.yaml b/proxmox/manifests/secrets/submariner-broker-credentials.yaml new file mode 100644 index 0000000..bee4528 --- /dev/null +++ b/proxmox/manifests/secrets/submariner-broker-credentials.yaml @@ -0,0 +1,27 @@ +apiVersion: external-secrets.io/v1 +kind: ExternalSecret +metadata: + name: submariner-broker-client-token + namespace: submariner-operator +spec: + refreshInterval: 1h + secretStoreRef: + name: infisical + kind: ClusterSecretStore + target: + name: submariner-k8s-broker-remote-client-token + creationPolicy: Owner + template: + engineVersion: v2 + type: Opaque + data: + namespace: submariner-operator + token: "{{ .brokerToken }}" + ca.crt: "{{ .brokerCaCert }}" + data: + - secretKey: brokerToken + remoteRef: + key: /submariner/BROKER_CLIENT_TOKEN + - secretKey: brokerCaCert + remoteRef: + key: /submariner/BROKER_CLIENT_CA_CERT diff --git a/proxmox/manifests/secrets/submariner-ipsec.yaml b/proxmox/manifests/secrets/submariner-ipsec.yaml new file mode 100644 index 0000000..9af666a --- /dev/null +++ b/proxmox/manifests/secrets/submariner-ipsec.yaml @@ -0,0 +1,19 @@ +apiVersion: external-secrets.io/v1 +kind: ExternalSecret +metadata: + name: submariner-ipsec-psk + namespace: submariner-operator +spec: + refreshInterval: 1h + secretStoreRef: + name: infisical + kind: ClusterSecretStore + target: + name: submariner-ipsec-psk + creationPolicy: Owner + template: + type: Opaque + data: + - secretKey: psk + remoteRef: + key: /submariner/SUBMARINER_IPSEC_PSK diff --git a/proxmox/manifests/vdeniske/bootstrap-secret.yaml b/proxmox/manifests/vdeniske/bootstrap-secret.yaml new file mode 100644 index 0000000..91d7413 --- /dev/null +++ b/proxmox/manifests/vdeniske/bootstrap-secret.yaml @@ -0,0 +1,29 @@ +apiVersion: external-secrets.io/v1 +kind: ExternalSecret +metadata: + name: vdeniske-cnpg-bootstrap + namespace: vdeniske +spec: + secretStoreRef: + name: infisical + kind: ClusterSecretStore + + target: + name: vdeniske-cnpg-bootstrap + creationPolicy: Owner + template: + engineVersion: v2 + type: kubernetes.io/basic-auth + data: + username: "{{ .dbUsername }}" + password: "{{ .dbPassword }}" + + data: + - secretKey: dbUsername + remoteRef: + key: /vdeniske/VDENISKE_DB_USERNAME + - secretKey: dbPassword + remoteRef: + key: /vdeniske/VDENISKE_DB_PASSWORD + + refreshInterval: 1h diff --git a/proxmox/manifests/vdeniske/vdeniske-backend-secrets.yaml b/proxmox/manifests/vdeniske/vdeniske-backend-secrets.yaml new file mode 100644 index 0000000..692927e --- /dev/null +++ b/proxmox/manifests/vdeniske/vdeniske-backend-secrets.yaml @@ -0,0 +1,33 @@ +apiVersion: external-secrets.io/v1 +kind: ExternalSecret +metadata: + name: vdeniske-backend-secrets + namespace: vdeniske +spec: + secretStoreRef: + name: infisical + kind: ClusterSecretStore + + target: + name: vdeniske-backend-secrets + creationPolicy: Owner + template: + engineVersion: v2 + type: Opaque + data: + TURNSTILE_SECRET_KEY: "{{ .turnstileSecretKey }}" + JWT_SECRET: "{{ .jwtSecret }}" + POSTGRES_URL: "{{ .postgresUri }}" + + data: + - secretKey: turnstileSecretKey + remoteRef: + key: /vdeniske/VDENISKE_TURNSTILE_SECRET_KEY + - secretKey: jwtSecret + remoteRef: + key: /vdeniske/VDENISKE_JWT_SECRET + - secretKey: postgresUri + remoteRef: + key: /vdeniske/VDENISKE_POSTGRES_URI + + refreshInterval: 1h diff --git a/proxmox/manifests/vdeniske/vdeniske-postgres-app.yaml b/proxmox/manifests/vdeniske/vdeniske-postgres-app.yaml new file mode 100644 index 0000000..8d38057 --- /dev/null +++ b/proxmox/manifests/vdeniske/vdeniske-postgres-app.yaml @@ -0,0 +1,25 @@ +apiVersion: external-secrets.io/v1 +kind: ExternalSecret +metadata: + name: vdeniske-postgres-app + namespace: vdeniske +spec: + secretStoreRef: + name: infisical + kind: ClusterSecretStore + + target: + name: vdeniske-postgres-app + creationPolicy: Owner + template: + engineVersion: v2 + type: Opaque + data: + uri: "{{ .postgresUri }}" + + data: + - secretKey: postgresUri + remoteRef: + key: /vdeniske/VDENISKE_POSTGRES_URI + + refreshInterval: 1h diff --git a/proxmox/manifests/victoria-metrics/cilium-agent.yaml b/proxmox/manifests/victoria-metrics/cilium-agent.yaml new file mode 100644 index 0000000..74bd471 --- /dev/null +++ b/proxmox/manifests/victoria-metrics/cilium-agent.yaml @@ -0,0 +1,20 @@ +apiVersion: operator.victoriametrics.com/v1beta1 +kind: VMPodScrape +metadata: + name: cilium-agent + namespace: kube-system +spec: + selector: + matchLabels: + k8s-app: cilium + + podMetricsEndpoints: + - port: prometheus + interval: 15s + scrapeTimeout: 10s + + relabelConfigs: + - action: replace + sourceLabels: + - __meta_kubernetes_pod_node_name + targetLabel: node diff --git a/proxmox/manifests/victoria-metrics/cilium-envoy.yaml b/proxmox/manifests/victoria-metrics/cilium-envoy.yaml new file mode 100644 index 0000000..54acc92 --- /dev/null +++ b/proxmox/manifests/victoria-metrics/cilium-envoy.yaml @@ -0,0 +1,20 @@ +apiVersion: operator.victoriametrics.com/v1beta1 +kind: VMPodScrape +metadata: + name: cilium-envoy + namespace: kube-system +spec: + selector: + matchLabels: + k8s-app: cilium-envoy + + podMetricsEndpoints: + - port: envoy-metrics + interval: 15s + scrapeTimeout: 10s + + relabelConfigs: + - action: replace + sourceLabels: + - __meta_kubernetes_pod_node_name + targetLabel: node diff --git a/proxmox/manifests/victoria-metrics/cilium-hubble-metrics.yaml b/proxmox/manifests/victoria-metrics/cilium-hubble-metrics.yaml new file mode 100644 index 0000000..27e2a75 --- /dev/null +++ b/proxmox/manifests/victoria-metrics/cilium-hubble-metrics.yaml @@ -0,0 +1,20 @@ +apiVersion: operator.victoriametrics.com/v1beta1 +kind: VMPodScrape +metadata: + name: hubble-metrics + namespace: kube-system +spec: + selector: + matchLabels: + k8s-app: cilium + + podMetricsEndpoints: + - port: hubble-metrics + interval: 15s + scrapeTimeout: 10s + + relabelConfigs: + - action: replace + sourceLabels: + - __meta_kubernetes_pod_node_name + targetLabel: node diff --git a/proxmox/manifests/victoria-metrics/cilium-operator.yaml b/proxmox/manifests/victoria-metrics/cilium-operator.yaml new file mode 100644 index 0000000..b1499d5 --- /dev/null +++ b/proxmox/manifests/victoria-metrics/cilium-operator.yaml @@ -0,0 +1,18 @@ +apiVersion: operator.victoriametrics.com/v1beta1 +kind: VMServiceScrape +metadata: + name: cilium-operator + namespace: kube-system +spec: + selector: + matchLabels: + io.cilium/app: operator + + namespaceSelector: + matchNames: + - kube-system + + endpoints: + - port: metrics + interval: 30s + scrapeTimeout: 10s diff --git a/proxmox/manifests/victoria-metrics/etcd.yaml b/proxmox/manifests/victoria-metrics/etcd.yaml new file mode 100644 index 0000000..ed49024 --- /dev/null +++ b/proxmox/manifests/victoria-metrics/etcd.yaml @@ -0,0 +1,29 @@ +apiVersion: operator.victoriametrics.com/v1beta1 +kind: VMStaticScrape +metadata: + name: talos-etcd + namespace: observability + labels: + app.kubernetes.io/instance: victoria-metrics-k8s-stack +spec: + jobName: kube-etcd + targetEndpoints: + - targets: + - 10.13.45.1:2379 + labels: + job: kube-etcd + component: etcd + scheme: https + tlsConfig: + insecureSkipVerify: true + ca: + secret: + name: etcd-certs + key: ca.crt + cert: + secret: + name: etcd-certs + key: client.crt + keySecret: + name: etcd-certs + key: client.key diff --git a/proxmox/manifests/victoria-metrics/vmagent.yaml b/proxmox/manifests/victoria-metrics/vmagent.yaml new file mode 100644 index 0000000..c7ff315 --- /dev/null +++ b/proxmox/manifests/victoria-metrics/vmagent.yaml @@ -0,0 +1,31 @@ +apiVersion: operator.victoriametrics.com/v1beta1 +kind: VMAgent +metadata: + name: main + namespace: observability +spec: + remoteWrite: + - url: http://vmsingle-main:8429/api/v1/write + + staticScrapeSelector: {} + staticScrapeNamespaceSelector: {} + + serviceScrapeSelector: {} + serviceScrapeNamespaceSelector: {} + + nodeScrapeSelector: {} + nodeScrapeNamespaceSelector: {} + + podScrapeSelector: {} + podScrapeNamespaceSelector: {} + + scrapeConfigSelector: {} + scrapeConfigNamespaceSelector: {} + + resources: + requests: + cpu: 20m + memory: 64Mi + limits: + cpu: 100m + memory: 256Mi diff --git a/proxmox/manifests/victoria-metrics/vmsingle.yaml b/proxmox/manifests/victoria-metrics/vmsingle.yaml new file mode 100644 index 0000000..531f90b --- /dev/null +++ b/proxmox/manifests/victoria-metrics/vmsingle.yaml @@ -0,0 +1,21 @@ +apiVersion: operator.victoriametrics.com/v1beta1 +kind: VMSingle +metadata: + name: main + namespace: observability +spec: + retentionPeriod: "30d" + + storage: + storageClassName: proxmox-hdd + resources: + requests: + storage: 64Gi + + resources: + requests: + cpu: 50m + memory: 128Mi + limits: + cpu: 100m + memory: 512Mi diff --git a/proxmox/manifests/wazuh/certificates.yaml b/proxmox/manifests/wazuh/certificates.yaml new file mode 100644 index 0000000..6e48866 --- /dev/null +++ b/proxmox/manifests/wazuh/certificates.yaml @@ -0,0 +1,95 @@ +apiVersion: external-secrets.io/v1 +kind: ExternalSecret +metadata: + name: indexer-certs + namespace: wazuh +spec: + refreshInterval: 1h + secretStoreRef: + name: infisical + kind: ClusterSecretStore + target: + name: indexer-certs + creationPolicy: Owner + template: + type: Opaque + data: + - secretKey: admin-key.pem + remoteRef: + key: /wazuh/INDEXER_ADMIN_KEY + - secretKey: admin.pem + remoteRef: + key: /wazuh/INDEXER_ADMIN_CERT + - secretKey: indexer-key.pem + remoteRef: + key: /wazuh/INDEXER_KEY + - secretKey: indexer.pem + remoteRef: + key: /wazuh/INDEXER_CERT + - secretKey: root-ca.pem + remoteRef: + key: /wazuh/ROOT_CA_CERT +--- +apiVersion: external-secrets.io/v1 +kind: ExternalSecret +metadata: + name: dashboard-certs + namespace: wazuh +spec: + refreshInterval: 1h + secretStoreRef: + name: infisical + kind: ClusterSecretStore + target: + name: dashboard-certs + creationPolicy: Owner + template: + type: Opaque + data: + - secretKey: dashboard-key.pem + remoteRef: + key: /wazuh/DASHBOARD_KEY + - secretKey: dashboard.pem + remoteRef: + key: /wazuh/DASHBOARD_CERT + - secretKey: root-ca.pem + remoteRef: + key: /wazuh/ROOT_CA_CERT +--- +apiVersion: external-secrets.io/v1 +kind: ExternalSecret +metadata: + name: manager-certs + namespace: wazuh +spec: + refreshInterval: 1h + secretStoreRef: + name: infisical + kind: ClusterSecretStore + target: + name: manager-certs + creationPolicy: Owner + template: + type: Opaque + data: + - secretKey: manager-key.pem + remoteRef: + key: /wazuh/MANAGER_KEY + - secretKey: manager.pem + remoteRef: + key: /wazuh/MANAGER_CERT + - secretKey: manager-remoted-key.pem + remoteRef: + key: /wazuh/MANAGER_REMOTED_KEY + - secretKey: manager-remoted.pem + remoteRef: + key: /wazuh/MANAGER_REMOTED_CERT + - secretKey: manager-apid-key.pem + remoteRef: + key: /wazuh/MANAGER_APID_KEY + - secretKey: manager-apid.pem + remoteRef: + key: /wazuh/MANAGER_APID_CERT + - secretKey: root-ca.pem + remoteRef: + key: /wazuh/ROOT_CA_CERT diff --git a/proxmox/manifests/wazuh/credentials.yaml b/proxmox/manifests/wazuh/credentials.yaml new file mode 100644 index 0000000..73f5416 --- /dev/null +++ b/proxmox/manifests/wazuh/credentials.yaml @@ -0,0 +1,91 @@ +apiVersion: external-secrets.io/v1 +kind: ExternalSecret +metadata: + name: indexer-credentials + namespace: wazuh +spec: + refreshInterval: 1h + secretStoreRef: + name: infisical + kind: ClusterSecretStore + target: + name: indexer-credentials + creationPolicy: Owner + template: + type: Opaque + metadata: + labels: + app.kubernetes.io/component: credentials + data: + - secretKey: wazuh-credentials + remoteRef: + key: /wazuh/INDEXER_CREDENTIALS +--- +apiVersion: external-secrets.io/v1 +kind: ExternalSecret +metadata: + name: manager-credentials + namespace: wazuh +spec: + refreshInterval: 1h + secretStoreRef: + name: infisical + kind: ClusterSecretStore + target: + name: manager-credentials + creationPolicy: Owner + template: + type: Opaque + metadata: + labels: + app.kubernetes.io/component: credentials + data: + - secretKey: wazuh-credentials + remoteRef: + key: /wazuh/MANAGER_CREDENTIALS +--- +apiVersion: external-secrets.io/v1 +kind: ExternalSecret +metadata: + name: dashboard-credentials + namespace: wazuh +spec: + refreshInterval: 1h + secretStoreRef: + name: infisical + kind: ClusterSecretStore + target: + name: dashboard-credentials + creationPolicy: Owner + template: + type: Opaque + metadata: + labels: + app.kubernetes.io/component: credentials + data: + - secretKey: wazuh-credentials + remoteRef: + key: /wazuh/DASHBOARD_CREDENTIALS +--- +apiVersion: external-secrets.io/v1 +kind: ExternalSecret +metadata: + name: wazuh-cluster-key + namespace: wazuh +spec: + refreshInterval: 1h + secretStoreRef: + name: infisical + kind: ClusterSecretStore + target: + name: wazuh-cluster-key + creationPolicy: Owner + template: + type: Opaque + metadata: + labels: + app.kubernetes.io/component: credentials + data: + - secretKey: key + remoteRef: + key: /wazuh/CLUSTER_KEY diff --git a/proxmox/manifests/wazuh/namespace.yaml b/proxmox/manifests/wazuh/namespace.yaml new file mode 100644 index 0000000..4a9c7fb --- /dev/null +++ b/proxmox/manifests/wazuh/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: wazuh diff --git a/proxmox/talos/README.md b/proxmox/talos/README.md new file mode 100644 index 0000000..4b68d4d --- /dev/null +++ b/proxmox/talos/README.md @@ -0,0 +1,49 @@ +# Taloslinux Configurations + +## Image configuration + +```yaml +customization: + systemExtensions: + officialExtensions: + - siderolabs/amd-ucode + - siderolabs/amdgpu + - siderolabs/ctr + - siderolabs/nonfree-kmod-nvidia-production + - siderolabs/qemu-guest-agent +``` + +## Cheatsheet + +```bash +talosctl gen secrets -o secrets.yaml --talos-version v1.12.0 --force + +talosctl gen config cluster https://10.13.45.1:6443 \ + -o talosconfig --output-types talosconfig \ + --talos-version v1.12.0 \ + --with-secrets secrets.yaml --force + +talosctl gen config cluster https://10.13.45.1:6443 \ + --kubernetes-version 1.36.2 --talos-version 1.13 \ + -o rendered/cp-01.yaml --output-types controlplane \ + --additional-sans k8s.lan,k8s.itqdev.xyz --with-cluster-discovery --with-docs --with-examples \ + --with-secrets secrets.yaml \ + --config-patch @patches/allow-controlplane-workloads.yaml \ + --config-patch @patches/disable-cni-and-kubeproxy.yaml \ + --config-patch @patches/enable-user-namespaces.yaml \ + --config-patch @patches/custom-image.yaml \ + --config-patch @patches/namespaces.yaml \ + --config-patch @patches/pod-security.yaml \ + --config-patch @patches/kubeapi-optimization.yaml \ + --config-patch @patches/services-bind-fix.yaml \ + --config-patch @patches/control-plane-limits.yaml \ + --config-patch @patches/k8s-talos-api-access.yaml \ + --config-patch @patches/disable-auditd.yaml \ + --config-patch @patches/subnets.yaml \ + --config-patch @patches/registry-mirrors.yaml \ + --config-patch @patches/sysctls.yaml \ + --config-patch @nodes/cp-01.yaml \ + --force + +talosctl apply-config -n 10.13.10.164 -f rendered/cp-01.yaml --insecure -m auto +``` diff --git a/proxmox/talos/nodes/cp-01.yaml b/proxmox/talos/nodes/cp-01.yaml new file mode 100644 index 0000000..58823eb --- /dev/null +++ b/proxmox/talos/nodes/cp-01.yaml @@ -0,0 +1,17 @@ +machine: + network: + interfaces: + - interface: ens18 + addresses: + - 10.13.45.1/16 + routes: + - network: 0.0.0.0/0 + gateway: 10.13.0.1 + + install: + disk: /dev/sda +--- +apiVersion: v1alpha1 +kind: HostnameConfig +auto: off +hostname: cp-01.k8s.internal.itqdev.xyz diff --git a/proxmox/talos/nodes/worker-01.yaml b/proxmox/talos/nodes/worker-01.yaml new file mode 100644 index 0000000..e69de29 diff --git a/proxmox/talos/patches/allow-controlplane-workloads.yaml b/proxmox/talos/patches/allow-controlplane-workloads.yaml new file mode 100644 index 0000000..78ee123 --- /dev/null +++ b/proxmox/talos/patches/allow-controlplane-workloads.yaml @@ -0,0 +1,2 @@ +cluster: + allowSchedulingOnControlPlanes: true diff --git a/proxmox/talos/patches/control-plane-limits.yaml b/proxmox/talos/patches/control-plane-limits.yaml new file mode 100644 index 0000000..60e9cba --- /dev/null +++ b/proxmox/talos/patches/control-plane-limits.yaml @@ -0,0 +1,33 @@ +cluster: + apiServer: + resources: + requests: + cpu: 250m + memory: 1Gi + limits: + cpu: 1000m + memory: 1Gi + controllerManager: + resources: + requests: + cpu: 100m + memory: 256Mi + limits: + cpu: 100m + memory: 256Mi + scheduler: + resources: + requests: + cpu: 500m + memory: 64Mi + limits: + cpu: 500m + memory: 64Mi + # coreDNS: + # resources: + # requests: + # cpu: 25m + # memory: 32Mi + # limits: + # cpu: 25m + # memory: 32Mi diff --git a/proxmox/talos/patches/custom-image.yaml b/proxmox/talos/patches/custom-image.yaml new file mode 100644 index 0000000..17e15cb --- /dev/null +++ b/proxmox/talos/patches/custom-image.yaml @@ -0,0 +1,3 @@ +machine: + install: + image: factory.talos.dev/installer/b6345a027254c5238c8e170d5d8e103f77fdd9b0857db9723ec9fc123e91d33f:v1.13.7 diff --git a/proxmox/talos/patches/disable-auditd.yaml b/proxmox/talos/patches/disable-auditd.yaml new file mode 100644 index 0000000..62fbce9 --- /dev/null +++ b/proxmox/talos/patches/disable-auditd.yaml @@ -0,0 +1,4 @@ +machine: + install: + extraKernelArgs: + - talos.auditd.disabled=1 diff --git a/proxmox/talos/patches/disable-cni-and-kubeproxy.yaml b/proxmox/talos/patches/disable-cni-and-kubeproxy.yaml new file mode 100644 index 0000000..2b7b65d --- /dev/null +++ b/proxmox/talos/patches/disable-cni-and-kubeproxy.yaml @@ -0,0 +1,6 @@ +cluster: + network: + cni: + name: none + proxy: + disabled: true diff --git a/proxmox/talos/patches/enable-user-namespaces.yaml b/proxmox/talos/patches/enable-user-namespaces.yaml new file mode 100644 index 0000000..c4c9adb --- /dev/null +++ b/proxmox/talos/patches/enable-user-namespaces.yaml @@ -0,0 +1,7 @@ +machine: + sysctls: + user.max_user_namespaces: "11255" + #kubelet: + # extraConfig: + # featureGates: + # UserNamespacesSupport: true diff --git a/proxmox/talos/patches/k8s-talos-api-access.yaml b/proxmox/talos/patches/k8s-talos-api-access.yaml new file mode 100644 index 0000000..b68e1ae --- /dev/null +++ b/proxmox/talos/patches/k8s-talos-api-access.yaml @@ -0,0 +1,8 @@ +machine: + features: + kubernetesTalosAPIAccess: + enabled: true + allowedRoles: + - os:etcd:backup + allowedKubernetesNamespaces: + - backup-system diff --git a/proxmox/talos/patches/kubeapi-optimization.yaml b/proxmox/talos/patches/kubeapi-optimization.yaml new file mode 100644 index 0000000..750debd --- /dev/null +++ b/proxmox/talos/patches/kubeapi-optimization.yaml @@ -0,0 +1,21 @@ +cluster: + apiServer: + extraArgs: + event-ttl: "15m" + default-not-ready-toleration-seconds: "20" + default-unreachable-toleration-seconds: "20" + + default-watch-cache-size: "50" + enable-aggregator-routing: "true" + watch-cache: "false" + + etcd-compaction-interval: "2m" + etcd-count-metric-poll-period: "1m" + storage-backend: "etcd3" + livez-grace-period: "30s" + shutdown-delay-duration: "15s" + request-timeout: "1m" + + enable-priority-and-fairness: "false" + profiling: "false" + authentication-token-webhook-cache-ttl: "30s" diff --git a/proxmox/talos/patches/namespaces.yaml b/proxmox/talos/patches/namespaces.yaml new file mode 100644 index 0000000..76c4d22 --- /dev/null +++ b/proxmox/talos/patches/namespaces.yaml @@ -0,0 +1,38 @@ +cluster: + inlineManifests: + - name: argocd-ns + contents: |- + apiVersion: v1 + kind: Namespace + metadata: + name: argocd + - name: metallb-system-ns + contents: |- + apiVersion: v1 + kind: Namespace + metadata: + name: metallb-system + - name: proxmox-csi-plugin-ns + contents: |- + apiVersion: v1 + kind: Namespace + metadata: + name: proxmox-csi-plugin + - name: gitlab-runner-ns + contents: |- + apiVersion: v1 + kind: Namespace + metadata: + name: gitlab-runner + - name: observability-ns + contents: |- + apiVersion: v1 + kind: Namespace + metadata: + name: observability + - name: backup-system-ns + contents: |- + apiVersion: v1 + kind: Namespace + metadata: + name: backup-system diff --git a/proxmox/talos/patches/pod-security.yaml b/proxmox/talos/patches/pod-security.yaml new file mode 100644 index 0000000..2137de5 --- /dev/null +++ b/proxmox/talos/patches/pod-security.yaml @@ -0,0 +1,22 @@ +cluster: + apiServer: + admissionControl: + - name: PodSecurity + configuration: + apiVersion: pod-security.admission.config.k8s.io/v1alpha1 + defaults: + audit: restricted + audit-version: latest + enforce: baseline + enforce-version: latest + warn: restricted + warn-version: latest + exemptions: + namespaces: + - falco + - proxmox-csi-plugin + - gitlab-runner + - submariner-operator + runtimeClasses: [] + usernames: [] + kind: PodSecurityConfiguration diff --git a/proxmox/talos/patches/registry-mirrors.yaml b/proxmox/talos/patches/registry-mirrors.yaml new file mode 100644 index 0000000..7581833 --- /dev/null +++ b/proxmox/talos/patches/registry-mirrors.yaml @@ -0,0 +1,6 @@ +machine: + registries: + mirrors: + docker.io: + endpoints: + - https://dockerhub.timeweb.cloud diff --git a/proxmox/talos/patches/services-bind-fix.yaml b/proxmox/talos/patches/services-bind-fix.yaml new file mode 100644 index 0000000..26d42fe --- /dev/null +++ b/proxmox/talos/patches/services-bind-fix.yaml @@ -0,0 +1,10 @@ +cluster: + etcd: + extraArgs: + listen-metrics-urls: http://0.0.0.0:10003 + controllerManager: + extraArgs: + bind-address: 0.0.0.0 + scheduler: + extraArgs: + bind-address: 0.0.0.0 diff --git a/proxmox/talos/patches/subnets.yaml b/proxmox/talos/patches/subnets.yaml new file mode 100644 index 0000000..f3be68b --- /dev/null +++ b/proxmox/talos/patches/subnets.yaml @@ -0,0 +1,6 @@ +cluster: + network: + podSubnets: + - 10.244.0.0/16 + serviceSubnets: + - 10.245.0.0/16 diff --git a/proxmox/talos/patches/sysctls.yaml b/proxmox/talos/patches/sysctls.yaml new file mode 100644 index 0000000..056387d --- /dev/null +++ b/proxmox/talos/patches/sysctls.yaml @@ -0,0 +1,3 @@ +machine: + sysctls: + vm.max_map_count: "262144" diff --git a/proxmox/talos/secrets.yaml b/proxmox/talos/secrets.yaml new file mode 100644 index 0000000..c0c7e35 --- /dev/null +++ b/proxmox/talos/secrets.yaml @@ -0,0 +1,41 @@ +cluster: + id: ENC[AES256_GCM,data:f0I3Kd5H6oa6bksYucXKFHj8QnWSBKpd/lk66HA9PsMBys+lZ/rZYDqym7g=,iv:QQMgP65AQv66cTzqf/6iuemX6hoLxhBoap7J49fj/is=,tag:59cAyydS+dVgZNbk70SXPw==,type:str] + secret: ENC[AES256_GCM,data:2FjJYkM6N9hICHL5u73AT7EcsIDkTAvdL4paZ/UMqAYFrErQ6+EP+BhDDSQ=,iv:jv2yNHTtmVCu/b+rjzRH0IcpitWWUmJ/B6LWs0im94o=,tag:jvrzUUlCqWBrzbet3OrX3A==,type:str] +secrets: + bootstraptoken: ENC[AES256_GCM,data:q38ikcCkljb7/OSlxDeWpRBDuIag/1M=,iv:Q8xqu6HoeQLb7/Os3uloXvH63kf/ip5kqPsWCIblBI0=,tag:Z84KD0GxMmOmIEN4rUufvw==,type:str] + secretboxencryptionsecret: ENC[AES256_GCM,data:2s1Z75Djk047IJBkdRQHPrDYmsV4sAtRXjt7prjmUqjt+8to7U5hrUkRas8=,iv:73K4mjJ2lFZpVZwLc9hT7GTM9LXzYMqtcDOrDwZlNLA=,tag:hvbbegd91sZ5tNRdL/1giA==,type:str] +trustdinfo: + token: ENC[AES256_GCM,data:wDpPCXIEk6gmIRrAy2ubXO8luh/t8KQ=,iv:pUZ73HXicGL9il39MJaSenQ243rqcWJiJc5zSHLEZQU=,tag:tCtJXNdaAFNDvuxW9iGLZw==,type:str] +certs: + etcd: + crt: ENC[AES256_GCM,data:MUXT6yrGEBWqaJeiQtoNETTXzugVXZjE8iNeV07OEwVXUAcYpBLad3EcojcxB/RwBam1WRcxOLDhVdlYjM4IGIUb+Hv4ni6ovmf/Fsy8xkhPZIrhSjPNhmTKSc58yyiQkPqPcdq8CrAuKlu4k8/CY91wVruGFUstQ0nJ7imRgGQYIiFEQG3gPTLyO71YHeakyF3dKT0jIVsJ7/YktD3GyOCN2hr0jJ733kVB0hEXSHxuvrWe+h7gK2DARayUJtxWrgZ8i6Yr6fpAmxJKAgOfya//6pCQ0o3a3EHytHlpulajM3/7rDEQrZZV1V9YbkN3x5THpOlVlJCeAfvho6KLb/7JBUnitYJLwrD7wJGsAEvYDm0qpmWvKUktRMnZ8O1DTbAxM0G/jQ8htpnwJBQ1LT3cTen7INdQfrvzJogNmvXR9ZcO5oqCvV7i3VwpB/czlg5NCCXnzGaU+A6sWJHDXPSUxxAzmUVvU3xAsAw/gy4nFSxwsPZ00eJve1IDKEGPDl1t3bNh+If2V/UlhzAHuC9btufd5mH3M1CQrcDsONzGhMcgjTMq2i/0pR4hqEn3PN7mxrhEm8YP3PShM7Rj99CbKs5M/y9ENHWBch5lGpQ2zCYsZFLOkBWltm0Rn+ncWRBCqR6SM9OhU6vWL6FSGS67EcXUf8KzMalnZOztMXrVuEha4dYL3B7W7bTrdy0YY8mizHv819IZjOHmgMdlr1AnE9qsZj8L3l7Iwa9+q/2ic6noRJmO81BD45WwmPclSDhHbAPt9vY6FAjjfEs8Iee8J9Rod0JDD7afS9kckZtbcYqF+IVQ+AfF6R3dOXMszPOk9tEQ0kWHVWMSKoV+9h96swT/y1oBaD/fMwOY1uuadPdo6ipEUlv7m5fi+0Kwih6KHfibRyhuFz26j+XcaW6xk+4rzczBZxuLLwRIHS+8uSreEwRiCMEuGCcVkgvo7wfkEQFQ87rIAisRqXGXqFgN3rR+R9fMcM87SwnQIHpR0mzWERyhSES6qxxGSGJZ0Z5bAQ==,iv:oTIn3QPBrkqMRclVeYAgOLEFy4RRgXmGkefD+MQBfko=,tag:xVLpC875L17Y9k9kU6xVPA==,type:str] + key: ENC[AES256_GCM,data:u6P3i2PstEHK61YNKBxjWsKutaUBPh4h7N/HU7RjeMJ6He+HhG7Pv3m+djuWRuwobkimXT7a2hygzLi7GBfKowpSBlQJY6kNvM88r48GqwQLNs0h5G9VKzMVIAFhE+HqlcLrJrKy38M9s+09TcfKCBStYUkCwXu1broyPgj7o0z0xX+j10V4dP8hGvNQh1bvULsOAL6ce0umWCNcYoiUQEp1h1YI6ketWfoubFyr0xSRxl8mRfmg/YPy/UKkKWjbDKHcVQQVE47drivOhPtOE6Or4za4NU59AQHFeOvQmIvjbjhLdYwUMQzqOw+e1Z8LSzGLxMqNquHOFAX7I91NV8fbO5NqaGfNt+2pVp7OsPRm67nhdoEjrKxvA7KPXLo8/cYn8mLW0tB5u19OglnknA==,iv:Bdq6Z4J3TCmvA5leaCDVuIc7ZospsdlBShpSppt8GYw=,tag:adG31IJ7JTkptqBNbRBAQw==,type:str] + k8s: + crt: ENC[AES256_GCM,data:e4uzuiTCUlmsmbP75CcGotcD9VPQZM4Ht+oPHZfvmaZNJoiFI+ugBuswDAVoaS26eHuxWNNzm8vKW8Ksy1kmXbioxxREQAGi5Em1oD/jS/jLeAM7jBIvSQ3W4X4MJHCxo/3rs/UnCgwyxi95haQh3M2XcpipbI8iBdOJxkddL60tSCyI6xv0DoG2DvDoEGP3pZgioivlwQkaq1FOR/9mvhzsKlJN7lYWfEwwyvSBZlUKo/WArcP0G3W/HEJtuBcQq4YpAKCvckgdWgFHjUlj7kFa19PbjqdjAcSWH7ODWQbu6li1yhWV7SsBjEuHfvej5q4y2SPjrRnRJDWxiv9e4Xt74vey9cH1cGFFwUq5F9ZqBesP29/u7Xd0+9LJdA8OU++uSmmJWZHJ6XsK3D7QJUhVDqIULV+CdFu9gVwor0qJd0ORkVBcWZK2BVOKeBQAamldrI5nET71bEZAZr3nvlEQkY2BdXJ8rmXjxIKqFcpCExVKrmxdAhc8BSdXVvYNTz/Ph5BSWVZUXXG3VltHUZ19urK9Sd2GuC8rtjswVjzq2Ym5vxn9Kj9dVcwApY3E5ZX9F6UdxQx8iqWeKg5eyyzMbTfaT2Z0gwW0DYnNmivK5nuQ3plL2qzk6F1ENtSaBrMhNKPZAQ4YKh+oW3EUrIZkNnaZycMueBzrH0E3aihwqXpnbzOmClbj4KsFHBHkPvvv4L8IOEz+z/YxlwDzepq02KZL3JeZsOhIlQiusmZ+4gkEXTKW29Mv5bp7Oc+635ztTHttf8B1yaVe8ygWpdvzaKtA3l2L9+DdKPNQXDJgjwQXRlxTQW54U7ik9WVi799l5Jd45hnGL7dJi7aVp6hEz0/94SvLKKNuDymTrGZUzaxzUOE+vfMjKRHy+ZziO3tU0N3fLf0gaTkbzdSNSbgr46BjtV/eVnImrLujFkqFZJB3Bk4otMso6da1QEj8/LULPpYs6YBBRMeu12/oIliChy2xiUzFOKsD1KYE5fAyfvR25tK+r5a/5vbdngjQR4lzF6BchtjD94bujERNSX+Ii4Q=,iv:FVP+HecPV+I0on3bEp9fGxVsvlikc0owL65SlW42RkU=,tag:RqSJ3Qp70767zRQO7mZmYg==,type:str] + key: ENC[AES256_GCM,data:j6t2b1S7qS4gRMxc1X/KlaCVL56jLNY8uo9vTePl1nuymsEWYZc/S6h0VQ6MrJLs0gQ+//ksIPOvDX1fQjWO0knKI3yfVZ6ZG3K59+qKQlnHM+3Z8C5jiHoWf/trvWzyHRmKvw3EY6ZqAjJHUXyCceWojBkTiaeNVgw7f+rnNgApvzyFoNNXJVC841g24BARgSElHtg3yctM4NT7YfSK6w/NM/dAaINK3lnN4Tam8PTZ+RxzxquLXRqibEJx741QK1FjzKtV1q9c7+hiZubqM7UH/0cQ2JJSw7ba70b5bFSKVSx/bwJsMEARYBvrdgo9tosMppqRFdcVvxipAtavHXGUsK71oz8yi7G7ccW/nBIR9Z5hud+od+s66fxWxXeBJ3fOW2r/qA4rzIAxfwjb0Q==,iv:TpSoeyahm5WvUVA8L6L/V/nvk4pBort5F1XLmWcbW/8=,tag:3WbMRQhc/YZjv6ScAy/+oA==,type:str] + k8saggregator: + crt: ENC[AES256_GCM,data:bJt4xGqKvC30neErou7M3APHj5j+VjDM4dfmW7UPRFIdlGAq994g/SArSLseZR75sjhCgeBiM1Lblgxrsnr7Y6YqgNyRmYyCTFvkqdeTjY4E+kIU+uj9IFGxqSEXW9euhGrQpPYaK6nljTYuWqqiN3/eTURTmpYe0TZVXGEOWMkV0Dj3DTWL1AXxsZBIv3bkdiz23kt18M9PFrXnMWOGtLR56KU75hx9HWDk2ezYLJ/tAUBLRDIGuoCXljGqqFH7QQFmEG4XC6zEh2Ff/00YkjkuvsMzxHXFUuL24GYP5teHv4517MPtUFDf26Q7V8gw/hwux80E8jkydpv8s3nkg4TwnV8ip0QxL4D5/5shn5f491EyfwmD04duis5eG4/MUpDBMH7z3uebsaWd4yJd9KoPHKBAGGnvB/VLYtQH0cI9F0H6M+G+hitUiKkfcb0zgOV2yxegm9rbGDZfWnQK4dRuYRhxULNrNbo29zEgDRUWFt001Q4klNiaGHezJ9N8r0uR+v7zxJYCMtLHpVqhGLny5iCYESZ7ZG+Fg8/IhmjP2GDZWfkPAAG8Jzy4QWGM656ZpwrDLnyiZCuBZ1lBjY87EFka60wDT8tsRxp3MRTcwwO9elBJnW5Z3n0J6vxJ7vz9VcmnhGb8UFm7bAq60NsfWXKDmLiYTbDQFvF7/b1e8EM9JQg/rLeyiKa0/RVUuuz4lvqRxPnUvrTYfRDwpTawE/Gd7ieDcQZVQeApl7wodvCopOWs0NfwwexR1qRebYkTceGTyBp0hzFsTmByMgekkLd5ePh1g3eOTuUmnBm05TcuW7Y227GL7CUpPR8nNgMjp1T79LH+Eo9YrHNAyP2vonf510Zz5XSbLdHJeXAalVyl+PqTZhkR+5OM0FjOq1No8RNVQ53r1fXVuid3w/DNxj80yXhe9QufoQFGBLf9Qw+dkxy5PRme48jUY/Pd,iv:7B4Rpvd6hiF3a1dBfulrnzYeZHSrxi29Se8+VWaNmyU=,tag:Mo2zqdzK4op1ZzV3OdPgNQ==,type:str] + key: ENC[AES256_GCM,data:Y3Lx9zZTyG0afBArxDVctZ7nv+II3Zw+1QQuRMezvXdkCx2ynfLSe2qndqmK4qeXMp7PvhhFYTJUeip6tZge08VuLbHSeLdqAAK3sYX50iho2Hy4SI+ztGSg1Str4I1h18vhBPjWYpz5ZsY3T/psEPrXUfxW9ZlTx8mcIzDe+TyzGVSWhCjHMuDFhftwYMzbMdj4Bfbg5sHOmdEDPc4ijT0VLtIe36p2cC024X1hmbQz9uM1qbN0T1cVjI7HixUnHg/QNaLqQTE7NWlhh/nxApj6govtqUxdD/wwyRsOtry015tSk0E0cSN0/DDIuOn1w/st+FtFVVpAVltcpzKPTnLfNWI+hsYeWYYKmrkDwuHQub/c5HWTGYdg3inCMc1PNmBN/oL2EQ/KXdEvl/benw==,iv:SHyw4OWv/xUemRygKg4lsBzV6whjaI6QOo7RAnlvI6U=,tag:53zpW7mQ6kEUeikcOPSHJg==,type:str] + k8sserviceaccount: + key: ENC[AES256_GCM,data:zFggWwVrer7jEkjkJOLweHjH3l+KimzEpWfa8NOPN1yBF02ePu7LK7cd+CkFWOsYtjaUkEGy8PosZZgzn6kF/dm/6AeuEPKYpqUTfOMPU6tp4hI0U++LDdKUBrt3VXFYCpusRELBj5et81li6xqsIaFnhlIAThlvHUeFPdXr7b2TMXFp1holhxawcpLG5MppwlZn+VGxy2d581b/T1dnMQQexhouEe62/B1yOl5rgz8w3wJdkk2idC7WoCEKOnNyxUbrQ//YQTWPMx8VMldFnsdLKK4/BmW37Fi88zPzKfM+HHN0pb2x45J+qQIdLXHK73OblKyfBfleq3UP/dBAeFP6VXmpbfsmdfjraHh7Ab19lBrNlVnVYm2UY9TiodXrTxqW9Yhs16T9P56DrKVv4wAW4OWTqNTcVfdAi+mXhPuSGGTXYqWdBQ3pPzE/8trYg7juufiNxDSU75BXEkfgFsQ36+3ao1R/UewwztPPdpsfp8YiV/bp3mduUXuk1RZwNDiYGlCIy7YNr0fKy2O3twav102FeFQ2q71/SUr27EZn6dPeq39vpba7AY875MebzapGN2zAwQ6Gpc0k/I8K1Y/iKl2mC5pEu33fzoLfRGkGRBDNWW518sSMjzELu9/ifLExhFpIjJc6PAS5ue7iKqV1cNiQscgIABaMF+UK9kPfWlAugvkS7ECApveSjGkkUUjg72dRcuIQujOmI+BAScPDIySPDgMhelvBHURDCvjKDkapq+yEaWqPWGryqTdEGwLpYENJsB/s/RkO/l3nfCS0of5ajuXPzwoJh4vYwvNO7dAMmaFWozadjcJkTBcHIIEr0L6y0vK7b/QWCllfrW/mdYgjwJLSTZy0bDZCN44D4LVHRDN+/aBSXk5x9VTXuiNjwK902XlUAWWsMUwm5Hdm55Ckl4ku4ZKK+yO2xHvnyQQnD4KGZ0mpeHqqaC0J1WXjWAdRdlapWTNMsYQkWWq7si0dJJoJMYW6t+FHHPbfdshDLG7/CbPftUX3hVH1dIIFWaOesL5K662eFxRYNnCkyDmHGqj5WDvhyQLG2FTvGIlXRdehTnGhHhLytpnii/pmKHg+o1UC7WRPsBRTf/1MwM+QVVprPxpTapdGQDVGE9cHNI1CHphcOgWZuaxBQjEacWXsIcoOxwWNA0D7YIpGwPdU4tHvPGdB69j6PFXwImJTa1DIlUer4bfYkVYwwfWnPd4HQIfP9iK7jsm4YI43jSsCRiBG8xwlH8aXwRxTRs5YdHijYpQfsruCgVCmORkKklGCIHkQP5eYj5rWp+PaWtG5WOYuPi0Ec90aquFR+IKx51Uvc9ZsbXuVSKFuCsaiiPzj35w8l7oG35Qi1tXHjQ/Dkxpj+EJPnSnVfNuip+u9fqLYMRCBRIkh1FgdkpYdIpLVGL8KcliVRCt4AnBnKpVbTYU0EnvG3RItRPcVu7l9E1+LH4QJJPfvPpB45rPkvntSCHguGCSYQDqYdwGb4mZ07f7YunqyckDID98S7YPgNPqx4kh+H/u5snrLgieUMRlOqdVXaXgdbDUHyul62l905Fc95a4j2BVoxfAwNY9f317cdLXWS3EtzdWq6QmclWPkb8i7F+nbQWfbosVcum9tcIoyMX+o7BGVI+lvGrYEP1iiCVe2xwaae+luDRFJWi/evNLTLraeGHiRCLRTB1yipT5bkZd2qI0Pn5wLkuNJp8cN0hokgdREqQkxvWG1SgH1fnW1VNic1yzyq3Lp0BkwRZ7vJfn/KBSB43kSI0tZKmFhA2IZcBwOyb1JjvSGwIAe5oqSNxEP9I7OUiEx1LIqVNrro23hOyWQjJg/H2LpVxkIGUzvRg3pOSnZGGmdNXZX0jiKcbR+LkqsGFg/MylD94XsAFjhGjcymPgLpeIoQcjbkYOJCSNgm136Hr4m16CBETFEOIsJgIZXo2Jf64td8KcasDe8NTnvSP3Ce+6fTW0+bflSnuoJ8TQzh+ouJsmAT6nhAZ0D9lChDEln23ZwF17/67DhV5ZqTFP7WHJ9D0Nve3ELrqx3wYaf2NJuwWvzPnqdEFsTOVSWKikHOuhPDH90e7BLJW2Wr+EvGaNT4YWkRH0PbrAtHVdTjE6su1WtQVoY5noq+4Q8MkFRQ+IfvA1PeWMRvOynTZAWAnNB6t6NtEVeNG/Bx4MSE7774SEq6JkH7cKhiidv0HDpO2CDIrUYB6IG0L9tB9Q1eMXsNwzE6WP4RR+kzQdxYmD9hRk/wiJ9i8vz3MDbguI5SkTF2pi7mPTzAsNO+2ztw+XAJYjWlZ2mpwviQENbpYNF0aqaw8bIdzvOg3LSn9ojr6bqGf3hWVvB0kkQ/IB+JXqbTEzMp3JJrgdXy31YfZ42+gfyEgzl5vEsL/LsVQ+TnNsbVsdSgsn5iyrsvz0Ko5H+fwdTkyNvKno2w7AWBxl5J6o3J4TpbBJ96IacSiNKMQxZPxChfzgsat0wbdUey4StEo+bq7rcJCCSqJKgvDbr9XLO5mWKzj0NDWFuCYzSNCk7OTQWa8xovfDg/EEfTxwSipszv0rcRL3gihMtH40VuGSE5mnkWzThDeuI5Wq0StV0xKazeT8Vr7nFkhdz56vPHiSE6zxYhhq3XYNAQVcC4rH7GA27B9CWr7Ex08NBHehqIYos0tVsJRt9vUUIVh3eFfLkiTsIpwpcPku2iNMYVcgImScISBORO2mP4PGBNB8TBFVJP88RuSTE5aJO+3AbobrYNBa7Pantz5y0IAPw7oREi9PQFC8ZJLQ4gHpZ/HN3ZKKMwKKYXVcPadSDMB+1F3i6l4NpQ+v5sWIofj/s92SimgkZk5Q5Qv/6LBfWRjqk2iv5vMOZt9SEudsRpvzr/od67tBZtb+HmDvFCeXkdQfKe4iGknayrmN6hRNLq11P4tsUnSBTJrs9cHY/4zf+LTx1r4KkMBP2VgkFIbdRBCx6Tx6W7tzx9whxa3ykBiEnyXe7Covo/4leB0A0oQ5zYuMtGl9tK+yLX3SkI+FLxO0kuBju1VF18fgHgClgnxLCSPtZmn2G1Hi3vyfzsikGlxiOVljU/UE1Gd13sMwcTtZwxNuf5RxGvxJw5y6+ArBUHHwXPEbtvP9CtWxJIwcKOTYMqY0CVAiqGfQ2DbUYLwHJBmc1anUDUT0XemCCHPDESFOIr/H7LGp5rDuvxIxqCmzsfawpNYRsj/TqmMjzqKz+Vio+xw+cJ2nTDez/+vQJuY3er33FVBR/d5a2gRo7shb6RmAoYHxCVUYoXHBHFshIpwyDYdZfPHSBMPfo9Orbpo52iEkTMLp9Y/Otpt968AGcVzhVfZGrkEfcU5m6waQSM9GtW9yxbllvFfoYdTFp6tCo74qVEVJf8LIWXPf8+OEkPv7UYthH9M04aZh0fywUeKXkd1z3yWGBxYvxldmOVSvOe4IkvuqZ5ai8ZmqDnfCrA8/rDjRmU7v2FOJgb0jAjtTqCk0d1JD+YvbkyySSvdz0+Vj+DZKQqiQzh+28GHIkkgF6HaUwYI+OeV7JA15TkgOKaTCDQU66ThcGTRt7pf7ruzVAqSMtQ85BNqSNtVCRSyctmf13ZTabjQnXBXXw6+NGtctdlBICq9m78e+Qe+0vZSqKJ5JfWArusphcjSB3EjPIPNULxCy8fkHUiaMff6Mspqmcde4B8vlB1wreCMH3aMBTFkhABgUrHvyNoOuelCQBJhXUVX+ZpH20KMsymSCee11zUGdalm55vWwoIPopH3rlN+RtosfrroxFqgofuhNVyr3/QYmLRMPWuDQJtxf3WpYjqgBXOpls4goZ0Y9Y5RkY/v7JG3uMa3JI0P6A5iZ3xN7xhdfZngxlzDW7U2PEniIAqyVs/eXlasdSix/BUI1QrwaO0Zbe3PrcPt8w2FQMmC6H0nl0Tw6OzUf8fjItKOv85Yy8S/W25h3NcUEj2elubrlDENiC1gpbqvHwpK7TSa/Ga4daS9FGhBpqsZLgs2bdHZQQ3dXm1uJR4lrzSuyQhTbg4D9cP3M9GgqU5Ttyn05WyfEDp0Kvw2MbAq8cffYhEJjFuY+dV0AmXG+pCxXThUD9FmYF8FKRCzvR/raj9pJ5pt2kHUEIe04MSAbF9lc3Kpwo4SBwmu8goJo41Hc1f6F3AokCnry4a1tM4CEXXmP13+k7X6HXFYo4LY116Lc8G26VWfuPjXKxcIgzUmISTo64epDvEwuS6oNl+QJiheLtg5pis3DWUC3TcyxwG50wsmi0ynmVBfHcko7s33kIc4KbnO0G53tJZAYysunLdv888AYc87WIK7h6Wkkt+VECUWYiHPWVSzOWA+WSvkCKLf6LvmUzFUdUwxmLjF2NgMmTlTTAurVOWeNBJI5zk6qqAQrFtuUTAvBhZOQ1sXFGWy2sJARP42tZCyvrVIbD+G8zV1BPZZGYFVAqCONRCak0HkxmQfQ0UNcUNGzbrvhPn7hELHx6QPy3naagEvyL7iGwvr6GZasdfZL4F0rTNlwKBxjeAnlsx089CkpxqyXfcA3VE2PhLK7yEiXtUOsl763dysUBDKFTUpaj0SEDh/t81df0IsI246OcPLd/mHgSIADP6/Die/o8fxripbRADBwAIHFZFTlvwSMfe6QzynUKe2JpbJateS7VusOuuA++E0lVl3euKvkwLwdz04HYc2uYygCP4JtWYa0QswOitAdpLihwCCMQREl6MXDBYCmXgQZ91ZdKtdgohQD9KwOF8EUefLW6CwYIf11LqyhrX+IYOn2UBtgNFbFAgS8FQIHZXPsMARBiv2iWf39/ZGsuCbcwKFDMGG1VSAfIk8djGjT71pPaqIDBS4yMMtQebxGbK7go4TibDF7v5kD5ZHQoes3kljokFqVRCSQd0KhgCO8Q3ACA1RkF3pQMhU9F4Cob9J1wl3ZAozMQa+RykCtHRbYPP+BSfjf4VcBSNcQ9vSvsJmoQh64xVY1idGpkp9BnpiZKTt0ywTpB/bzGKBYSB+6NjGb7lLPCDZka05Ib05FkEPd9oqo3pfCXxVEgCx/EfkEMmJUkaXIKlMEfxEF437E5HmCouVDOEriL0619EsqdEkgvNqUJea6oifW0CcuCSIN1o/lnJyf9GvNhEvilEW3xnM4H98PoEmGWEDzBjiRtuoMdmh5xUzs+L2KqgSQOuHdfi8+fvtnurO7qa5lIgYb00JaDatSnoPVhQU8oUunM3m4jZCdfgEHX30fkd0K52aTsGl6m1jf0vppwJ27cMb9ASsJaJpKFUMdu3lvphR6DNv2MI6SY9ruJvhx14YGOQQJXc/ObSbgsX+sF/kJ4ho+o/6QEtNr1IhCY2bL0D8/FlkOnMAEkjcAg7zARaahTQlNSdfSiIROHgnMIz1BakD2sSpW0ffDL7Vv2/NJpxP9L7eu0i/CCht6YYsKtoBSRo8M5pke70kK/nD2aveMnsvR+DU2403R2gq2VTissB3KmI1sxi0Q92H4kVQI3awCN/uYneHN8xSUwDhC5B2b5Mb8VZ2ac42N06Iufb3kyrTk+HeNvqsooTzT4hSvI/IMELa87f/8HkjWnBj8UUpS1JOFAsFcNpwNNzjIOWZfmOwdv7UXBhGLNcZGJy7MUezfNnWajlIkDnbVXajF1HO4m3nJuXTr8gIGSvcNYWTXYL2SfvXrlUX1ln7/FIoShO0w761WnoYR8fjQwDIt7+mk6gu/wFEACCGDOYxdEyTaGpCf5qpU5l9V3rRlCLxeBZuzY58Uurry7VykOGA1t2sen+QX5P67MXi/0Dg==,iv:mj8bVPIfW3+Lh8pEnqww7WLkhmJwZkSazYaihqYhNEw=,tag:lFtL5HyCsrsl/rLEx2XAKA==,type:str] + os: + crt: ENC[AES256_GCM,data:TyfOW1uiIbmjnl+jkqGyliWAsaNh2znKbuql5aUMcRi+7CHVOOks8dFO8xGK7H+uvCiB4twJ+HTExnTAADEgwGxfB5Gm06dPS2I01XyugX/5blW+0rA2kQy4YpzXjX8bKep8G1pJoj/DA1X+FS4uTgXshtmer80HdWfheN2tZTGi6iWyuvh5xOemCU+O8sOy034g2M0BHv9Qicof/TF1ubtUU0fiD8Rzmc6rBv+9FMr73QdboHujEku62NABHvKFdr0fIJkU5BGzWHtGHyluXe6tha/Bvb3Q88/STD7s6XqrtzQnwKMZzzza3jms+LnJWZPlYH15cVO41hxgalw97M5k+ZSNUBhmq7qSOfjINhKk3IIJJsJpGIWq0mjPQj2zRDBIxDwbqpEA90C1bk/VF+LIdQ+HmC6RzxAcvjuDy54qJb9AqNCWSdWSVi24ECBm2cLXh1jwqEje/J1pRBH0oK6M026ny2JCaCu2N0doghEfp2uqyq02m88v73tLQfix6Ao5FzBUn643wrPaj7Zq848yM+lj7EieZ6fCIrf3+YoESRBjHlGRVh33H/EY1n0VSfhs0Ogipi8IePYLs8GfEbPC10E1jlii/wBYpLleBnmqE+1qLfc4MVbABSu7eY3egitxdYWsEdgU0uqwcsWFAz69U8onGoEiEg2gNe/PJ4vBoaerY64Tf9Rm/eorv/fPkPdD6MUB6yvlr6HJxffQu47n+AgEnX80GUaz4VvUy1tT9VTrrtNu1kyw+2sRVrNnhcVCpY5N4mEWp1lLZDQZltcVMldZum1G/63sJnF7WMU+acMTHgczfzd/mnw1vaHrp1XqDJ9F1WlcJ/7dC3f0+Kk5qfKB7auAVtHHofwAVqc2ZNPo,iv:qZJJ6MBuALAFQGNDUdzjbl+QMNjCOgXbPidj7JhZWt0=,tag:5/y1IiCL4YwIKOEwoYAGHA==,type:str] + key: ENC[AES256_GCM,data:quNkDHrlejU/EFXTCB4tUXg4nvnbR4gTNs1uYMIIRbhaGLhzv9/X4XRkh2OTtnOz9dMyqdtoOHwq2e050pYH+y5xtE+FsnyUad/q65ZhxSxrCAHIkWYj6xlR/8sAVByLq+VfM9sc4xrnC/x06oXiBZvG0dSN+I1vXqd1P/uFBYoP1GzB6AAaS/KzHAJLsgwNN8aZeuLt9ki7QtALOUKrxIFZaXwErIdt15GsVdLj82Ptz6kO,iv:oz7nY/VJCzO+5tqiika7yN6qGNt0IoJTbVnSazXB5zs=,tag:sDZ0KZvy02coYlvchWJnig==,type:str] +sops: + lastmodified: "2026-10-23T07:13:24Z" + mac: ENC[AES256_GCM,data:A+20ssbulHjAmOa2aAEOC+sU34TkZNe5VzlI3azK7QReNa8N1rYk/X8Od40oVDq8fwFJ2h6+Qx81qEuLv2RFWoAM258dbjZaivw35c3ICE97FAujXw/s6pylYvzEIgLs3QZEOtXXZgOhzJcYBuU/E+5S97tNA3dnoOkew8djq4Q=,iv:rvC42m2vpcZy1QwW4AnfsuD2om9/AgvYBtV9SzjSLlc=,tag:q8bbOURj2QJSMVFkeb+wow==,type:str] + pgp: + - created_at: "2026-10-23T07:13:24Z" + enc: |- + -----BEGIN PGP MESSAGE----- + + hF4DTANA/IHJkQ0SAQdAIsZWJxXkAJnS3e9Ok1w+mehdz3ApXxBF/Db6oAqGlAYw + kJApbYQOeLQQex2AEb4Da5ydwbWooV/ghAfd2IRZmgGqCKNYgOZ5gZLxinUJaE0A + 1GgBCQIQSNgI3HALGt2NbkglE4oJ/wk4jsSKuPbyG8kVJiSxcO5GBhUOoaqCgwhl + rwFcOde+C1hHHRQBcz7PhWMGwWwBOq3wBUrQ/oBYO7k6qv0wl6HJvF616wE1L/iY + zcjVszKRVh/xTQ== + =T+YW + -----END PGP MESSAGE----- + fp: B13C2DAF24268258F525697A063A10A651314CE9 + unencrypted_suffix: _unencrypted + version: 3.13.3 diff --git a/scripts/pods-with-limits.sh b/scripts/pods-with-limits.sh new file mode 100755 index 0000000..52b128b --- /dev/null +++ b/scripts/pods-with-limits.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +ns='NAMESPACE:.metadata.namespace' +pod="POD:.metadata.name" +cont='CONTAINER:.spec.containers[*].name' +mreq='MEM_REQ:.spec.containers[*].resources.requests.memory' +mlim='MEM_LIM:.spec.containers[*].resources.limits.memory' +creq='CPU_REQ:.spec.containers[*].resources.requests.cpu' +clim='CPU_LIM:.spec.containers[*].resources.limits.cpu' + +kubectl get pod -A -o custom-columns="$ns,$pod,$cont,$mreq,$mlim,$creq,$clim" diff --git a/scripts/prune-short.sh b/scripts/prune-short.sh new file mode 100755 index 0000000..0df919f --- /dev/null +++ b/scripts/prune-short.sh @@ -0,0 +1,49 @@ +#!/bin/bash +# Simple Kubernetes Pruner using kubectl built-in commands + +set -e + +# Configuration +NAMESPACE="${1:-default}" +DRY_RUN="${2:-true}" + +echo "Pruning unused resources in namespace: $NAMESPACE" + +if [ "$DRY_RUN" = "true" ]; then + DRY_RUN_FLAG="--dry-run=client" + echo "Running in dry-run mode" +else + DRY_RUN_FLAG="" +fi + +# 1. Delete failed pods +echo "Cleaning failed pods..." +kubectl delete pods -n $NAMESPACE --field-selector=status.phase=Failed $DRY_RUN_FLAG + +# 2. Delete completed pods (from Jobs) +echo "Cleaning completed pods..." +kubectl delete pods -n $NAMESPACE --field-selector=status.phase=Succeeded $DRY_RUN_FLAG + +# 3. Delete orphaned ReplicaSets (with 0 replicas) +echo "Cleaning orphaned ReplicaSets..." +kubectl get replicasets -n $NAMESPACE -o json | \ + jq -r '.items[] | select(.metadata.ownerReferences == null) | select(.spec.replicas == 0) | .metadata.name' | \ + xargs -r kubectl delete replicasets -n $NAMESPACE $DRY_RUN_FLAG + +# 4. Delete old Completed Jobs (older than 1 day) +echo "Cleaning old completed jobs..." +kubectl delete jobs -n $NAMESPACE --field-selector=status.successful=1 $DRY_RUN_FLAG + +# 5. Clean up Evicted pods +echo "Cleaning evicted pods..." +kubectl get pods -n $NAMESPACE | grep Evicted | awk '{print $1}' | xargs -r kubectl delete pod -n $NAMESPACE $DRY_RUN_FLAG + +# 6. Clean up ImagePullBackOff pods +echo "Cleaning ImagePullBackOff pods..." +kubectl get pods -n $NAMESPACE | grep ImagePullBackOff | awk '{print $1}' | xargs -r kubectl delete pod -n $NAMESPACE $DRY_RUN_FLAG + +# 7. Clean up ErrImagePull pods +echo "Cleaning ErrImagePull pods..." +kubectl get pods -n $NAMESPACE | grep ErrImagePull | awk '{print $1}' | xargs -r kubectl delete pod -n $NAMESPACE $DRY_RUN_FLAG + +echo "Cleanup completed!" diff --git a/scripts/prune.sh b/scripts/prune.sh new file mode 100755 index 0000000..dbfcb89 --- /dev/null +++ b/scripts/prune.sh @@ -0,0 +1,323 @@ +#!/bin/bash + +# Kubernetes Resource Pruner Script +# Safely removes unused resources from Kubernetes clusters + +set -euo pipefail + +# Color codes for output +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +BLUE='\033[0;34m' +NC='\033[0m' # No Color + +# Default settings +DRY_RUN=true +NAMESPACE="" +ALL_NAMESPACES=false +FORCE=false +# RESOURCE_TYPES=("rs" "pod" "pv" "pvc" "cm" "secret" "job" "hpa" "ingress" "svc") +RESOURCE_TYPES=("rs" "pod" "pv" "pvc" "job" "hpa" "ingress") + +# Function to print colored output +log_info() { echo -e "${BLUE}[INFO]${NC} $1"; } +log_success() { echo -e "${GREEN}[SUCCESS]${NC} $1"; } +log_warning() { echo -e "${YELLOW}[WARNING]${NC} $1"; } +log_error() { echo -e "${RED}[ERROR]${NC} $1"; } + +# Function to print usage +usage() { + cat << EOF +Usage: $0 [OPTIONS] + +Kubernetes Resource Pruner - Removes unused resources from Kubernetes clusters + +Options: + -n, --namespace NAME Target specific namespace (default: current context namespace) + -A, --all-namespaces Process all namespaces + -f, --force Actually delete resources (default: dry-run) + -t, --type RESOURCE Specific resource types to prune (comma-separated) + Available: rs,pod,pv,pvc,cm,secret,job,hpa,ingress,svc + -h, --help Show this help message + +Examples: + $0 # Dry run in current namespace + $0 -n my-namespace -f # Actually delete in specific namespace + $0 -A -f # Delete in all namespaces + $0 -t "rs,pod,job" -f # Only prune replicasets, pods, and jobs + +EOF +} + +# Parse command line arguments +while [[ $# -gt 0 ]]; do + case $1 in + -n|--namespace) + NAMESPACE="$2" + shift 2 + ;; + -A|--all-namespaces) + ALL_NAMESPACES=true + shift + ;; + -f|--force) + DRY_RUN=false + shift + ;; + -t|--type) + IFS=',' read -ra RESOURCE_TYPES <<< "$2" + shift 2 + ;; + -h|--help) + usage + exit 0 + ;; + *) + log_error "Unknown option: $1" + usage + exit 1 + ;; + esac +done + +# Set namespace flags +if [ "$ALL_NAMESPACES" = true ]; then + NS_FLAG="--all-namespaces" + NS_TEXT="all namespaces" +elif [ -n "$NAMESPACE" ]; then + NS_FLAG="-n $NAMESPACE" + NS_TEXT="namespace: $NAMESPACE" +else + NS_FLAG="" + NS_TEXT="current namespace" +fi + +# Function to get resources with namespace +get_resources() { + local resource=$1 + local namespace_flag=$2 + kubectl get $resource $namespace_flag --no-headers 2>/dev/null || echo "" +} + +# Function to delete resource +delete_resource() { + local resource=$1 + local name=$2 + local namespace=$3 + + if [ "$DRY_RUN" = true ]; then + log_info "[DRY RUN] Would delete $resource/$name in $namespace" + else + log_warning "Deleting $resource/$name in $namespace" + if [ -n "$namespace" ] && [ "$namespace" != "NAMESPACE" ]; then + kubectl delete $resource "$name" -n "$namespace" --wait=false + else + kubectl delete $resource "$name" --wait=false + fi + sleep 0.5 # Small delay to avoid API rate limiting + fi +} + +# Check if kubectl is available +if ! command -v kubectl &> /dev/null; then + log_error "kubectl is not installed or not in PATH" + exit 1 +fi + +# Check Kubernetes connection +if ! kubectl cluster-info &> /dev/null; then + log_error "Cannot connect to Kubernetes cluster" + exit 1 +fi + +log_info "Starting Kubernetes resource pruning in $NS_TEXT" +if [ "$DRY_RUN" = true ]; then + log_warning "RUNNING IN DRY-RUN MODE - No resources will be deleted" + log_warning "Use -f flag to actually delete resources" +fi + +# Prune Pods (Failed, Evicted, Completed, ImagePullBackOff, ErrImagePull) +if [[ " ${RESOURCE_TYPES[@]} " =~ " pod " ]]; then + log_info "Checking for non-running Pods..." + while IFS= read -r line; do + [[ -z "$line" ]] && continue + read -r namespace name ready status restarts age <<< "$line" + + # Check pod status + pod_status=$(echo "$status" | tr '[:upper:]' '[:lower:]') + case $pod_status in + *failed*|*evicted*|*completed*|*imagepullbackoff*|*errimagepull*|*crashloopbackoff*|*error*) + # Check if pod is managed by a controller + owner=$(kubectl get pod "$name" -n "$namespace" -o jsonpath='{.metadata.ownerReferences[0].kind}' 2>/dev/null || echo "") + delete_resource "pod" "$name" "$namespace" + # if [[ "$owner" ]]; then + # delete_resource "pod" "$name" "$namespace" + # fi + ;; + esac + done < <(get_resources "pod" "$NS_FLAG") +fi + +# Prune ReplicaSets (orphaned and with 0 replicas) +if [[ " ${RESOURCE_TYPES[@]} " =~ " rs " ]]; then + log_info "Checking for unused ReplicaSets..." + while IFS= read -r line; do + [[ -z "$line" ]] && continue + read -r namespace name replicas desired ready age <<< "$line" + if [[ "$desired" == "0" ]] || [[ "$ready" == "0" && "$desired" == "0" ]]; then + delete_resource "rs" "$name" "$namespace" + # Check if owned by a Deployment + # owner=$(kubectl get rs "$name" -n "$namespace" -o jsonpath='{.metadata.ownerReferences[0].kind}' 2>/dev/null || echo "") + # if [[ -z "$owner" ]] || [[ "$owner" != "Deployment" ]]; then + # delete_resource "rs" "$name" "$namespace" + # fi + fi + done < <(get_resources "rs" "$NS_FLAG") +fi + +# Prune PersistentVolumeClaims (in Released state) +if [[ " ${RESOURCE_TYPES[@]} " =~ " pvc " ]]; then + log_info "Checking for unused PersistentVolumeClaims..." + while IFS= read -r line; do + [[ -z "$line" ]] && continue + read -r namespace name status capacity accessmodes storageclass age <<< "$line" + if [[ "$status" == "Released" ]] || [[ "$status" == "Available" ]]; then + delete_resource "pvc" "$name" "$namespace" + fi + done < <(get_resources "pvc" "$NS_FLAG") +fi + +# Prune PersistentVolumes (in Released/Available state) +if [[ " ${RESOURCE_TYPES[@]} " =~ " pv " ]]; then + log_info "Checking for unused PersistentVolumes..." + while IFS= read -r line; do + [[ -z "$line" ]] && continue + read -r name capacity accessmodes reclaimstatus status storageclass reason age <<< "$line" + if [[ "$status" == "Released" ]] || [[ "$status" == "Available" ]]; then + if [ "$DRY_RUN" = true ]; then + log_info "[DRY RUN] Would delete pv/$name" + else + log_warning "Deleting pv/$name" + kubectl delete pv "$name" + fi + fi + done < <(kubectl get pv --no-headers 2>/dev/null || echo "") +fi + +# Prune ConfigMaps (check if they're being used) +if [[ " ${RESOURCE_TYPES[@]} " =~ " cm " ]]; then + log_info "Checking for unused ConfigMaps..." + while IFS= read -r line; do + [[ -z "$line" ]] && continue + read -r namespace name data age <<< "$line" + + # Skip system configmaps + if [[ "$name" == kube-root-ca.crt ]] || \ + [[ "$name" == kube-proxy ]] || \ + [[ "$name" == extension-apiserver-authentication ]] || \ + [[ "$namespace" == "kube-system" ]]; then + continue + fi + + # Check if any pod is using this configmap + if ! kubectl get pods $NS_FLAG -o yaml | grep -q "configMapKeyRef:\|configMapRef:" 2>/dev/null; then + # Simple check - in production you might want more sophisticated checks + delete_resource "configmap" "$name" "$namespace" + fi + done < <(get_resources "configmap" "$NS_FLAG") +fi + +# Prune Secrets (check if they're being used) +if [[ " ${RESOURCE_TYPES[@]} " =~ " secret " ]]; then + log_info "Checking for unused Secrets..." + while IFS= read -r line; do + [[ -z "$line" ]] && continue + read -r namespace name type data age <<< "$line" + + # Skip system secrets + if [[ "$name" == *token ]] || \ + [[ "$type" == *service-account* ]] || \ + [[ "$namespace" == "kube-system" ]]; then + continue + fi + + # Check if any pod is using this secret + if ! kubectl get pods $NS_FLAG -o yaml | grep -q "secretKeyRef:\|secretRef:" 2>/dev/null; then + delete_resource "secret" "$name" "$namespace" + fi + done < <(get_resources "secret" "$NS_FLAG") +fi + +# Prune completed Jobs +if [[ " ${RESOURCE_TYPES[@]} " =~ " job " ]]; then + log_info "Checking for completed Jobs..." + while IFS= read -r line; do + [[ -z "$line" ]] && continue + read -r namespace name completions duration age <<< "$line" + + # Get job completion status + job_info=$(kubectl get job "$name" -n "$namespace" -o jsonpath='{.status.succeeded}' 2>/dev/null || echo "0") + if [[ "$job_info" == "1" ]] || [[ "$age" =~ d$ ]] && [[ "$age" > "1d" ]]; then + delete_resource "job" "$name" "$namespace" + fi + done < <(get_resources "job" "$NS_FLAG") +fi + +# Prune unused Services +if [[ " ${RESOURCE_TYPES[@]} " =~ " svc " ]]; then + log_info "Checking for unused Services..." + while IFS= read -r line; do + [[ -z "$line" ]] && continue + read -r namespace name type clusterip externalip ports age <<< "$line" + + # Skip system services + if [[ "$name" == kubernetes ]] || \ + [[ "$namespace" == "kube-system" ]] || \ + [[ "$type" == *LoadBalancer* ]]; then + continue + fi + + # Check if service has no endpoints + endpoints=$(kubectl get endpoints "$name" -n "$namespace" -o jsonpath='{.subsets}' 2>/dev/null || echo "") + if [[ -z "$endpoints" ]] || [[ "$endpoints" == "null" ]] || [[ "$endpoints" == "[]" ]]; then + delete_resource "service" "$name" "$namespace" + fi + done < <(get_resources "service" "$NS_FLAG") +fi + +# Prune unused Ingresses +if [[ " ${RESOURCE_TYPES[@]} " =~ " ingress " ]]; then + log_info "Checking for unused Ingresses..." + while IFS= read -r line; do + [[ -z "$line" ]] && continue + read -r namespace name class hosts address ports age <<< "$line" + + # Check if there are no backend services + backends=$(kubectl get ingress "$name" -n "$namespace" -o jsonpath='{.spec.rules[*].http.paths[*].backend.service.name}' 2>/dev/null || echo "") + if [[ -z "$backends" ]]; then + delete_resource "ingress" "$name" "$namespace" + fi + done < <(get_resources "ingress" "$NS_FLAG") +fi + +# Prune unused HPAs with 0 replicas +if [[ " ${RESOURCE_TYPES[@]} " =~ " hpa " ]]; then + log_info "Checking for unused HorizontalPodAutoscalers..." + while IFS= read -r line; do + [[ -z "$line" ]] && continue + read -r namespace name reference targets minpods maxpods replicas age <<< "$line" + + if [[ "$replicas" == "0" ]] && [[ "$minpods" == "0" ]]; then + delete_resource "hpa" "$name" "$namespace" + fi + done < <(get_resources "hpa" "$NS_FLAG") +fi + +# Final summary +if [ "$DRY_RUN" = true ]; then + log_success "Dry run completed. Review the resources above." + log_success "Run with -f flag to actually delete these resources." +else + log_success "Resource pruning completed successfully!" +fi diff --git a/yc-lab/argocd/argocd.yaml b/yc-lab/argocd/argocd.yaml new file mode 100644 index 0000000..c9725f3 --- /dev/null +++ b/yc-lab/argocd/argocd.yaml @@ -0,0 +1,156 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: argocd + namespace: argocd +spec: + project: default + source: + repoURL: https://argoproj.github.io/argo-helm + targetRevision: 10.4.2 + chart: argo-cd + helm: + valuesObject: + redis-ha: + enabled: false + + redis: + image: + repository: docker.io/redis + resources: + requests: + cpu: 20m + memory: 32Mi + limits: + cpu: 100m + memory: 64Mi + + controller: + replicas: 1 + + resources: + requests: + cpu: 50m + memory: 512Mi + limits: + cpu: 150m + memory: 1Gi + + env: + - name: GOGC + value: "50" + - name: GOMEMLIMIT + value: "800MiB" + + server: + autoscaling: + enabled: false + minReplicas: 1 + resources: + requests: + cpu: 25m + memory: 64Mi + limits: + cpu: 100m + memory: 128Mi + + repoServer: + autoscaling: + enabled: false + minReplicas: 1 + resources: + requests: + cpu: 500m + memory: 128Mi + limits: + cpu: 500m + memory: 256Mi + + applicationSet: + resources: + requests: + cpu: 10m + memory: 32Mi + limits: + cpu: 50m + memory: 64Mi + + notifications: + enabled: false + + dex: + enabled: false + + configs: + params: + server.insecure: "true" + + cm: + url: https://argocd.yc.infra.itqdev.xyz + + timeout.reconciliation: "10m" + + resource.exclusions: | + - apiGroups: + - "" + kinds: + - Event + clusters: + - "*" + + - apiGroups: + - "events.k8s.io" + kinds: + - Event + clusters: + - "*" + + - apiGroups: + - "" + kinds: + - Endpoints + clusters: + - "*" + + - apiGroups: + - "discovery.k8s.io" + kinds: + - EndpointSlice + clusters: + - "*" + + - apiGroups: + - "metrics.k8s.io" + kinds: + - "*" + clusters: + - "*" + + - apiGroups: + - "coordination.k8s.io" + kinds: + - Lease + clusters: + - "*" + + oidc.config: | + name: Keycloak + issuer: https://id.itqdev.xyz/realms/master + clientID: argocd-yandexcloud + clientSecret: $oidc.keycloak.clientSecret + refreshTokenThreshold: 2m + requestedScopes: ["openid", "profile", "email", "groups"] + + destination: + server: https://kubernetes.default.svc + namespace: argocd + + syncPolicy: + automated: + prune: true + selfHeal: true + enabled: true + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + - ServerSideApply=true diff --git a/yc-lab/argocd/cert-manager.yaml b/yc-lab/argocd/cert-manager.yaml new file mode 100644 index 0000000..82d9431 --- /dev/null +++ b/yc-lab/argocd/cert-manager.yaml @@ -0,0 +1,40 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: cert-manager + namespace: argocd +spec: + project: default + source: + repoURL: oci://quay.io/jetstack/charts/cert-manager + path: . + targetRevision: v1.21.1 + helm: + valuesObject: + crds: + enabled: true + + prometheus: + enabled: false + + resources: + requests: + cpu: 25m + memory: 64Mi + limits: + cpu: 100m + memory: 128Mi + + destination: + server: https://kubernetes.default.svc + namespace: cert-manager + + syncPolicy: + automated: + prune: true + selfHeal: true + enabled: true + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + - ServerSideApply=true diff --git a/yc-lab/argocd/cloudnative-pg.yaml b/yc-lab/argocd/cloudnative-pg.yaml new file mode 100644 index 0000000..e294045 --- /dev/null +++ b/yc-lab/argocd/cloudnative-pg.yaml @@ -0,0 +1,34 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: cloudnative-pg + namespace: argocd +spec: + project: default + source: + repoURL: https://cloudnative-pg.github.io/charts + targetRevision: 0.29.0 + chart: cloudnative-pg + helm: + valuesObject: + resources: + requests: + cpu: 25m + memory: 32Mi + limits: + cpu: 100m + memory: 128Mi + + destination: + server: https://kubernetes.default.svc + namespace: cloudnative-pg + + syncPolicy: + automated: + prune: true + selfHeal: true + enabled: true + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + - ServerSideApply=true diff --git a/yc-lab/argocd/external-secrets-operator.yaml b/yc-lab/argocd/external-secrets-operator.yaml new file mode 100644 index 0000000..2ada1db --- /dev/null +++ b/yc-lab/argocd/external-secrets-operator.yaml @@ -0,0 +1,38 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: external-secrets-operator + namespace: argocd +spec: + project: default + source: + repoURL: https://charts.external-secrets.io + targetRevision: 2.10.0 + chart: external-secrets + helm: + valuesObject: + webhook: + create: false + certController: + create: false + resources: + requests: + cpu: 25m + memory: 32Mi + limits: + cpu: 100m + memory: 128Mi + + destination: + server: https://kubernetes.default.svc + namespace: external-secrets + + syncPolicy: + automated: + prune: true + selfHeal: true + enabled: true + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + - ServerSideApply=true diff --git a/yc-lab/argocd/grafana.yaml b/yc-lab/argocd/grafana.yaml new file mode 100644 index 0000000..dd790d0 --- /dev/null +++ b/yc-lab/argocd/grafana.yaml @@ -0,0 +1,89 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: grafana + namespace: argocd +spec: + project: default + source: + repoURL: oci://ghcr.io/grafana-community/helm-charts/grafana + path: . + targetRevision: 13.2.6 + helm: + valuesObject: + replicas: 1 + envValueFrom: + GF_AUTH_GENERIC_OAUTH_CLIENT_SECRET: + secretKeyRef: + name: grafana-secrets + key: client-secret + + plugins: + - prometheus + + grafana.ini: + plugins: + preinstall_auto_update: false + + server: + root_url: https://grafana.yc.infra.itqdev.xyz + + auth: + disable_login_form: false + oauth_auto_login: false + + auth.generic_oauth: + enabled: true + name: Keycloak + allow_sign_up: true + client_id: grafana-yandexcloud + client_secret: ${GF_AUTH_GENERIC_OAUTH_CLIENT_SECRET} + scopes: openid profile email + use_pkce: true + + auth_url: https://id.itqdev.xyz/realms/master/protocol/openid-connect/auth + token_url: https://id.itqdev.xyz/realms/master/protocol/openid-connect/token + api_url: https://id.itqdev.xyz/realms/master/protocol/openid-connect/userinfo + + role_attribute_path: > + contains(groups[*], 'admin') && 'Admin' || contains(groups[*], 'editor') && 'Editor' || 'Viewer' + role_attribute_strict: false + use_refresh_token: true + id_token_attribute_name: preferred_username + + sidecar: + dashboards: + enabled: true + label: grafana_dashboard + labelValue: "1" + searchNamespace: ALL + folderAnnotation: grafana_folder + provider: + allowUiUpdates: false + datasources: + enabled: true + label: grafana_datasource + labelValue: "1" + searchNamespace: ALL + + resources: + requests: + cpu: 100m + memory: 256Mi + limits: + cpu: 500m + memory: 512Mi + + destination: + server: https://kubernetes.default.svc + namespace: grafana + + syncPolicy: + automated: + prune: true + selfHeal: true + enabled: true + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + - ServerSideApply=true diff --git a/yc-lab/argocd/headlamp.yaml b/yc-lab/argocd/headlamp.yaml new file mode 100644 index 0000000..32baca7 --- /dev/null +++ b/yc-lab/argocd/headlamp.yaml @@ -0,0 +1,34 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: headlamp + namespace: argocd +spec: + project: default + source: + repoURL: https://kubernetes-sigs.github.io/headlamp/ + targetRevision: 0.45.0 + chart: headlamp + helm: + valuesObject: + resources: + requests: + cpu: 20m + memory: 32Mi + limits: + cpu: 100m + memory: 64Mi + + destination: + server: https://kubernetes.default.svc + namespace: headlamp + + syncPolicy: + automated: + prune: true + selfHeal: true + enabled: true + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + - ServerSideApply=true diff --git a/yc-lab/argocd/karmada.yaml b/yc-lab/argocd/karmada.yaml new file mode 100644 index 0000000..b18a15b --- /dev/null +++ b/yc-lab/argocd/karmada.yaml @@ -0,0 +1,42 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: karmada + namespace: argocd +spec: + project: default + source: + repoURL: https://raw.githubusercontent.com/karmada-io/karmada/master/charts + targetRevision: v1.19.0 + chart: karmada + helm: + valuesObject: + controllerManager: + featureGates: + MultiClusterService: true + + certs: + mode: auto + auto: + hosts: + - kubernetes.default.svc + - '*.etcd.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}' + - '*.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}' + - '*.{{ .Release.Namespace }}.svc' + - localhost + - 127.0.0.1 + - karmada.yc.infra.itqdev.xyz + + destination: + server: https://kubernetes.default.svc + namespace: karmada-system + + syncPolicy: + automated: + prune: true + selfHeal: true + enabled: true + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + - ServerSideApply=true diff --git a/yc-lab/argocd/manifests.yaml b/yc-lab/argocd/manifests.yaml new file mode 100644 index 0000000..bd78b25 --- /dev/null +++ b/yc-lab/argocd/manifests.yaml @@ -0,0 +1,30 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: manifests + namespace: argocd + annotations: + argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true +spec: + project: default + source: + repoURL: https://git.itqdev.xyz/Infrastructure/homelab.git + targetRevision: main + path: yc-lab/manifests + + directory: + recurse: true + + destination: + server: https://kubernetes.default.svc + namespace: default + + syncPolicy: + automated: + prune: true + selfHeal: true + enabled: true + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + - ServerSideApply=true diff --git a/yc-lab/argocd/metrics-server.yaml b/yc-lab/argocd/metrics-server.yaml new file mode 100644 index 0000000..d7477a4 --- /dev/null +++ b/yc-lab/argocd/metrics-server.yaml @@ -0,0 +1,38 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: metrics-server + namespace: argocd +spec: + project: default + source: + repoURL: https://kubernetes-sigs.github.io/metrics-server/ + targetRevision: 3.14.0 + chart: metrics-server + helm: + valuesObject: + args: + - --kubelet-insecure-tls + metrics: + enabled: true + resources: + requests: + cpu: 50m + memory: 100Mi + limits: + cpu: 50m + memory: 100Mi + + destination: + server: https://kubernetes.default.svc + namespace: metrics-server + + syncPolicy: + automated: + prune: true + selfHeal: true + enabled: true + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + - ServerSideApply=true diff --git a/yc-lab/argocd/root-app.yaml b/yc-lab/argocd/root-app.yaml new file mode 100644 index 0000000..ad9c768 --- /dev/null +++ b/yc-lab/argocd/root-app.yaml @@ -0,0 +1,27 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: root-app + namespace: argocd +spec: + project: default + source: + repoURL: https://git.itqdev.xyz/Infrastructure/homelab.git + targetRevision: main + path: yc-lab/argocd + + directory: + recurse: true + + destination: + server: https://kubernetes.default.svc + namespace: argocd + + syncPolicy: + automated: + prune: true + selfHeal: true + enabled: true + syncOptions: + - ApplyOutOfSyncOnly=true + - ServerSideApply=true diff --git a/yc-lab/argocd/submariner-broker.yaml b/yc-lab/argocd/submariner-broker.yaml new file mode 100644 index 0000000..504f5b8 --- /dev/null +++ b/yc-lab/argocd/submariner-broker.yaml @@ -0,0 +1,25 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: submariner-k8s-broker + namespace: argocd +spec: + project: default + source: + repoURL: https://submariner-io.github.io/submariner-charts/charts + chart: submariner-k8s-broker + targetRevision: 0.24.1 + + destination: + server: https://kubernetes.default.svc + namespace: submariner-operator + + syncPolicy: + automated: + prune: true + selfHeal: true + enabled: true + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + - ServerSideApply=true diff --git a/yc-lab/argocd/submariner-operator.yaml b/yc-lab/argocd/submariner-operator.yaml new file mode 100644 index 0000000..1c90b14 --- /dev/null +++ b/yc-lab/argocd/submariner-operator.yaml @@ -0,0 +1,49 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: submariner-operator + namespace: argocd +spec: + project: default + source: + repoURL: https://submariner-io.github.io/submariner-charts/charts + chart: submariner-operator + targetRevision: 0.24.1 + helm: + valuesObject: + broker: + server: kubernetes.default.svc.cluster.local + namespace: submariner-operator + + submariner: + brokerK8sSecret: submariner-k8s-broker-client-token # created by submariner-broker + + clusterId: k3s-cloud + clusterCidr: 10.96.0.0/16 + serviceCidr: 10.97.0.0/16 + + clustersetIpEnabled: false + loadBalancerEnabled: false + natEnabled: true + + debug: false + serviceDiscovery: false + cableDriver: wireguard + healthcheckEnabled: true + + ipsec: + pskSecret: submariner-ipsec-psk + + destination: + server: https://kubernetes.default.svc + namespace: submariner-operator + + syncPolicy: + automated: + prune: true + selfHeal: true + enabled: true + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + - ServerSideApply=true diff --git a/yc-lab/argocd/victoriametrics-k8s-stack.yaml b/yc-lab/argocd/victoriametrics-k8s-stack.yaml new file mode 100644 index 0000000..ef82b6c --- /dev/null +++ b/yc-lab/argocd/victoriametrics-k8s-stack.yaml @@ -0,0 +1,295 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: victoriametrics-k8s-cluster + namespace: argocd +spec: + project: default + source: + repoURL: https://victoriametrics.github.io/helm-charts/ + chart: victoria-metrics-k8s-stack + targetRevision: v0.91.2 + helm: + skipCrds: true + valuesObject: + fullnameOverride: vm + + serviceAccount: + create: false + + victoria-metrics-operator: + enabled: false + + defaultDashboards: + # -- Enable dashboard sync via sync-job + enabled: true + + dashboards: + node-exporter-full: + enabled: false + + sources: + node-exporter-full: + enabled: false + kube-prometheus: + enabled: false + victoriametrics-single-node: + enabled: true + victoriametrics-vmagent: + enabled: true + kubernetes-kubelet: + enabled: true + url: https://grafana.com/api/dashboards/16361/revisions/latest/download + kubernetes-controller-manager: + enabled: true + url: https://grafana.com/api/dashboards/16370/revisions/latest/download + kubernetes-scheduler: + enabled: true + url: https://grafana.com/api/dashboards/16362/revisions/latest/download + + syncJob: + # -- Fetch dashboards and rules from upstream sources at deploy time. + # Creates ConfigMaps (for Grafana sidecar) or GrafanaDashboard CRDs and VMRules directly in the cluster. + # A new Job runs automatically whenever this config changes. + enabled: true + + vlsingle: + enabled: false + + vlcluster: + enabled: false + + vldistributed: + enabled: false + + vlagent: + enabled: false + + vtsingle: + enabled: false + + vtcluster: + enabled: false + + vmsingle: + enabled: false + + vmdistributed: + enabled: false + + vmcluster: + enabled: false + + alertmanager: + enabled: false + + vmalert: + enabled: false + + vmauth: + enabled: false + + vmagent: + enabled: false + + defaultDatasources: + grafanaOperator: + # -- Create datasources as CRDs (requires grafana-operator to be installed) + enabled: false + annotations: {} + spec: + instanceSelector: + matchLabels: + dashboards: grafana + allowCrossNamespaceImport: false + victoriametrics: + # -- List of prometheus compatible datasource configurations. + # VM `url` will be added to each of them in templates. + datasources: + - name: VictoriaMetrics + type: prometheus + access: proxy + uid: VictoriaMetrics + isDefault: true + - name: VictoriaMetrics (DS) + isDefault: false + access: proxy + uid: VictoriaMetricsDS + type: victoriametrics-metrics-datasource + victorialogs: + # -- List of VictoriaLogs datasource configurations. + # VL `url` will be added to each of them in templates. + datasources: + - name: VictoriaLogs (DS) + access: proxy + uid: VictoriaLogs + type: victoriametrics-logs-datasource + victoriatraces: + # -- List of VictoriaTraces (Jaeger-compatible) datasource configurations. + # VT `url` will be added to each of them in templates. + datasources: + - name: VictoriaTraces + access: proxy + uid: VictoriaTraces + type: jaeger + # -- List of alertmanager datasources. + # VMAlertmanager generated `url` will be added to each datasource in template if alertmanager is enabled + alertmanager: + datasources: + - name: Alertmanager + access: proxy + uid: Alertmanager + jsonData: + implementation: prometheus + # -- Configure additional grafana datasources (passed through tpl). + # Check [here](https://grafana.com/docs/grafana/latest/administration/provisioning/#data-sources) for details + extra: [] + # - name: prometheus-sample + # access: proxy + # basicAuth: true + # basicAuthPassword: pass + # basicAuthUser: daco + # editable: false + # jsonData: + # tlsSkipVerify: true + # orgId: 1 + # type: prometheus + # url: https://{{ printf "%s-prometheus.svc" .Release.Name }}:9090 + # version: 1 + + grafana: + enabled: false + + defaultScrapeService: + namespace: kube-system + + prometheus-node-exporter: + enabled: false + + # -- kube-state-metrics dependency chart configuration. For possible values check [here](https://github.com/prometheus-community/helm-charts/blob/main/charts/kube-state-metrics/values.yaml) + kube-state-metrics: + enabled: false + # -- [Scrape configuration](https://docs.victoriametrics.com/operator/api/#vmservicescrapespec) for Kube State Metrics + vmScrape: + enabled: true + spec: + selector: + matchLabels: + app.kubernetes.io/name: '{{ include "kube-state-metrics.name" (index .Subcharts "kube-state-metrics") }}' + app.kubernetes.io/instance: '{{ include "vm.release" . }}' + endpoints: + - port: http + honorLabels: true + metricRelabelConfigs: + - action: labeldrop + regex: (uid|container_id|image_id) + jobLabel: app.kubernetes.io/name + + kubelet: + enabled: true + vmScrapes: + cadvisor: + enabled: true + probes: + enabled: true + resources: + enabled: true + + kubeApiServer: + enabled: true + + kubeControllerManager: + enabled: true + + service: + enabled: true + + vmScrape: + spec: + jobLabel: app.kubernetes.io/component + namespaceSelector: + matchNames: [] + endpoints: + - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token + port: http-metrics + scheme: https + tlsConfig: + caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt + serverName: localhost + insecureSkipVerify: true + + kubeDns: + enabled: false + + coreDns: + enabled: true + + service: + enabled: true + selector: + k8s-app: coredns + + vmScrape: + spec: + jobLabel: app.kubernetes.io/component + namespaceSelector: + matchNames: [] + endpoints: + - port: http-metrics + bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token + + kubeEtcd: + enabled: false + + kubeScheduler: + enabled: true + + service: + enabled: true + + vmScrape: + spec: + jobLabel: app.kubernetes.io/component + namespaceSelector: + matchNames: [] + endpoints: + - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token + port: http-metrics + scheme: https + tlsConfig: + caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt + serverName: localhost + insecureSkipVerify: true + + kubeProxy: + enabled: true + + service: + enabled: true + + vmScrape: + spec: + jobLabel: app.kubernetes.io/component + namespaceSelector: + matchNames: [] + endpoints: + - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token + port: http-metrics + scheme: https + tlsConfig: + caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt + + internal: {} + + destination: + server: https://kubernetes.default.svc + namespace: observability + + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + - ServerSideApply=true diff --git a/yc-lab/argocd/victoriametrics-operator.yaml b/yc-lab/argocd/victoriametrics-operator.yaml new file mode 100644 index 0000000..760a13d --- /dev/null +++ b/yc-lab/argocd/victoriametrics-operator.yaml @@ -0,0 +1,41 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: victoriametrics-operator + namespace: argocd +spec: + project: default + source: + repoURL: https://victoriametrics.github.io/helm-charts/ + chart: victoria-metrics-operator + targetRevision: 0.67.3 + helm: + releaseName: victoriametrics-operator + valuesObject: + replicaCount: 1 + admissionWebhooks: + enabled: false + createCRD: true + operator: + # This enables the operator to watch for CRs in all namespaces or we can specify namespaces + disableNamespaceRestriction: true + resources: + requests: + cpu: 100m + memory: 64Mi + limits: + cpu: 1000m + memory: 128Mi + + destination: + server: https://kubernetes.default.svc + namespace: observability + + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + - ServerSideApply=true diff --git a/yc-lab/helm/cilium/values.yaml b/yc-lab/helm/cilium/values.yaml new file mode 100644 index 0000000..b6406f2 --- /dev/null +++ b/yc-lab/helm/cilium/values.yaml @@ -0,0 +1,114 @@ +prometheus: + enabled: true + port: 9962 + + serviceMonitor: + enabled: false + +ipam: + mode: kubernetes + +operator: + replicas: 1 + nodeSelector: + node-role.kubernetes.io/control-plane: "true" + resources: + requests: + cpu: 50m + memory: 64Mi + limits: + cpu: 500m + memory: 256Mi + prometheus: + enabled: true + port: 9963 + metricsService: true + serviceMonitor: + enabled: false + +resources: + requests: + cpu: 100m + memory: 128Mi + limits: + cpu: 250m + memory: 256Mi + +kubeProxyReplacement: true + +securityContext: + capabilities: + ciliumAgent: + - CHOWN + - KILL + - NET_ADMIN + - NET_RAW + - IPC_LOCK + - SYS_ADMIN + - SYS_RESOURCE + - DAC_OVERRIDE + - FOWNER + - SETGID + - SETUID + cleanCiliumState: + - NET_ADMIN + - SYS_ADMIN + - SYS_RESOURCE + +envoy: + resources: + requests: + cpu: 100m + memory: 128Mi + limits: + memory: 1Gi + prometheus: + enabled: true + port: "9964" + serviceMonitor: + enabled: false + +cgroup: + autoMount: + enabled: false + hostRoot: /sys/fs/cgroup + +k8sServiceHost: master.k8s.internal +k8sServicePort: 6443 + +gatewayAPI: + enabled: true + enableAlpn: true + enableAppProtocol: true + +hubble: + metrics: + enabled: + - dns + - drop + - tcp + - flow + - icmp + + port: 9965 + serviceMonitor: + enabled: false + + relay: + enabled: true + + ui: + enabled: false + + peerService: + enabled: false + clusterDomain: cluster.local + +hostFirewall: + enabled: true + +l2announcements: + enabled: true + +bpf: + hostLegacyRouting: false diff --git a/yc-lab/helm/coredns/README.md b/yc-lab/helm/coredns/README.md new file mode 100644 index 0000000..7498682 --- /dev/null +++ b/yc-lab/helm/coredns/README.md @@ -0,0 +1,2 @@ +helm repo add coredns https://coredns.github.io/helm +helm upgrade --install coredns coredns/coredns --namespace kube-system diff --git a/yc-lab/helm/coredns/values.yaml b/yc-lab/helm/coredns/values.yaml new file mode 100644 index 0000000..8a7df4a --- /dev/null +++ b/yc-lab/helm/coredns/values.yaml @@ -0,0 +1,3 @@ +service: + name: kube-dns + clusterIP: 10.97.0.10 diff --git a/yc-lab/manifests/argocd/infra-repo-password.yaml b/yc-lab/manifests/argocd/infra-repo-password.yaml new file mode 100644 index 0000000..19c3c35 --- /dev/null +++ b/yc-lab/manifests/argocd/infra-repo-password.yaml @@ -0,0 +1,18 @@ +apiVersion: external-secrets.io/v1 +kind: ExternalSecret +metadata: + name: homelab-repo-password + namespace: argocd +spec: + refreshInterval: 1h + secretStoreRef: + name: infisical + kind: ClusterSecretStore + target: + name: homelab-repo + creationPolicy: Merge + deletionPolicy: Retain + data: + - secretKey: password + remoteRef: + key: /argocd/ARGOCD_REPO_PASSWORD diff --git a/yc-lab/manifests/argocd/infra-repo-secret.yaml b/yc-lab/manifests/argocd/infra-repo-secret.yaml new file mode 100644 index 0000000..8a89085 --- /dev/null +++ b/yc-lab/manifests/argocd/infra-repo-secret.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Secret +metadata: + name: homelab-repo + namespace: argocd + labels: + argocd.argoproj.io/secret-type: repository +stringData: + type: git + url: https://git.itqdev.xyz/Infrastructure/homelab.git + username: ITQ diff --git a/yc-lab/manifests/argocd/oidc-client-secret.yaml b/yc-lab/manifests/argocd/oidc-client-secret.yaml new file mode 100644 index 0000000..b468e64 --- /dev/null +++ b/yc-lab/manifests/argocd/oidc-client-secret.yaml @@ -0,0 +1,18 @@ +apiVersion: external-secrets.io/v1 +kind: ExternalSecret +metadata: + name: argocd-oidc-client-secret + namespace: argocd +spec: + refreshInterval: 1h + secretStoreRef: + name: infisical + kind: ClusterSecretStore + target: + name: argocd-secret + creationPolicy: Merge + deletionPolicy: Retain + data: + - secretKey: oidc.keycloak.clientSecret + remoteRef: + key: /argocd/ARGOCD_OIDC_CLIENT_SECRET diff --git a/yc-lab/manifests/argocd/project.yaml b/yc-lab/manifests/argocd/project.yaml new file mode 100644 index 0000000..cfbafe7 --- /dev/null +++ b/yc-lab/manifests/argocd/project.yaml @@ -0,0 +1,30 @@ +apiVersion: argoproj.io/v1alpha1 +kind: AppProject +metadata: + name: default + namespace: argocd + +spec: + description: Default project with maintenance sync window + + sourceRepos: + - "*" + + destinations: + - namespace: "*" + server: "*" + + syncWindows: + - kind: allow + schedule: "0 3 * * *" + duration: 1h + applications: + - "*" + manualSync: true + + - kind: allow + schedule: "* * * * *" + duration: 24h + applications: + - "root-app" + - "manifests" diff --git a/yc-lab/manifests/cert-manager/cloudflare-api-token.yaml b/yc-lab/manifests/cert-manager/cloudflare-api-token.yaml new file mode 100644 index 0000000..35f58f4 --- /dev/null +++ b/yc-lab/manifests/cert-manager/cloudflare-api-token.yaml @@ -0,0 +1,19 @@ +apiVersion: external-secrets.io/v1 +kind: ExternalSecret +metadata: + name: cloudflare-api-token + namespace: cert-manager +spec: + refreshInterval: 1h + secretStoreRef: + name: infisical + kind: ClusterSecretStore + target: + name: cloudflare-api-token + creationPolicy: Orphan + template: + type: Opaque + data: + - secretKey: api-token + remoteRef: + key: /cert-manager/CLOUDFLARE_API_TOKEN diff --git a/yc-lab/manifests/cert-manager/cluster-issuer.yaml b/yc-lab/manifests/cert-manager/cluster-issuer.yaml new file mode 100644 index 0000000..a247139 --- /dev/null +++ b/yc-lab/manifests/cert-manager/cluster-issuer.yaml @@ -0,0 +1,16 @@ +apiVersion: cert-manager.io/v1 +kind: ClusterIssuer +metadata: + name: letsencrypt-dns +spec: + acme: + email: itq.dev@ya.ru + server: https://acme-v02.api.letsencrypt.org/directory + privateKeySecretRef: + name: letsencrypt-dns-account-key + solvers: + - dns01: + cloudflare: + apiTokenSecretRef: + name: cloudflare-api-token + key: api-token diff --git a/yc-lab/manifests/external-secrets/infisical-cluster-secret-store.yaml b/yc-lab/manifests/external-secrets/infisical-cluster-secret-store.yaml new file mode 100644 index 0000000..5cdbea8 --- /dev/null +++ b/yc-lab/manifests/external-secrets/infisical-cluster-secret-store.yaml @@ -0,0 +1,22 @@ +apiVersion: external-secrets.io/v1 +kind: ClusterSecretStore +metadata: + name: infisical +spec: + provider: + infisical: + hostAPI: https://vault.itqdev.xyz + auth: + universalAuthCredentials: + clientId: + name: infisical-secret + key: clientId + namespace: external-secrets + clientSecret: + name: infisical-secret + key: clientSecret + namespace: external-secrets + secretsScope: + projectSlug: k8s-yandex + environmentSlug: prod + secretsPath: / diff --git a/yc-lab/manifests/gateway/global-http-redirect.yaml b/yc-lab/manifests/gateway/global-http-redirect.yaml new file mode 100644 index 0000000..c42e57b --- /dev/null +++ b/yc-lab/manifests/gateway/global-http-redirect.yaml @@ -0,0 +1,22 @@ +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: global-http-redirect + namespace: gateway-system +spec: + parentRefs: + - name: shared-gateway + namespace: gateway-system + sectionName: http-redirect + + rules: + - matches: + - path: + type: PathPrefix + value: / + filters: + - type: RequestRedirect + requestRedirect: + scheme: https + statusCode: 301 + port: 443 diff --git a/yc-lab/manifests/gateway/ns.yaml b/yc-lab/manifests/gateway/ns.yaml new file mode 100644 index 0000000..3dbea03 --- /dev/null +++ b/yc-lab/manifests/gateway/ns.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: gateway-system diff --git a/yc-lab/manifests/gateway/routes/argocd/httproute.yaml b/yc-lab/manifests/gateway/routes/argocd/httproute.yaml new file mode 100644 index 0000000..ccfda41 --- /dev/null +++ b/yc-lab/manifests/gateway/routes/argocd/httproute.yaml @@ -0,0 +1,22 @@ +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: argocd + namespace: argocd +spec: + parentRefs: + - name: shared-gateway + namespace: gateway-system + sectionName: argocd-https + + hostnames: + - "argocd.yc.infra.itqdev.xyz" + + rules: + - matches: + - path: + type: PathPrefix + value: / + backendRefs: + - name: argocd-server + port: 80 diff --git a/yc-lab/manifests/gateway/routes/argocd/tls.yaml b/yc-lab/manifests/gateway/routes/argocd/tls.yaml new file mode 100644 index 0000000..cab9d1d --- /dev/null +++ b/yc-lab/manifests/gateway/routes/argocd/tls.yaml @@ -0,0 +1,12 @@ +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: argocd-cert + namespace: gateway-system +spec: + secretName: argocd-tls + issuerRef: + name: letsencrypt-dns + kind: ClusterIssuer + dnsNames: + - argocd.yc.infra.itqdev.xyz diff --git a/yc-lab/manifests/gateway/routes/grafana/httproute.yaml b/yc-lab/manifests/gateway/routes/grafana/httproute.yaml new file mode 100644 index 0000000..e10655d --- /dev/null +++ b/yc-lab/manifests/gateway/routes/grafana/httproute.yaml @@ -0,0 +1,22 @@ +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: grafana + namespace: grafana +spec: + parentRefs: + - name: shared-gateway + namespace: gateway-system + sectionName: grafana-https + + hostnames: + - grafana.yc.infra.itqdev.xyz + + rules: + - matches: + - path: + type: PathPrefix + value: / + backendRefs: + - name: grafana + port: 80 diff --git a/yc-lab/manifests/gateway/routes/grafana/tls.yaml b/yc-lab/manifests/gateway/routes/grafana/tls.yaml new file mode 100644 index 0000000..f70c5f7 --- /dev/null +++ b/yc-lab/manifests/gateway/routes/grafana/tls.yaml @@ -0,0 +1,12 @@ +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: grafana-cert + namespace: gateway-system +spec: + secretName: grafana-tls + issuerRef: + name: letsencrypt-dns + kind: ClusterIssuer + dnsNames: + - grafana.yc.infra.itqdev.xyz diff --git a/yc-lab/manifests/gateway/routes/headlamp/httproute.yaml b/yc-lab/manifests/gateway/routes/headlamp/httproute.yaml new file mode 100644 index 0000000..86e7f68 --- /dev/null +++ b/yc-lab/manifests/gateway/routes/headlamp/httproute.yaml @@ -0,0 +1,22 @@ +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: headlamp + namespace: headlamp +spec: + parentRefs: + - name: shared-gateway + namespace: gateway-system + sectionName: headlamp-https + + hostnames: + - "k8s.yc.infra.itqdev.xyz" + + rules: + - matches: + - path: + type: PathPrefix + value: / + backendRefs: + - name: headlamp + port: 80 diff --git a/yc-lab/manifests/gateway/routes/headlamp/tls.yaml b/yc-lab/manifests/gateway/routes/headlamp/tls.yaml new file mode 100644 index 0000000..a078a79 --- /dev/null +++ b/yc-lab/manifests/gateway/routes/headlamp/tls.yaml @@ -0,0 +1,12 @@ +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: headlamp-cert + namespace: gateway-system +spec: + secretName: headlamp-tls + issuerRef: + name: letsencrypt-dns + kind: ClusterIssuer + dnsNames: + - k8s.yc.infra.itqdev.xyz diff --git a/yc-lab/manifests/gateway/routes/karmada/tlsroute.yaml b/yc-lab/manifests/gateway/routes/karmada/tlsroute.yaml new file mode 100644 index 0000000..db58bd3 --- /dev/null +++ b/yc-lab/manifests/gateway/routes/karmada/tlsroute.yaml @@ -0,0 +1,16 @@ +apiVersion: gateway.networking.k8s.io/v1 +kind: TLSRoute +metadata: + name: karmada-api + namespace: karmada-system +spec: + parentRefs: + - name: shared-gateway + namespace: gateway-system + sectionName: karmada-tls + hostnames: + - karmada.yc.infra.itqdev.xyz + rules: + - backendRefs: + - name: karmada-apiserver + port: 5443 diff --git a/yc-lab/manifests/gateway/shared-gateway.yaml b/yc-lab/manifests/gateway/shared-gateway.yaml new file mode 100644 index 0000000..7ed963b --- /dev/null +++ b/yc-lab/manifests/gateway/shared-gateway.yaml @@ -0,0 +1,66 @@ +apiVersion: gateway.networking.k8s.io/v1 +kind: Gateway +metadata: + name: shared-gateway + namespace: gateway-system +spec: + gatewayClassName: cilium + listeners: + - name: http-redirect + port: 80 + protocol: HTTP + allowedRoutes: + namespaces: + from: All + + - name: headlamp-https + port: 443 + protocol: HTTPS + hostname: k8s.yc.infra.itqdev.xyz + tls: + mode: Terminate + certificateRefs: + - kind: Secret + group: "" + name: headlamp-tls + allowedRoutes: + namespaces: + from: All + + - name: argocd-https + port: 443 + protocol: HTTPS + hostname: argocd.yc.infra.itqdev.xyz + tls: + mode: Terminate + certificateRefs: + - kind: Secret + group: "" + name: argocd-tls + allowedRoutes: + namespaces: + from: All + + - name: grafana-https + port: 443 + protocol: HTTPS + hostname: grafana.yc.infra.itqdev.xyz + tls: + mode: Terminate + certificateRefs: + - kind: Secret + group: "" + name: grafana-tls + allowedRoutes: + namespaces: + from: All + + - name: karmada-tls + port: 443 + protocol: TLS + hostname: karmada.yc.infra.itqdev.xyz + tls: + mode: Passthrough + allowedRoutes: + namespaces: + from: All diff --git a/yc-lab/manifests/grafana/dashboards/cilium-envoy-downstream.yaml b/yc-lab/manifests/grafana/dashboards/cilium-envoy-downstream.yaml new file mode 100644 index 0000000..bf89127 --- /dev/null +++ b/yc-lab/manifests/grafana/dashboards/cilium-envoy-downstream.yaml @@ -0,0 +1,1661 @@ +apiVersion: v1 +data: + cilium-envoy-downstream.json: | + { + "apiVersion": "dashboard.grafana.app/v2", + "kind": "Dashboard", + "metadata": { + "name": "cilium-envoy-downstream", + "namespace": "default", + "uid": "81e7cf4f-337e-4cf4-84bf-72b59933fb38", + "resourceVersion": "1788358523093980", + "generation": 1, + "creationTimestamp": "2026-09-02T14:15:22Z", + "labels": { + "grafana.app/deprecatedInternalID": "979789907939328" + }, + "annotations": { + "grafana.app/createdBy": "user:cfx1picle4dmod", + "grafana.app/saved-from-ui": "Grafana v13.2.0 (f681b1359f)" + } + }, + "spec": { + "annotations": [ + { + "kind": "AnnotationQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "grafana", + "version": "v0", + "datasource": { + "name": "-- Grafana --" + }, + "spec": {} + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "builtIn": true, + "legacyOptions": { + "type": "dashboard" + } + } + } + ], + "cursorSync": "Off", + "description": "Detailed downstream connection monitoring for Envoy proxy. Tracks client-facing metrics including request rates, latency percentiles (P50/P95/P99), success rates, active connections, connection lifecycle events, bandwidth usage, and request reset patterns for each HTTP connection manager. Use this dashboard to analyze client behavior, diagnose connection issues, monitor ingress traffic patterns, and identify potential DDoS or abuse scenarios. Supports multi-prefix selection for comparative analysis. The dashboards were generated using [envoy-mixin](https://github.com/adinhodovic/envoy-mixin). Open issues and create feature requests in the repository.", + "editable": false, + "elements": { + "panel-10": { + "kind": "Panel", + "spec": { + "id": 10, + "title": "Downstream Success Rate (Including 4xx errors)", + "description": "Overall client success rate including both 4xx and 5xx as failures. Represents actual end-user experience. Drops may indicate authentication failures, invalid client requests, API contract violations, or backend errors. Use this metric for user-facing SLOs and customer impact assessment.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_http_downstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=\"$envoy_http_conn_manager_prefix\"\n,\n envoy_response_code_class!~\"4|5\"\n }[$__rate_interval]\n )\n)\n/\nsum(\n rate(\n envoy_http_downstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n)\n* 100\n", + "legendFormat": "Success Rate" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "percent", + "custom": { + "axisSoftMax": 100, + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-11": { + "kind": "Panel", + "spec": { + "id": 11, + "title": "Downstream Rate by Code Class", + "description": "Client request rate by HTTP status code class (2xx/3xx/4xx/5xx). Normal traffic is dominated by 2xx. Spikes in 4xx may indicate authentication problems, API misuse, or client bugs. Any 5xx indicates service failures. Monitor 401/403 for security issues and 429 for rate limiting effectiveness.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_http_downstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }[$__rate_interval]\n )\n) by (envoy_response_code_class)\n", + "legendFormat": "{{ envoy_response_code_class }}xx" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps", + "custom": { + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-12": { + "kind": "Panel", + "spec": { + "id": 12, + "title": "Downstream Connections", + "description": "Client connection lifecycle metrics. Active shows current open connections. Destroyed tracks normal connection teardown. High idle timeouts may indicate misconfigured clients, slow clients, or aggressive timeout settings. Correlate with request rates to identify connection efficiency issues.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n envoy_http_downstream_cx_active{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=\"$envoy_http_conn_manager_prefix\"\n\n }\n) by (envoy_http_conn_manager_prefix)\n", + "legendFormat": "Active Connections" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n increase(\n envoy_http_downstream_cx_destroy{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n) by (envoy_http_conn_manager_prefix)\n", + "legendFormat": "Destroyed Connections" + } + }, + "refId": "B", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n increase(\n envoy_http_downstream_cx_idle_timeout{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n) by (envoy_http_conn_manager_prefix)\n", + "legendFormat": "Idle Timeout" + } + }, + "refId": "C", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "custom": { + "fillOpacity": 10 + } + }, + "overrides": [] + } + } + } + } + }, + "panel-13": { + "kind": "Panel", + "spec": { + "id": 13, + "title": "Downstream Connection Bytes", + "description": "Bandwidth usage for client traffic. Received shows data from clients (request bodies, uploads). Transmitted shows data to clients (response bodies, downloads). Use to identify bandwidth-heavy endpoints, detect large file transfers, and plan capacity. Sudden spikes may indicate data exfiltration or abuse.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_http_downstream_cx_rx_bytes_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n) by (envoy_http_conn_manager_prefix)\n", + "legendFormat": "Received" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_http_downstream_cx_tx_bytes_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n) by (envoy_http_conn_manager_prefix)\n", + "legendFormat": "Transmitted" + } + }, + "refId": "B", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "Bps", + "custom": { + "fillOpacity": 10 + } + }, + "overrides": [] + } + } + } + } + }, + "panel-14": { + "kind": "Panel", + "spec": { + "id": 14, + "title": "Downstream Request Resets", + "description": "Abnormal request termination patterns. RX Reset = client aborted request (client disconnect, timeout). TX Reset = Envoy terminated response (upstream failure, policy violation). Timeouts = request exceeded configured deadline. High rates indicate client issues, network problems, or slow backends.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_http_downstream_rq_rx_reset{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n) by (envoy_http_conn_manager_prefix)\n", + "legendFormat": "RX Reset" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_http_downstream_rq_tx_reset{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n) by (envoy_http_conn_manager_prefix)\n", + "legendFormat": "TX Reset" + } + }, + "refId": "B", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_http_downstream_rq_timeout{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n) by (envoy_http_conn_manager_prefix)\n", + "legendFormat": "Timeout" + } + }, + "refId": "C", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps", + "custom": { + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-15": { + "kind": "Panel", + "spec": { + "id": 15, + "title": "Downstream Rate by Pod", + "description": "Client traffic distribution across Envoy proxy pods for this connection manager. Should show even distribution if load balancing works correctly. Imbalanced traffic may indicate L4 load balancer issues, DNS problems, or client-side connection affinity. Use to verify horizontal scaling effectiveness.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_http_downstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n) by (pod, envoy_http_conn_manager_prefix)\n", + "legendFormat": "{{ pod }}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps", + "custom": { + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-16": { + "kind": "Panel", + "spec": { + "id": 16, + "title": "Downstream Active Connections by Pod", + "description": "Active client connections per Envoy pod for this connection manager. Should correlate with request rates and show balanced distribution. High connections with low requests indicate long-lived connections (WebSockets, streaming). Uneven distribution suggests load balancer or DNS issues requiring investigation.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n envoy_http_downstream_cx_active{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=\"$envoy_http_conn_manager_prefix\"\n\n }\n) by (pod, envoy_http_conn_manager_prefix)\n", + "legendFormat": "{{ pod }}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "custom": { + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-2": { + "kind": "Panel", + "spec": { + "id": 2, + "title": "Downstreams Count by Job", + "description": "Distribution of downstream HTTP connection managers across different Prometheus job labels. Helps understand how client-facing listeners are organized across Envoy deployments or environments. Imbalanced distribution may indicate configuration inconsistencies.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "count(\n envoy_http_downstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }\n) by (job)\n", + "instant": true, + "legendFormat": "{{ job }}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "piechart", + "version": "v11.4.0", + "spec": { + "options": { + "displayLabels": [ + "percent" + ], + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "percent" + ] + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "downstreams" + }, + "overrides": [] + } + } + } + } + }, + "panel-3": { + "kind": "Panel", + "spec": { + "id": 3, + "title": "Downstream Rate by Envoy HTTP Conn Manager Prefix [1h]", + "description": "Request rate distribution across downstream connection managers over the past hour (top 20). Identifies which ingress points receive the most client traffic. Use this to validate traffic routing, detect unexpected traffic patterns, and identify hot spots requiring load balancing adjustments.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "topk(20,\n sum(\n rate(\n envoy_http_downstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }[1h]\n )\n ) by (envoy_http_conn_manager_prefix)\n)\n", + "instant": true, + "legendFormat": "{{ envoy_http_conn_manager_prefix }}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "piechart", + "version": "v11.4.0", + "spec": { + "options": { + "displayLabels": [ + "percent" + ], + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "percent" + ] + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps" + }, + "overrides": [] + } + } + } + } + }, + "panel-4": { + "kind": "Panel", + "spec": { + "id": 4, + "title": "Downstream Rate by Code Class [1h]", + "description": "Breakdown of client responses by HTTP status code class over the past hour. Healthy services show 95%+ 2xx responses. High 4xx proportions indicate client errors, authentication issues, or invalid requests. Any 5xx responses indicate service failures requiring immediate investigation.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "sum(\n rate(\n envoy_http_downstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }[1h]\n )\n) by (envoy_response_code_class)\n", + "instant": true, + "legendFormat": "{{ envoy_response_code_class }}xx" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "piechart", + "version": "v11.4.0", + "spec": { + "options": { + "displayLabels": [ + "percent" + ], + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "percent" + ] + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps" + }, + "overrides": [] + } + } + } + } + }, + "panel-5": { + "kind": "Panel", + "spec": { + "id": 5, + "title": "Downstream Active Connections by Envoy HTTP Conn Manager Prefix", + "description": "Distribution of currently active client connections across HTTP connection managers. Shows which ingress points are handling the most concurrent connections. High connection counts relative to request rates may indicate slow clients, long-polling connections, or WebSocket traffic.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "topk(20,\n sum(\n envoy_http_downstream_cx_active{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }\n ) by (envoy_http_conn_manager_prefix)\n)\n", + "instant": true, + "legendFormat": "{{ envoy_http_conn_manager_prefix }}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "piechart", + "version": "v11.4.0", + "spec": { + "options": { + "displayLabels": [ + "percent" + ], + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "percent" + ] + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "short" + }, + "overrides": [] + } + } + } + } + }, + "panel-7": { + "kind": "Panel", + "spec": { + "id": 7, + "title": "Downstream Rate", + "description": "Client request rate per HTTP connection manager over time. Each line represents traffic to a specific ingress listener. Sudden spikes may indicate traffic surges, DDoS attacks, or sudden popularity. Drops suggest client-side issues or upstream routing changes. Use to monitor ingress traffic patterns.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_http_downstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n) by (envoy_http_conn_manager_prefix)\n", + "legendFormat": "{{ envoy_http_conn_manager_prefix }}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps", + "custom": { + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-8": { + "kind": "Panel", + "spec": { + "id": 8, + "title": "Downstream Latency", + "description": "End-to-end request latency as experienced by clients. P50 shows typical response time, P95/P99 reveal tail latency impacting user experience. Rising tail latency often precedes user complaints. Investigate when P95 exceeds SLOs. Correlate with upstream latency to identify bottlenecks. Exemplars enable trace-based debugging.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "histogram_quantile(\n 0.5,\n sum(\n rate(\n envoy_http_downstream_rq_time_bucket{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n ) by (le)\n)\n", + "legendFormat": "P50" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "histogram_quantile(\n 0.95,\n sum(\n rate(\n envoy_http_downstream_rq_time_bucket{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n ) by (le)\n)\n", + "legendFormat": "P95" + } + }, + "refId": "B", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": true, + "expr": "histogram_quantile(\n 0.99,\n sum(\n rate(\n envoy_http_downstream_rq_time_bucket{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n ) by (le)\n)\n", + "legendFormat": "P99" + } + }, + "refId": "C", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "ms", + "custom": { + "fillOpacity": 10 + } + }, + "overrides": [] + } + } + } + } + }, + "panel-9": { + "kind": "Panel", + "spec": { + "id": 9, + "title": "Downstream Success Rate (Excluding 4xx errors)", + "description": "Client success rate excluding 4xx errors (treating client errors as successful). Values below 99.9% indicate service-side problems. Drops correlate with backend failures or Envoy issues. Compare with upstream success rates to determine if failures originate from backends or proxy layer.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_http_downstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=\"$envoy_http_conn_manager_prefix\"\n,\n envoy_response_code_class!=\"5\"\n }[$__rate_interval]\n )\n)\n/\nsum(\n rate(\n envoy_http_downstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n)\n* 100\n", + "legendFormat": "Success Rate" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "percent", + "custom": { + "axisSoftMax": 100, + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + } + }, + "layout": { + "kind": "RowsLayout", + "spec": { + "rows": [ + { + "kind": "RowsLayoutRow", + "spec": { + "title": "Summary", + "collapse": false, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 4, + "width": 6, + "height": 6, + "element": { + "kind": "ElementReference", + "name": "panel-2" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 6, + "y": 4, + "width": 6, + "height": 6, + "element": { + "kind": "ElementReference", + "name": "panel-3" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 4, + "width": 6, + "height": 6, + "element": { + "kind": "ElementReference", + "name": "panel-4" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 18, + "y": 4, + "width": 6, + "height": 6, + "element": { + "kind": "ElementReference", + "name": "panel-5" + } + } + } + ] + } + } + } + }, + { + "kind": "RowsLayoutRow", + "spec": { + "title": "$envoy_http_conn_manager_prefix", + "collapse": false, + "repeat": { + "mode": "variable", + "value": "envoy_http_conn_manager_prefix" + }, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-7" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 0, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-8" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 8, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-9" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 8, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-10" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 16, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-11" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 16, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-12" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 24, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-13" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 24, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-14" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 32, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-15" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 32, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-16" + } + } + } + ] + } + } + } + } + ] + } + }, + "links": [ + { + "title": "Envoy", + "type": "dashboards", + "icon": "", + "tooltip": "", + "tags": [ + "envoy", + "envoy-mixin", + "gateway" + ], + "asDropdown": true, + "targetBlank": true, + "includeVars": false, + "keepTime": true + } + ], + "liveNow": false, + "preload": false, + "tags": [ + "envoy", + "envoy-mixin", + "gateway" + ], + "timeSettings": { + "timezone": "utc", + "from": "now-6h", + "to": "now", + "autoRefresh": "", + "autoRefreshIntervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "hideTimepicker": false, + "fiscalYearStartMonth": 0 + }, + "title": "Cilium / Envoy / Downstream", + "variables": [ + { + "kind": "DatasourceVariable", + "spec": { + "name": "datasource", + "pluginId": "prometheus", + "refresh": "never", + "regex": "", + "current": { + "text": "default", + "value": "default" + }, + "options": [], + "multi": false, + "includeAll": false, + "label": "Data source", + "hide": "dontHide", + "skipUrlSync": false, + "allowCustomValue": true + } + }, + { + "kind": "QueryVariable", + "spec": { + "name": "cluster", + "current": { + "text": "", + "value": "" + }, + "label": "Cluster", + "hide": "hideVariable", + "refresh": "onTimeRangeChanged", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "${datasource}" + }, + "spec": { + "__legacyStringValue": "label_values(envoy_cluster_upstream_rq_xx{}, cluster)" + } + }, + "regex": "", + "sort": "alphabeticalAsc", + "options": [], + "multi": false, + "includeAll": false, + "allowCustomValue": true + } + }, + { + "kind": "QueryVariable", + "spec": { + "name": "namespace", + "current": { + "text": "", + "value": "" + }, + "label": "Namespace", + "hide": "dontHide", + "refresh": "onTimeRangeChanged", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "${datasource}" + }, + "spec": { + "__legacyStringValue": "label_values(envoy_cluster_upstream_rq_xx{cluster=\"$cluster\"}, namespace)" + } + }, + "regex": "", + "sort": "alphabeticalAsc", + "options": [], + "multi": true, + "includeAll": true, + "allowCustomValue": true + } + }, + { + "kind": "QueryVariable", + "spec": { + "name": "job", + "current": { + "text": "", + "value": "" + }, + "label": "Job", + "hide": "dontHide", + "refresh": "onTimeRangeChanged", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "${datasource}" + }, + "spec": { + "__legacyStringValue": "label_values(envoy_cluster_upstream_rq_xx{cluster=\"$cluster\", namespace=~\"$namespace\"}, job)" + } + }, + "regex": "", + "sort": "alphabeticalAsc", + "options": [], + "multi": true, + "includeAll": true, + "allowCustomValue": true + } + }, + { + "kind": "QueryVariable", + "spec": { + "name": "envoy_http_conn_manager_prefix", + "current": { + "text": "", + "value": "" + }, + "label": "Envoy HTTP Conn Manager Prefix", + "hide": "dontHide", + "refresh": "onTimeRangeChanged", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "${datasource}" + }, + "spec": { + "__legacyStringValue": "label_values(envoy_http_downstream_rq_xx{cluster=\"$cluster\", namespace=~\"$namespace\", job=~\"$job\"}, envoy_http_conn_manager_prefix)" + } + }, + "regex": "", + "sort": "alphabeticalAsc", + "options": [], + "multi": true, + "includeAll": false, + "allowCustomValue": true + } + }, + { + "kind": "QueryVariable", + "spec": { + "name": "pod", + "current": { + "text": "", + "value": "" + }, + "label": "Pod", + "hide": "dontHide", + "refresh": "onTimeRangeChanged", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "${datasource}" + }, + "spec": { + "__legacyStringValue": "label_values(envoy_listener_http_downstream_rq_xx{cluster=\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", envoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"}, pod)" + } + }, + "regex": "", + "sort": "alphabeticalAsc", + "options": [], + "multi": true, + "includeAll": true, + "allowCustomValue": true + } + } + ] + } + } +kind: ConfigMap +metadata: + name: cilium-envoy-downstream-grafana-dashboard + namespace: kube-system + labels: + grafana_dashboard: "1" diff --git a/yc-lab/manifests/grafana/dashboards/cilium-envoy-overview.yaml b/yc-lab/manifests/grafana/dashboards/cilium-envoy-overview.yaml new file mode 100644 index 0000000..1060ef5 --- /dev/null +++ b/yc-lab/manifests/grafana/dashboards/cilium-envoy-overview.yaml @@ -0,0 +1,2941 @@ +apiVersion: v1 +data: + cilium-envoy-overview.json: | + { + "apiVersion": "dashboard.grafana.app/v2", + "kind": "Dashboard", + "metadata": { + "name": "cilium-envoy-overview", + "namespace": "default", + "uid": "643b15c8-d5f1-4e4c-81e3-553a20c07b06", + "resourceVersion": "1788358339231006", + "generation": 1, + "creationTimestamp": "2026-09-02T14:12:19Z", + "labels": { + "grafana.app/deprecatedInternalID": "979019200385024" + }, + "annotations": { + "grafana.app/createdBy": "user:cfx1picle4dmod", + "grafana.app/saved-from-ui": "Grafana v13.2.0 (f681b1359f)" + } + }, + "spec": { + "annotations": [ + { + "kind": "AnnotationQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "grafana", + "version": "v0", + "datasource": { + "name": "-- Grafana --" + }, + "spec": {} + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "builtIn": true, + "legacyOptions": { + "type": "dashboard" + } + } + } + ], + "cursorSync": "Off", + "description": "A comprehensive overview dashboard for monitoring Envoy proxy deployments. Provides high-level metrics across all upstreams and downstreams including request rates, latency percentiles, success rates, active connections, and SSL certificate expirations. Use this dashboard to identify trends, spot anomalies, and drill down into specific upstream clusters or downstream connection managers. The dashboards were generated using [envoy-mixin](https://github.com/adinhodovic/envoy-mixin). Open issues and create feature requests in the repository.", + "editable": false, + "elements": { + "panel-10": { + "kind": "Panel", + "spec": { + "id": 10, + "title": "Downstream Rate by Envoy HTTP Conn Manager Prefix [1h]", + "description": "Distribution of incoming client traffic across different HTTP connection managers (listeners) over the past hour. Helps identify which ingress points receive the most traffic and validate routing configurations.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "topk(20,\n sum(\n rate(\n envoy_http_downstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[1h]\n )\n ) by (envoy_http_conn_manager_prefix)\n)\n", + "instant": true, + "legendFormat": "{{ envoy_http_conn_manager_prefix }}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "piechart", + "version": "v11.4.0", + "spec": { + "options": { + "displayLabels": [ + "percent" + ], + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "percent" + ] + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps" + }, + "overrides": [] + } + } + } + } + }, + "panel-11": { + "kind": "Panel", + "spec": { + "id": 11, + "title": "Upstream Rate by Pod [1h]", + "description": "Distribution of upstream requests across Envoy proxy pods over the past hour. Use this to verify load balancing across proxy instances and identify if specific pods are handling disproportionate traffic, which may indicate scaling or routing issues.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[1h]\n )\n) by (pod)\n", + "instant": true, + "legendFormat": "{{ pod }}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "piechart", + "version": "v11.4.0", + "spec": { + "options": { + "displayLabels": [ + "percent" + ], + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "percent" + ] + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps" + }, + "overrides": [] + } + } + } + } + }, + "panel-13": { + "kind": "Panel", + "spec": { + "id": 13, + "title": "Upstream Rate", + "description": "Aggregated upstream request rate across all selected clusters over time. Shows overall backend traffic volume. Sudden drops may indicate upstream failures or circuit breaker activations. Spikes could indicate retry storms or traffic surges.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n)\n", + "legendFormat": "Upstream" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps", + "custom": { + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-14": { + "kind": "Panel", + "spec": { + "id": 14, + "title": "Upstream Latency", + "description": "Upstream request latency percentiles (P50, P95, P99) measured from Envoy to backend services. Includes connection establishment, request transmission, backend processing, and response receipt. Increasing P95/P99 often indicates backend degradation before P50 is affected. Use exemplars to trace high-latency requests.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "histogram_quantile(\n 0.5,\n sum(\n rate(\n envoy_cluster_upstream_rq_time_bucket{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n ) by (le)\n)\n", + "legendFormat": "P50" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "histogram_quantile(\n 0.95,\n sum(\n rate(\n envoy_cluster_upstream_rq_time_bucket{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n ) by (le)\n)\n", + "legendFormat": "P95" + } + }, + "refId": "B", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": true, + "expr": "histogram_quantile(\n 0.99,\n sum(\n rate(\n envoy_cluster_upstream_rq_time_bucket{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n ) by (le)\n)\n", + "legendFormat": "P99" + } + }, + "refId": "C", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "ms", + "custom": { + "fillOpacity": 10 + } + }, + "overrides": [] + } + } + } + } + }, + "panel-15": { + "kind": "Panel", + "spec": { + "id": 15, + "title": "Upstream Success Rate (Excluding 4xx errors)", + "description": "Percentage of successful upstream requests (non-5xx responses). This metric treats 4xx errors as successful since they typically indicate client issues, not backend failures. Values below 99.9% may indicate backend health problems. Correlate drops with circuit breaker openings and health check failures.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n,\n envoy_response_code_class!=\"5\"\n }[$__rate_interval]\n )\n)\n/\nsum(\n rate(\n envoy_cluster_upstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n)\n* 100\n", + "legendFormat": "Success Rate" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "percent", + "custom": { + "axisSoftMax": 100, + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-16": { + "kind": "Panel", + "spec": { + "id": 16, + "title": "Upstream Success Rate (Including 4xx errors)", + "description": "Percentage of successful upstream requests (non-4xx/5xx responses). This stricter metric counts both client errors (4xx) and server errors (5xx) as failures. Use this to assess overall request success from an end-user perspective. Lower rates may indicate API contract issues, authentication problems, or backend failures.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n,\n envoy_response_code_class!~\"4|5\"\n }[$__rate_interval]\n )\n)\n/\nsum(\n rate(\n envoy_cluster_upstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n)\n* 100\n", + "legendFormat": "Success Rate" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "percent", + "custom": { + "axisSoftMax": 100, + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-17": { + "kind": "Panel", + "spec": { + "id": 17, + "title": "Upstream Overview [1h]", + "description": "An overview table showing various upstream metrics by Envoy cluster name [1h].", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "topk(40,\n sum(\n rate(\n envoy_cluster_upstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[1h]\n )\n ) by (envoy_cluster_name)\n)\n", + "format": "table", + "instant": true + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n,\n envoy_response_code_class!=\"5\"\n }[1h]\n )\n) by (job, envoy_cluster_name)\n/\nsum(\n rate(\n envoy_cluster_upstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[1h]\n )\n) by (job, envoy_cluster_name)\n* 100\nand on (envoy_cluster_name) (\n topk(40,\n sum(\n rate(\n envoy_cluster_upstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[1h]\n )\n ) by (envoy_cluster_name)\n)\n\n)\n\n", + "format": "table", + "instant": true + } + }, + "refId": "B", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n,\n envoy_response_code_class!~\"4|5\"\n }[1h]\n )\n) by (job, envoy_cluster_name)\n/\nsum(\n rate(\n envoy_cluster_upstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[1h]\n )\n) by (job, envoy_cluster_name)\n* 100\nand on (envoy_cluster_name) (\n topk(40,\n sum(\n rate(\n envoy_cluster_upstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[1h]\n )\n ) by (envoy_cluster_name)\n)\n\n)\n\n", + "format": "table", + "instant": true + } + }, + "refId": "C", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "histogram_quantile(\n 0.5,\n sum(\n rate(\n envoy_cluster_upstream_rq_time_bucket{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[1h]\n )\n ) by (le, job, envoy_cluster_name)\n)\nand on (envoy_cluster_name) (\n topk(40,\n sum(\n rate(\n envoy_cluster_upstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[1h]\n )\n ) by (envoy_cluster_name)\n)\n\n)\n\n", + "format": "table", + "instant": true + } + }, + "refId": "D", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "histogram_quantile(\n 0.95,\n sum(\n rate(\n envoy_cluster_upstream_rq_time_bucket{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[1h]\n )\n ) by (le, job, envoy_cluster_name)\n)\nand on (envoy_cluster_name) (\n topk(40,\n sum(\n rate(\n envoy_cluster_upstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[1h]\n )\n ) by (envoy_cluster_name)\n)\n\n)\n\n", + "format": "table", + "instant": true + } + }, + "refId": "E", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "sum(\n avg_over_time(\n envoy_cluster_upstream_cx_active{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[1h]\n )\n) by (job, envoy_cluster_name)\nand on (envoy_cluster_name) (\n topk(40,\n sum(\n rate(\n envoy_cluster_upstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[1h]\n )\n ) by (envoy_cluster_name)\n)\n\n)\n\n", + "format": "table", + "instant": true + } + }, + "refId": "F", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "sum(\n increase(\n envoy_cluster_upstream_cx_destroy{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[1h]\n )\n) by (job, envoy_cluster_name)\nand on (envoy_cluster_name) (\n topk(40,\n sum(\n rate(\n envoy_cluster_upstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[1h]\n )\n ) by (envoy_cluster_name)\n)\n\n)\n\n", + "format": "table", + "instant": true + } + }, + "refId": "G", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "sum(\n envoy_cluster_membership_healthy{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }\n) by (job, envoy_cluster_name)\n/\nsum(\n envoy_cluster_membership_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }\n) by (job, envoy_cluster_name)\n* 100\nand on (envoy_cluster_name) (\n topk(40,\n sum(\n rate(\n envoy_cluster_upstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[1h]\n )\n ) by (envoy_cluster_name)\n)\n\n)\n\n", + "format": "table", + "instant": true + } + }, + "refId": "H", + "hidden": false + } + } + ], + "transformations": [ + { + "kind": "Transformation", + "group": "merge", + "spec": { + "options": null + } + }, + { + "kind": "Transformation", + "group": "organize", + "spec": { + "options": { + "excludeByName": { + "Time": true + }, + "indexByName": { + "Value #A": 2, + "Value #B": 3, + "Value #C": 4, + "Value #D": 5, + "Value #E": 6, + "Value #F": 7, + "Value #G": 8, + "Value #H": 9, + "Value #I": 10, + "envoy_cluster_name": 0, + "job": 1 + }, + "renameByName": { + "Value #A": "Request Rate", + "Value #B": "Success Rate (5xx)", + "Value #C": "Success Rate (4xx & 5xx)", + "Value #D": "P50 Latency", + "Value #E": "P95 Latency", + "Value #F": "Active Connections", + "Value #G": "Destroyed Connections", + "Value #H": "Healthy Cluster Percent", + "envoy_cluster_name": "Envoy Cluster Name", + "job": "Job" + } + } + } + } + ], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "table", + "version": "v11.4.0", + "spec": { + "options": { + "footer": { + "enablePagination": true + }, + "sortBy": [ + { + "desc": true, + "displayName": "Request Rate" + } + ] + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "thresholds": { + "mode": "", + "steps": [] + }, + "links": [ + { + "targetBlank": true, + "title": "Go To Upstream", + "type": "dashboard", + "url": "/d/envoy-upstream-skj2/envoy-upstream?&var-envoy_cluster_name=${__data.fields.Envoy Cluster Name}" + } + ] + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "SSL Expirations" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeFromNow" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "P50 Latency" + }, + "properties": [ + { + "id": "unit", + "value": "ms" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "P95 Latency" + }, + "properties": [ + { + "id": "unit", + "value": "ms" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Request Rate" + }, + "properties": [ + { + "id": "unit", + "value": "reqps" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Success Rate (5xx)" + }, + "properties": [ + { + "id": "unit", + "value": "percent" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Success Rate (4xx & 5xx)" + }, + "properties": [ + { + "id": "unit", + "value": "percent" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Healthy Cluster Percent" + }, + "properties": [ + { + "id": "unit", + "value": "percent" + } + ] + } + ] + } + } + } + } + }, + "panel-19": { + "kind": "Panel", + "spec": { + "id": 19, + "title": "Downstream Rate by Envoy HTTP Conn Manager Prefix", + "description": "Client request rate by HTTP connection manager (listener) over time. Shows top 20 busiest ingress points. Use this to identify traffic patterns, detect sudden spikes that may indicate attacks, or validate that traffic is being distributed as expected across listeners.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "topk(20,\n sum(\n rate(\n envoy_http_downstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n ) by (envoy_http_conn_manager_prefix)\n)\n", + "legendFormat": "{{ envoy_http_conn_manager_prefix }}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps", + "custom": { + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-2": { + "kind": "Panel", + "spec": { + "id": 2, + "title": "Envoy Pods", + "description": "Total number of Envoy proxy pods currently being monitored. A sudden drop may indicate pod crashes or deployment issues, while increases should align with scaling events.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "count(\n count (\n envoy_cluster_upstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }\n ) by (pod)\n)\n" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "v11.4.0", + "spec": { + "options": { + "graphMode": "area", + "percentChangeColorMode": "standard", + "showPercentChange": false + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "thresholds": { + "mode": "", + "steps": [ + { + "value": 0, + "color": "green" + } + ] + } + }, + "overrides": [] + } + } + } + } + }, + "panel-20": { + "kind": "Panel", + "spec": { + "id": 20, + "title": "Downstream Latency", + "description": "End-to-end request latency percentiles (P50, P95, P99) as experienced by clients. Includes time from request receipt to response completion. Rising P95/P99 indicates degraded user experience - investigate upstream latency, connection issues, or resource constraints. Use exemplars to trace slow requests.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "histogram_quantile(\n 0.5,\n sum(\n rate(\n envoy_http_downstream_rq_time_bucket{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n ) by (le)\n)\n", + "legendFormat": "P50" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "histogram_quantile(\n 0.95,\n sum(\n rate(\n envoy_http_downstream_rq_time_bucket{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n ) by (le)\n)\n", + "legendFormat": "P95" + } + }, + "refId": "B", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": true, + "expr": "histogram_quantile(\n 0.99,\n sum(\n rate(\n envoy_http_downstream_rq_time_bucket{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n ) by (le)\n)\n", + "legendFormat": "P99" + } + }, + "refId": "C", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "ms", + "custom": { + "fillOpacity": 10 + } + }, + "overrides": [] + } + } + } + } + }, + "panel-21": { + "kind": "Panel", + "spec": { + "id": 21, + "title": "Downstream Success Rate (Excluding 4xx errors)", + "description": "Percentage of successful client requests (non-5xx responses). Treats 4xx as successful since they indicate client errors, not service failures. Values below 99.9% indicate problems with backends or Envoy itself. Correlate with upstream metrics and error logs to diagnose issues.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_http_downstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n,\n envoy_response_code_class!=\"5\"\n }[$__rate_interval]\n )\n)\n/\nsum(\n rate(\n envoy_http_downstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n)\n* 100\n", + "legendFormat": "Success Rate" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "percent", + "custom": { + "axisSoftMax": 100, + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-22": { + "kind": "Panel", + "spec": { + "id": 22, + "title": "Downstream Success Rate (Including 4xx errors)", + "description": "Percentage of successful client requests (non-4xx/5xx responses). Stricter metric counting both client and server errors as failures. Reflects actual user experience - drops indicate authentication issues, invalid requests, or backend failures. Use to assess overall API health from client perspective.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_http_downstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n,\n envoy_response_code_class!~\"4|5\"\n }[$__rate_interval]\n )\n)\n/\nsum(\n rate(\n envoy_http_downstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[$__rate_interval]\n )\n)\n* 100\n", + "legendFormat": "Success Rate" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "percent", + "custom": { + "axisSoftMax": 100, + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-23": { + "kind": "Panel", + "spec": { + "id": 23, + "title": "Downstream Overview [1h]", + "description": "An overview table showing various downstream metrics by Envoy HTTP connection manager prefix [1h].", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "topk(40,\n sum(\n rate(\n envoy_http_downstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[1h]\n )\n ) by (envoy_http_conn_manager_prefix)\n)\n", + "format": "table", + "instant": true + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "sum(\n rate(\n envoy_http_downstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n,\n envoy_response_code_class!=\"5\"\n }[1h]\n )\n) by (job, envoy_http_conn_manager_prefix)\n/\nsum(\n rate(\n envoy_http_downstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[1h]\n )\n) by (job, envoy_http_conn_manager_prefix)\n* 100\nand on (envoy_http_conn_manager_prefix) (\n topk(40,\n sum(\n rate(\n envoy_http_downstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[1h]\n )\n ) by (envoy_http_conn_manager_prefix)\n)\n\n)\n\n", + "format": "table", + "instant": true + } + }, + "refId": "B", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "sum(\n rate(\n envoy_http_downstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n,\n envoy_response_code_class!~\"4|5\"\n }[1h]\n )\n) by (job, envoy_http_conn_manager_prefix)\n/\nsum(\n rate(\n envoy_http_downstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[1h]\n )\n) by (job, envoy_http_conn_manager_prefix)\n* 100\nand on (envoy_http_conn_manager_prefix) (\n topk(40,\n sum(\n rate(\n envoy_http_downstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[1h]\n )\n ) by (envoy_http_conn_manager_prefix)\n)\n\n)\n\n", + "format": "table", + "instant": true + } + }, + "refId": "C", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "histogram_quantile(\n 0.5,\n sum(\n rate(\n envoy_http_downstream_rq_time_bucket{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[1h]\n )\n ) by (le, job, envoy_http_conn_manager_prefix)\n)\nand on (envoy_http_conn_manager_prefix) (\n topk(40,\n sum(\n rate(\n envoy_http_downstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[1h]\n )\n ) by (envoy_http_conn_manager_prefix)\n)\n\n)\n\n", + "format": "table", + "instant": true + } + }, + "refId": "D", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "histogram_quantile(\n 0.95,\n sum(\n rate(\n envoy_http_downstream_rq_time_bucket{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[1h]\n )\n ) by (le, job, envoy_http_conn_manager_prefix)\n)\nand on (envoy_http_conn_manager_prefix) (\n topk(40,\n sum(\n rate(\n envoy_http_downstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[1h]\n )\n ) by (envoy_http_conn_manager_prefix)\n)\n\n)\n\n", + "format": "table", + "instant": true + } + }, + "refId": "E", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "sum(\n avg_over_time(\n envoy_http_downstream_cx_active{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[1h]\n )\n) by (job, envoy_http_conn_manager_prefix)\nand on (envoy_http_conn_manager_prefix) (\n topk(40,\n sum(\n rate(\n envoy_http_downstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[1h]\n )\n ) by (envoy_http_conn_manager_prefix)\n)\n\n)\n\n", + "format": "table", + "instant": true + } + }, + "refId": "F", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "sum(\n increase(\n envoy_http_downstream_cx_destroy{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[1h]\n )\n) by (job, envoy_http_conn_manager_prefix)\nand on (envoy_http_conn_manager_prefix) (\n topk(40,\n sum(\n rate(\n envoy_http_downstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_http_conn_manager_prefix=~\"$envoy_http_conn_manager_prefix\"\n\n }[1h]\n )\n ) by (envoy_http_conn_manager_prefix)\n)\n\n)\n\n", + "format": "table", + "instant": true + } + }, + "refId": "G", + "hidden": false + } + } + ], + "transformations": [ + { + "kind": "Transformation", + "group": "merge", + "spec": { + "options": null + } + }, + { + "kind": "Transformation", + "group": "organize", + "spec": { + "options": { + "excludeByName": { + "Time": true + }, + "indexByName": { + "Value #A": 2, + "Value #B": 3, + "Value #C": 4, + "Value #D": 5, + "Value #E": 6, + "Value #F": 7, + "Value #G": 8, + "envoy_http_conn_manager_prefix": 0, + "job": 1 + }, + "renameByName": { + "Value #A": "Request Rate", + "Value #B": "Success Rate (5xx)", + "Value #C": "Success Rate (4xx & 5xx)", + "Value #D": "P50 Latency", + "Value #E": "P95 Latency", + "Value #F": "Active Connections", + "Value #G": "Destroyed Connections", + "envoy_http_conn_manager_prefix": "Envoy HTTP Conn Manager Prefix", + "job": "Job" + } + } + } + } + ], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "table", + "version": "v11.4.0", + "spec": { + "options": { + "footer": { + "enablePagination": true + }, + "sortBy": [ + { + "desc": true, + "displayName": "Request Rate" + } + ] + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "thresholds": { + "mode": "", + "steps": [] + }, + "links": [ + { + "targetBlank": true, + "title": "Go To Downstream", + "type": "dashboard", + "url": "/d/envoy-downstream-skj2/envoy-downstream?var-envoy_http_conn_manager_prefix=${__data.fields.Envoy HTTP Conn Manager Prefix}" + } + ] + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "P50 Latency" + }, + "properties": [ + { + "id": "unit", + "value": "ms" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "P95 Latency" + }, + "properties": [ + { + "id": "unit", + "value": "ms" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Request Rate" + }, + "properties": [ + { + "id": "unit", + "value": "reqps" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Success Rate (5xx)" + }, + "properties": [ + { + "id": "unit", + "value": "percent" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Success Rate (4xx & 5xx)" + }, + "properties": [ + { + "id": "unit", + "value": "percent" + } + ] + } + ] + } + } + } + } + }, + "panel-25": { + "kind": "Panel", + "spec": { + "id": 25, + "title": "HTTP/2 Outbound Flood", + "description": "Rate of connections terminated due to outbound HTTP/2 frame flood protection. Outbound Flood = total outbound frame queue (DATA, HEADERS, etc.) exceeded max_outbound_frames. Outbound Control Flood = control frame queue (PING, SETTINGS, RST_STREAM) exceeded max_outbound_control_frames. Non-zero values indicate slow or unresponsive clients unable to consume frames fast enough, or misconfigured flood limits.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_http2_outbound_flood{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }[$__rate_interval]\n )\n)\n", + "legendFormat": "Outbound Flood" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_http2_outbound_control_flood{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }[$__rate_interval]\n )\n)\n", + "legendFormat": "Outbound Control Flood" + } + }, + "refId": "B", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps", + "custom": { + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-26": { + "kind": "Panel", + "spec": { + "id": 26, + "title": "HTTP/2 Inbound Flood", + "description": "Rate of connections terminated due to inbound HTTP/2 frame flood protection. Empty Frames = consecutive frames with empty payload exceeded max_consecutive_inbound_frames_with_empty_payload. Priority Frames = PRIORITY frame flood exceeded max_inbound_priority_frames_per_stream. Window Update Frames = WINDOW_UPDATE flood exceeded max_inbound_window_update_frames_per_data_frame_sent. Any non-zero rate signals a potential HTTP/2 denial-of-service attack or severely misbehaving client.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_http2_inbound_empty_frames_flood{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }[$__rate_interval]\n )\n)\n", + "legendFormat": "Empty Frames" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_http2_inbound_priority_frames_flood{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }[$__rate_interval]\n )\n)\n", + "legendFormat": "Priority Frames" + } + }, + "refId": "B", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_http2_inbound_window_update_frames_flood{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }[$__rate_interval]\n )\n)\n", + "legendFormat": "Window Update Frames" + } + }, + "refId": "C", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps", + "custom": { + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-28": { + "kind": "Panel", + "spec": { + "id": 28, + "title": "SSL Expirations by Envoy TLS Certificate", + "description": "SSL/TLS certificate expiration dates for each certificate loaded by Envoy listeners. Displays minimum expiration time to highlight the most urgent renewal needed. Monitor this panel to prevent service disruptions due to expired certificates. Set up alerts for certificates expiring within 30 days.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "min(\n envoy_listener_ssl_certificate_expiration_unix_time_seconds{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }\n) by (job, envoy_tls_certificate)\n* 1000\n", + "legendFormat": "{{ envoy_tls_certificate }}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "min" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "min", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "dateTimeAsIso", + "custom": { + "fillOpacity": 10 + } + }, + "overrides": [] + } + } + } + } + }, + "panel-3": { + "kind": "Panel", + "spec": { + "id": 3, + "title": "Upstreams", + "description": "Total count of unique upstream clusters (backend services) configured across all Envoy proxies. Changes in this metric indicate service discovery updates or configuration changes.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "count(\n count(\n envoy_cluster_upstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }\n ) by (envoy_cluster_name)\n)\n" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "v11.4.0", + "spec": { + "options": { + "graphMode": "area", + "percentChangeColorMode": "standard", + "showPercentChange": false + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "thresholds": { + "mode": "", + "steps": [ + { + "value": 0, + "color": "green" + } + ] + } + }, + "overrides": [] + } + } + } + } + }, + "panel-4": { + "kind": "Panel", + "spec": { + "id": 4, + "title": "Downstreams", + "description": "Total count of downstream HTTP connection managers (ingress listeners) across all Envoy proxies. Represents the number of distinct entry points accepting client traffic.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "count(\n count(\n envoy_http_downstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }\n ) by (envoy_http_conn_manager_prefix)\n)\n" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "v11.4.0", + "spec": { + "options": { + "graphMode": "area", + "percentChangeColorMode": "standard", + "showPercentChange": false + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "thresholds": { + "mode": "", + "steps": [ + { + "value": 0, + "color": "green" + } + ] + } + }, + "overrides": [] + } + } + } + } + }, + "panel-5": { + "kind": "Panel", + "spec": { + "id": 5, + "title": "Upstream Active Connections", + "description": "Current number of active TCP connections from Envoy proxies to upstream services. High values may indicate connection pooling issues or slow backend responses. Compare with request rate to assess connection efficiency.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "sum(\n envoy_cluster_upstream_cx_active{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }\n)\n" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "v11.4.0", + "spec": { + "options": { + "graphMode": "area", + "percentChangeColorMode": "standard", + "showPercentChange": false + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "thresholds": { + "mode": "", + "steps": [ + { + "value": 0, + "color": "green" + } + ] + } + }, + "overrides": [] + } + } + } + } + }, + "panel-6": { + "kind": "Panel", + "spec": { + "id": 6, + "title": "Downstream Active Connections", + "description": "Current number of active TCP connections from clients to Envoy proxies. Sudden spikes may indicate traffic surges or slow request processing. Monitor alongside request rates to identify connection leaks.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "sum(\n envoy_http_downstream_cx_active{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }\n)\n" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "v11.4.0", + "spec": { + "options": { + "graphMode": "area", + "percentChangeColorMode": "standard", + "showPercentChange": false + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "thresholds": { + "mode": "", + "steps": [ + { + "value": 0, + "color": "green" + } + ] + } + }, + "overrides": [] + } + } + } + } + }, + "panel-7": { + "kind": "Panel", + "spec": { + "id": 7, + "title": "Membership Healthy Percent", + "description": "Percentage of healthy upstream endpoints across all clusters based on active health checks. Values below 100% indicate failing health checks - investigate unhealthy hosts immediately as this impacts traffic distribution and availability.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "sum(\n envoy_cluster_membership_healthy{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }\n)\n/\nsum(\n envoy_cluster_membership_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }\n)\n* 100\n" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "v11.4.0", + "spec": { + "options": { + "graphMode": "area", + "percentChangeColorMode": "standard", + "showPercentChange": false + }, + "fieldConfig": { + "defaults": { + "unit": "percent", + "thresholds": { + "mode": "", + "steps": [ + { + "value": 0, + "color": "green" + } + ] + } + }, + "overrides": [] + } + } + } + } + }, + "panel-8": { + "kind": "Panel", + "spec": { + "id": 8, + "title": "Upstream Rate by Envoy Cluster Name [1h]", + "description": "Distribution of upstream request traffic across backend clusters over the past hour. Shows which services receive the most traffic. Use this to identify hot spots, validate load distribution, and detect unexpected traffic patterns to specific backends.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "topk(20,\n sum(\n rate(\n envoy_cluster_upstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[1h]\n )\n ) by (envoy_cluster_name)\n)\n", + "instant": true, + "legendFormat": "{{ envoy_cluster_name }}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "piechart", + "version": "v11.4.0", + "spec": { + "options": { + "displayLabels": [ + "percent" + ], + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "percent" + ] + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps" + }, + "overrides": [] + } + } + } + } + }, + "panel-9": { + "kind": "Panel", + "spec": { + "id": 9, + "title": "Upstream Rate by Code Class [1h]", + "description": "Breakdown of upstream responses by HTTP status code class (2xx, 3xx, 4xx, 5xx) over the past hour. High proportions of 4xx may indicate client errors or misconfigurations, while 5xx indicates backend failures requiring immediate attention.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=~\"$envoy_cluster_name\"\n\n }[1h]\n )\n) by (envoy_response_code_class)\n", + "instant": true, + "legendFormat": "{{ envoy_response_code_class }}xx" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "piechart", + "version": "v11.4.0", + "spec": { + "options": { + "displayLabels": [ + "percent" + ], + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "percent" + ] + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps" + }, + "overrides": [] + } + } + } + } + } + }, + "layout": { + "kind": "RowsLayout", + "spec": { + "rows": [ + { + "kind": "RowsLayoutRow", + "spec": { + "title": "Summary", + "collapse": false, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 4, + "height": 4, + "element": { + "kind": "ElementReference", + "name": "panel-2" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 4, + "y": 0, + "width": 4, + "height": 4, + "element": { + "kind": "ElementReference", + "name": "panel-3" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 8, + "y": 0, + "width": 4, + "height": 4, + "element": { + "kind": "ElementReference", + "name": "panel-4" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 0, + "width": 4, + "height": 4, + "element": { + "kind": "ElementReference", + "name": "panel-5" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 16, + "y": 0, + "width": 4, + "height": 4, + "element": { + "kind": "ElementReference", + "name": "panel-6" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 20, + "y": 0, + "width": 4, + "height": 4, + "element": { + "kind": "ElementReference", + "name": "panel-7" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 4, + "width": 6, + "height": 6, + "element": { + "kind": "ElementReference", + "name": "panel-8" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 6, + "y": 4, + "width": 6, + "height": 6, + "element": { + "kind": "ElementReference", + "name": "panel-9" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 4, + "width": 6, + "height": 6, + "element": { + "kind": "ElementReference", + "name": "panel-10" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 18, + "y": 4, + "width": 6, + "height": 6, + "element": { + "kind": "ElementReference", + "name": "panel-11" + } + } + } + ] + } + } + } + }, + { + "kind": "RowsLayoutRow", + "spec": { + "title": "Upstream", + "collapse": false, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-13" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 0, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-14" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 8, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-15" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 8, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-16" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 16, + "width": 24, + "height": 12, + "element": { + "kind": "ElementReference", + "name": "panel-17" + } + } + } + ] + } + } + } + }, + { + "kind": "RowsLayoutRow", + "spec": { + "title": "Downstream", + "collapse": false, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-19" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 0, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-20" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 8, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-21" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 8, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-22" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 16, + "width": 24, + "height": 12, + "element": { + "kind": "ElementReference", + "name": "panel-23" + } + } + } + ] + } + } + } + }, + { + "kind": "RowsLayoutRow", + "spec": { + "title": "HTTP/2", + "collapse": false, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-25" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 0, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-26" + } + } + } + ] + } + } + } + }, + { + "kind": "RowsLayoutRow", + "spec": { + "title": "SSL", + "collapse": false, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 24, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-28" + } + } + } + ] + } + } + } + } + ] + } + }, + "links": [ + { + "title": "Envoy", + "type": "dashboards", + "icon": "", + "tooltip": "", + "tags": [ + "envoy", + "envoy-mixin", + "gateway" + ], + "asDropdown": true, + "targetBlank": true, + "includeVars": false, + "keepTime": true + } + ], + "liveNow": false, + "preload": false, + "tags": [ + "envoy", + "envoy-mixin", + "gateway" + ], + "timeSettings": { + "timezone": "utc", + "from": "now-6h", + "to": "now", + "autoRefresh": "", + "autoRefreshIntervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "hideTimepicker": false, + "fiscalYearStartMonth": 0 + }, + "title": "Cilium / Envoy / Overview", + "variables": [ + { + "kind": "DatasourceVariable", + "spec": { + "name": "datasource", + "pluginId": "prometheus", + "refresh": "never", + "regex": "", + "current": { + "text": "default", + "value": "default" + }, + "options": [], + "multi": false, + "includeAll": false, + "label": "Data source", + "hide": "dontHide", + "skipUrlSync": false, + "allowCustomValue": true + } + }, + { + "kind": "QueryVariable", + "spec": { + "name": "cluster", + "current": { + "text": "", + "value": "" + }, + "label": "Cluster", + "hide": "hideVariable", + "refresh": "onTimeRangeChanged", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "${datasource}" + }, + "spec": { + "__legacyStringValue": "label_values(envoy_cluster_upstream_rq_xx{}, cluster)" + } + }, + "regex": "", + "sort": "alphabeticalAsc", + "options": [], + "multi": false, + "includeAll": false, + "allowCustomValue": true + } + }, + { + "kind": "QueryVariable", + "spec": { + "name": "namespace", + "current": { + "text": "", + "value": "" + }, + "label": "Namespace", + "hide": "dontHide", + "refresh": "onTimeRangeChanged", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "${datasource}" + }, + "spec": { + "__legacyStringValue": "label_values(envoy_cluster_upstream_rq_xx{cluster=\"$cluster\"}, namespace)" + } + }, + "regex": "", + "sort": "alphabeticalAsc", + "options": [], + "multi": true, + "includeAll": true, + "allowCustomValue": true + } + }, + { + "kind": "QueryVariable", + "spec": { + "name": "job", + "current": { + "text": "", + "value": "" + }, + "label": "Job", + "hide": "dontHide", + "refresh": "onTimeRangeChanged", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "${datasource}" + }, + "spec": { + "__legacyStringValue": "label_values(envoy_cluster_upstream_rq_xx{cluster=\"$cluster\", namespace=~\"$namespace\"}, job)" + } + }, + "regex": "", + "sort": "alphabeticalAsc", + "options": [], + "multi": true, + "includeAll": true, + "allowCustomValue": true + } + }, + { + "kind": "QueryVariable", + "spec": { + "name": "envoy_cluster_name", + "current": { + "text": "", + "value": "" + }, + "label": "Envoy Cluster Name", + "hide": "dontHide", + "refresh": "onTimeRangeChanged", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "${datasource}" + }, + "spec": { + "__legacyStringValue": "label_values(envoy_cluster_upstream_rq_xx{cluster=\"$cluster\", namespace=~\"$namespace\", job=~\"$job\"}, envoy_cluster_name)" + } + }, + "regex": "", + "sort": "alphabeticalAsc", + "options": [], + "multi": true, + "includeAll": true, + "allowCustomValue": true + } + }, + { + "kind": "QueryVariable", + "spec": { + "name": "envoy_http_conn_manager_prefix", + "current": { + "text": "", + "value": "" + }, + "label": "Envoy HTTP Conn Manager Prefix", + "hide": "dontHide", + "refresh": "onTimeRangeChanged", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "${datasource}" + }, + "spec": { + "__legacyStringValue": "label_values(envoy_http_downstream_rq_xx{cluster=\"$cluster\", namespace=~\"$namespace\", job=~\"$job\"}, envoy_http_conn_manager_prefix)" + } + }, + "regex": "", + "sort": "alphabeticalAsc", + "options": [], + "multi": true, + "includeAll": true, + "allowCustomValue": true + } + }, + { + "kind": "QueryVariable", + "spec": { + "name": "pod", + "current": { + "text": "", + "value": "" + }, + "label": "Pod", + "hide": "dontHide", + "refresh": "onTimeRangeChanged", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "${datasource}" + }, + "spec": { + "__legacyStringValue": "label_values(envoy_listener_http_downstream_rq_xx{cluster=\"$cluster\", namespace=~\"$namespace\", job=~\"$job\"}, pod)" + } + }, + "regex": "", + "sort": "alphabeticalAsc", + "options": [], + "multi": true, + "includeAll": true, + "allowCustomValue": true + } + } + ] + } + } +kind: ConfigMap +metadata: + name: cilium-envoy-overview-grafana-dashboard + namespace: kube-system + labels: + grafana_dashboard: "1" diff --git a/yc-lab/manifests/grafana/dashboards/cilium-envoy-upstream.yaml b/yc-lab/manifests/grafana/dashboards/cilium-envoy-upstream.yaml new file mode 100644 index 0000000..302ea0e --- /dev/null +++ b/yc-lab/manifests/grafana/dashboards/cilium-envoy-upstream.yaml @@ -0,0 +1,2153 @@ +apiVersion: v1 +data: + cilium-envoy-upstream.json: | + { + "apiVersion": "dashboard.grafana.app/v2", + "kind": "Dashboard", + "metadata": { + "name": "cilium-envoy-upstream", + "namespace": "default", + "uid": "8ff01bf5-fa52-4e7a-bd73-6e177d44a369", + "resourceVersion": "1788358446375990", + "generation": 1, + "creationTimestamp": "2026-09-02T14:14:06Z", + "labels": { + "grafana.app/deprecatedInternalID": "979467957358592" + }, + "annotations": { + "grafana.app/createdBy": "user:cfx1picle4dmod", + "grafana.app/saved-from-ui": "Grafana v13.2.0 (f681b1359f)" + } + }, + "spec": { + "annotations": [ + { + "kind": "AnnotationQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "grafana", + "version": "v0", + "datasource": { + "name": "-- Grafana --" + }, + "spec": {} + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "builtIn": true, + "legacyOptions": { + "type": "dashboard" + } + } + } + ], + "cursorSync": "Off", + "description": "Detailed upstream cluster monitoring for Envoy proxy. Tracks request rates, latency distributions (P50/P95/P99), success rates, connection health, circuit breaker status, retry behavior, and timeout patterns for each upstream cluster. Use this dashboard to troubleshoot backend service issues, identify performance bottlenecks, and monitor cluster health across all Envoy pods. Supports multi-cluster selection for comparative analysis. The dashboards were generated using [envoy-mixin](https://github.com/adinhodovic/envoy-mixin). Open issues and create feature requests in the repository.", + "editable": false, + "elements": { + "panel-10": { + "kind": "Panel", + "spec": { + "id": 10, + "title": "Upstream Success Rate (Including 4xx errors)", + "description": "Overall success rate counting both 4xx and 5xx as failures. Reflects end-user experience including authentication, authorization, and validation errors. Lower rates may indicate API contract mismatches, breaking changes, or integration issues between services.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n,\n envoy_response_code_class!~\"4|5\"\n }[$__rate_interval]\n )\n)\n/\nsum(\n rate(\n envoy_cluster_upstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n)\n* 100\n", + "legendFormat": "Success Rate" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "percent", + "custom": { + "axisSoftMax": 100, + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-11": { + "kind": "Panel", + "spec": { + "id": 11, + "title": "Upstream Rate by Code Class", + "description": "Request rate breakdown by HTTP status code class (2xx/3xx/4xx/5xx). Normal traffic shows dominant 2xx responses. Sudden 4xx spikes suggest client-side issues or API changes. Any 5xx indicates backend failures. Monitor 5xx rate to detect cascading failures early.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n) by (envoy_response_code_class)\n", + "legendFormat": "{{ envoy_response_code_class }}xx" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps", + "custom": { + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-12": { + "kind": "Panel", + "spec": { + "id": 12, + "title": "Upstream Rate by Code", + "description": "Detailed request rate by specific HTTP status code (200, 404, 500, etc.). Use this to identify specific error patterns. For example, 503 may indicate overload, 502 suggests gateway issues, and 429 shows rate limiting activation. Helps pinpoint exact failure modes.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n) by (envoy_response_code)\n", + "legendFormat": "{{ envoy_response_code }}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps", + "custom": { + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-13": { + "kind": "Panel", + "spec": { + "id": 13, + "title": "Upstream Healthy Percent", + "description": "Percentage of healthy endpoints per cluster based on active health checks. 100% indicates all endpoints passing health checks. Drops suggest failing instances - check pod logs, resource usage, and health check configurations. Envoy removes unhealthy endpoints from load balancing rotation.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n envoy_cluster_membership_healthy{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }\n) by (envoy_cluster_name)\n/\nsum(\n envoy_cluster_membership_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }\n) by (envoy_cluster_name)\n* 100\n", + "legendFormat": "{{ envoy_cluster_name }}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "percent", + "custom": { + "axisSoftMax": 100, + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-14": { + "kind": "Panel", + "spec": { + "id": 14, + "title": "Upstream Concurrency", + "description": "Current request and connection concurrency for the selected upstream cluster. Rising active requests with relatively flat connections points to request-level pressure. Rising connections and connection overflow points to connection-level pressure.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n envoy_cluster_upstream_rq_active{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }\n) by (envoy_cluster_name)\n", + "legendFormat": "Active Requests" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n envoy_cluster_upstream_cx_active{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }\n) by (envoy_cluster_name)\n", + "legendFormat": "Active Connections" + } + }, + "refId": "B", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "custom": { + "fillOpacity": 10 + } + }, + "overrides": [] + } + } + } + } + }, + "panel-15": { + "kind": "Panel", + "spec": { + "id": 15, + "title": "Upstream Pending and Overflow", + "description": "Pending queue activity and overflow signals for the selected upstream cluster. Pending overflow can indicate connection-pool overflow or request-breaker overflow, so a high overflow rate with low pending-active can still mean request concurrency pressure rather than a full queue.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n envoy_cluster_upstream_rq_pending_active{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }\n) by (envoy_cluster_name)\n", + "legendFormat": "Pending Requests Active" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_pending_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n) by (envoy_cluster_name)\n", + "legendFormat": "Pending Requests Rate" + } + }, + "refId": "B", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_pending_overflow{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n) by (envoy_cluster_name)\n", + "legendFormat": "Pending Overflow Rate" + } + }, + "refId": "C", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n increase(\n envoy_cluster_upstream_cx_overflow{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n) by (envoy_cluster_name)\n", + "legendFormat": "Connection Overflow Rate" + } + }, + "refId": "D", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "custom": { + "fillOpacity": 10 + } + }, + "overrides": [] + } + } + } + } + }, + "panel-16": { + "kind": "Panel", + "spec": { + "id": 16, + "title": "Upstream Connections", + "description": "Connection lifecycle metrics for the selected upstream cluster. Overflow indicates connection-related breaker pressure. Destroyed tracks normal or failed connection teardown. Connect failures suggest network issues, DNS problems, TLS issues, or unreachable backends.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n increase(\n envoy_cluster_upstream_cx_overflow{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n) by (envoy_cluster_name)\n", + "legendFormat": "Overflow Connections" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n increase(\n envoy_cluster_upstream_cx_destroy{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n) by (envoy_cluster_name)\n", + "legendFormat": "Destroyed Connections" + } + }, + "refId": "B", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n increase(\n envoy_cluster_upstream_cx_connect_fail{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n) by (envoy_cluster_name)\n", + "legendFormat": "Connect Failures" + } + }, + "refId": "C", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "custom": { + "fillOpacity": 10 + } + }, + "overrides": [] + } + } + } + } + }, + "panel-17": { + "kind": "Panel", + "spec": { + "id": 17, + "title": "Upstream Circuit Breakers", + "description": "Circuit breaker state for the selected upstream cluster. Non-zero values indicate protection mechanisms are currently open. Open Connections tracks the connection breaker, Open Pool Connections tracks connection-pool breaker pressure, and Open Requests tracks request breaker pressure rather than only a full pending queue.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n envoy_cluster_circuit_breakers_default_cx_open{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }\n) by (envoy_cluster_name)\n", + "legendFormat": "Open Connections" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n envoy_cluster_circuit_breakers_default_cx_pool_open{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }\n) by (envoy_cluster_name)\n", + "legendFormat": "Open Pool Connections" + } + }, + "refId": "B", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n envoy_cluster_circuit_breakers_default_rq_open{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }\n) by (envoy_cluster_name)\n", + "legendFormat": "Open Requests" + } + }, + "refId": "C", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "custom": { + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-18": { + "kind": "Panel", + "spec": { + "id": 18, + "title": "Upstream Resets, Timeouts, and Retries", + "description": "Failure-mode signals for the selected upstream cluster. Tx resets often reflect local fast-fail behavior, breaker pressure, or local connection issues. Rx resets point to the upstream side closing early. Timeouts highlight slow backends, and retry overflow shows retry budget or retry concurrency pressure.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_tx_reset{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n) by (envoy_cluster_name)\n", + "legendFormat": "Tx Reset Rate" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_rx_reset{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n) by (envoy_cluster_name)\n", + "legendFormat": "Rx Reset Rate" + } + }, + "refId": "B", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_timeout{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n) by (envoy_cluster_name)\n", + "legendFormat": "Timeout Rate" + } + }, + "refId": "C", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_retry{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n) by (envoy_cluster_name)\n", + "legendFormat": "Retry Rate" + } + }, + "refId": "D", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_retry_overflow{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n) by (envoy_cluster_name)\n", + "legendFormat": "Retry Overflow Rate" + } + }, + "refId": "E", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps", + "custom": { + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-19": { + "kind": "Panel", + "spec": { + "id": 19, + "title": "Upstream Rate by Pod", + "description": "Request distribution across Envoy proxy pods for this upstream cluster. Ideally shows even distribution. Imbalanced traffic may indicate pod scheduling issues, uneven client distribution, or connection affinity problems. Use to verify horizontal scaling effectiveness.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n) by (pod, envoy_cluster_name)\n", + "legendFormat": "{{ pod }}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps", + "custom": { + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-2": { + "kind": "Panel", + "spec": { + "id": 2, + "title": "Upstreams Count by Job", + "description": "Distribution of upstream clusters across different Prometheus job labels. Useful for understanding how backend services are organized across different Envoy deployments or environments. Imbalanced distribution may indicate configuration inconsistencies.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "count(\n envoy_cluster_upstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }\n) by (job)\n", + "instant": true, + "legendFormat": "{{ job }}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "piechart", + "version": "v11.4.0", + "spec": { + "options": { + "displayLabels": [ + "percent" + ], + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "percent" + ] + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "upstreams" + }, + "overrides": [] + } + } + } + } + }, + "panel-20": { + "kind": "Panel", + "spec": { + "id": 20, + "title": "Upstream Active Connections by Pod", + "description": "Active connections per Envoy pod to this upstream cluster. Should correlate with request rates. High connections with low requests suggest connection pooling inefficiency or slow-draining connections. Uneven distribution may indicate pod-level issues requiring investigation.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n envoy_cluster_upstream_cx_active{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }\n) by (pod, envoy_cluster_name)\n", + "legendFormat": "{{ pod }}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "custom": { + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-3": { + "kind": "Panel", + "spec": { + "id": 3, + "title": "Upstream Rate by Envoy Cluster Name [1h]", + "description": "Request rate distribution across upstream clusters over the past hour (top 20). Identifies which backend services receive the most traffic. Use this to validate load distribution, detect traffic shifts after deployments, and identify hot services that may need scaling.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "topk(20,\n sum(\n rate(\n envoy_cluster_upstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }[1h]\n )\n ) by (envoy_cluster_name)\n)\n", + "instant": true, + "legendFormat": "{{ envoy_cluster_name }}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "piechart", + "version": "v11.4.0", + "spec": { + "options": { + "displayLabels": [ + "percent" + ], + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "percent" + ] + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps" + }, + "overrides": [] + } + } + } + } + }, + "panel-4": { + "kind": "Panel", + "spec": { + "id": 4, + "title": "Upstream Rate by Code Class [1h]", + "description": "Breakdown of upstream responses by HTTP status code class over the past hour. Healthy services typically show 95%+ 2xx responses. High 4xx proportions suggest API contract issues or client misconfigurations. Any 5xx responses indicate backend failures requiring immediate investigation.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }[1h]\n )\n) by (envoy_response_code_class)\n", + "instant": true, + "legendFormat": "{{ envoy_response_code_class }}xx" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "piechart", + "version": "v11.4.0", + "spec": { + "options": { + "displayLabels": [ + "percent" + ], + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "percent" + ] + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps" + }, + "overrides": [] + } + } + } + } + }, + "panel-5": { + "kind": "Panel", + "spec": { + "id": 5, + "title": "Upstream Active Connections by Envoy Cluster Name", + "description": "Distribution of currently active TCP connections to upstream services. Shows which backend clusters are consuming the most connections. Disproportionately high connection counts may indicate connection pooling issues, slow backends, or HTTP/1.1 connection inefficiency. Compare with request rates to assess connection reuse.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "topk(20,\n sum(\n envoy_cluster_upstream_cx_active{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n\n }\n ) by (envoy_cluster_name)\n)\n", + "instant": true, + "legendFormat": "{{ envoy_cluster_name }}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "piechart", + "version": "v11.4.0", + "spec": { + "options": { + "displayLabels": [ + "percent" + ], + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "percent" + ] + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "short" + }, + "overrides": [] + } + } + } + } + }, + "panel-7": { + "kind": "Panel", + "spec": { + "id": 7, + "title": "Upstream Rate", + "description": "Request rate per upstream cluster over time. Each line represents traffic to a specific backend service. Sudden drops may indicate circuit breaker activation, upstream failures, or routing changes. Gradual increases suggest growing load. Use this to identify which clusters need scaling or optimization.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_total{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n) by (envoy_cluster_name)\n", + "legendFormat": "{{ envoy_cluster_name }}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "reqps", + "custom": { + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-8": { + "kind": "Panel", + "spec": { + "id": 8, + "title": "Upstream Latency", + "description": "Backend service response time percentiles. P50 represents typical latency, while P95/P99 show tail latency affecting a subset of requests. Rising P99 often precedes visible performance degradation. Investigate backends when P95 exceeds SLO targets. Exemplars link to distributed traces for root cause analysis.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "histogram_quantile(\n 0.5,\n sum(\n rate(\n envoy_cluster_upstream_rq_time_bucket{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n ) by (le)\n)\n", + "legendFormat": "P50" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "histogram_quantile(\n 0.95,\n sum(\n rate(\n envoy_cluster_upstream_rq_time_bucket{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n ) by (le)\n)\n", + "legendFormat": "P95" + } + }, + "refId": "B", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": true, + "expr": "histogram_quantile(\n 0.99,\n sum(\n rate(\n envoy_cluster_upstream_rq_time_bucket{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n ) by (le)\n)\n", + "legendFormat": "P99" + } + }, + "refId": "C", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "ms", + "custom": { + "fillOpacity": 10 + } + }, + "overrides": [] + } + } + } + } + }, + "panel-9": { + "kind": "Panel", + "spec": { + "id": 9, + "title": "Upstream Success Rate (Excluding 4xx errors)", + "description": "Backend success rate treating 4xx as successful (client errors, not backend failures). Drops below 99.9% indicate backend health issues. Correlate with circuit breaker metrics, health check status, and backend logs. Sustained low rates may trigger automatic circuit breaking.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": false, + "expr": "sum(\n rate(\n envoy_cluster_upstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n,\n envoy_response_code_class!=\"5\"\n }[$__rate_interval]\n )\n)\n/\nsum(\n rate(\n envoy_cluster_upstream_rq_xx{\n cluster=\"$cluster\",\nnamespace=~\"$namespace\",\njob=~\"$job\",\npod=~\"$pod\"\n\n,\nenvoy_cluster_name=\"$envoy_cluster_name\"\n\n }[$__rate_interval]\n )\n)\n* 100\n", + "legendFormat": "Success Rate" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "v11.4.0", + "spec": { + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "percent", + "custom": { + "axisSoftMax": 100, + "axisSoftMin": 0, + "fillOpacity": 100, + "lineWidth": 1, + "stacking": { + "mode": "normal" + } + } + }, + "overrides": [] + } + } + } + } + } + }, + "layout": { + "kind": "RowsLayout", + "spec": { + "rows": [ + { + "kind": "RowsLayoutRow", + "spec": { + "title": "Summary", + "collapse": false, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 4, + "width": 6, + "height": 6, + "element": { + "kind": "ElementReference", + "name": "panel-2" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 6, + "y": 4, + "width": 6, + "height": 6, + "element": { + "kind": "ElementReference", + "name": "panel-3" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 4, + "width": 6, + "height": 6, + "element": { + "kind": "ElementReference", + "name": "panel-4" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 18, + "y": 4, + "width": 6, + "height": 6, + "element": { + "kind": "ElementReference", + "name": "panel-5" + } + } + } + ] + } + } + } + }, + { + "kind": "RowsLayoutRow", + "spec": { + "title": "$envoy_cluster_name", + "collapse": false, + "repeat": { + "mode": "variable", + "value": "envoy_cluster_name" + }, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-7" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 0, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-8" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 8, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-9" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 8, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-10" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 16, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-11" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 16, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-12" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 24, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-13" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 24, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-14" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 32, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-15" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 32, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-16" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 40, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-17" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 40, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-18" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 48, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-19" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 48, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-20" + } + } + } + ] + } + } + } + } + ] + } + }, + "links": [ + { + "title": "Envoy", + "type": "dashboards", + "icon": "", + "tooltip": "", + "tags": [ + "envoy", + "envoy-mixin", + "gateway" + ], + "asDropdown": true, + "targetBlank": true, + "includeVars": false, + "keepTime": true + } + ], + "liveNow": false, + "preload": false, + "tags": [ + "envoy", + "envoy-mixin", + "gateway" + ], + "timeSettings": { + "timezone": "utc", + "from": "now-6h", + "to": "now", + "autoRefresh": "", + "autoRefreshIntervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "hideTimepicker": false, + "fiscalYearStartMonth": 0 + }, + "title": "Cilium / Envoy / Upstream", + "variables": [ + { + "kind": "DatasourceVariable", + "spec": { + "name": "datasource", + "pluginId": "prometheus", + "refresh": "never", + "regex": "", + "current": { + "text": "default", + "value": "default" + }, + "options": [], + "multi": false, + "includeAll": false, + "label": "Data source", + "hide": "dontHide", + "skipUrlSync": false, + "allowCustomValue": true + } + }, + { + "kind": "QueryVariable", + "spec": { + "name": "cluster", + "current": { + "text": "", + "value": "" + }, + "label": "Cluster", + "hide": "hideVariable", + "refresh": "onTimeRangeChanged", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "${datasource}" + }, + "spec": { + "__legacyStringValue": "label_values(envoy_cluster_upstream_rq_xx{}, cluster)" + } + }, + "regex": "", + "sort": "alphabeticalAsc", + "options": [], + "multi": false, + "includeAll": false, + "allowCustomValue": true + } + }, + { + "kind": "QueryVariable", + "spec": { + "name": "namespace", + "current": { + "text": "", + "value": "" + }, + "label": "Namespace", + "hide": "dontHide", + "refresh": "onTimeRangeChanged", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "${datasource}" + }, + "spec": { + "__legacyStringValue": "label_values(envoy_cluster_upstream_rq_xx{cluster=\"$cluster\"}, namespace)" + } + }, + "regex": "", + "sort": "alphabeticalAsc", + "options": [], + "multi": true, + "includeAll": true, + "allowCustomValue": true + } + }, + { + "kind": "QueryVariable", + "spec": { + "name": "job", + "current": { + "text": "", + "value": "" + }, + "label": "Job", + "hide": "dontHide", + "refresh": "onTimeRangeChanged", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "${datasource}" + }, + "spec": { + "__legacyStringValue": "label_values(envoy_cluster_upstream_rq_xx{cluster=\"$cluster\", namespace=~\"$namespace\"}, job)" + } + }, + "regex": "", + "sort": "alphabeticalAsc", + "options": [], + "multi": true, + "includeAll": true, + "allowCustomValue": true + } + }, + { + "kind": "QueryVariable", + "spec": { + "name": "envoy_cluster_name", + "current": { + "text": "", + "value": "" + }, + "label": "Envoy Cluster Name", + "hide": "dontHide", + "refresh": "onTimeRangeChanged", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "${datasource}" + }, + "spec": { + "__legacyStringValue": "label_values(envoy_cluster_upstream_rq_xx{cluster=\"$cluster\", namespace=~\"$namespace\", job=~\"$job\"}, envoy_cluster_name)" + } + }, + "regex": "", + "sort": "alphabeticalAsc", + "options": [], + "multi": true, + "includeAll": false, + "allowCustomValue": true + } + }, + { + "kind": "QueryVariable", + "spec": { + "name": "pod", + "current": { + "text": "", + "value": "" + }, + "label": "Pod", + "hide": "dontHide", + "refresh": "onTimeRangeChanged", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "${datasource}" + }, + "spec": { + "__legacyStringValue": "label_values(envoy_cluster_upstream_rq_xx{cluster=\"$cluster\", namespace=~\"$namespace\", job=~\"$job\", envoy_cluster_name=~\"$envoy_cluster_name\"}, pod)" + } + }, + "regex": "", + "sort": "alphabeticalAsc", + "options": [], + "multi": true, + "includeAll": true, + "allowCustomValue": true + } + } + ] + } + } +kind: ConfigMap +metadata: + name: cilium-envoy-upstream-grafana-dashboard + namespace: kube-system + labels: + grafana_dashboard: "1" diff --git a/yc-lab/manifests/grafana/dashboards/cilium-hubble.yaml b/yc-lab/manifests/grafana/dashboards/cilium-hubble.yaml new file mode 100644 index 0000000..1102011 --- /dev/null +++ b/yc-lab/manifests/grafana/dashboards/cilium-hubble.yaml @@ -0,0 +1,4490 @@ +apiVersion: v1 +data: + cilium-hubble.json: | + { + "apiVersion": "dashboard.grafana.app/v2", + "kind": "Dashboard", + "metadata": { + "name": "cilium-hubble", + "namespace": "default", + "uid": "12818d0e-1272-4d36-b4dc-8bef8a4fbd40", + "resourceVersion": "1788358313445992", + "generation": 1, + "creationTimestamp": "2026-09-02T14:11:53Z", + "labels": { + "grafana.app/deprecatedInternalID": "978911201251328" + }, + "annotations": { + "grafana.app/createdBy": "user:cfx1picle4dmod", + "grafana.app/saved-from-ui": "Grafana v13.2.0 (f681b1359f)" + } + }, + "spec": { + "annotations": [ + { + "kind": "AnnotationQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "", + "version": "v0", + "spec": {} + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "builtIn": true, + "legacyOptions": { + "type": "dashboard" + } + } + } + ], + "cursorSync": "Off", + "description": "Dashboard for the Cilium v1.12 (https://cilium.io/) Hubble metrics", + "editable": true, + "elements": { + "panel-10": { + "kind": "Panel", + "spec": { + "id": 10, + "title": "TCPv4", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_tcp_flags_total{family=\"IPv4\"}[1m])) by (pod, flag)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{flag}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "fillGradient": 0, + "hiddenSeries": false, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "fin", + "yaxis": 1 + }, + { + "alias": "FIN", + "yaxis": 2 + }, + { + "alias": "RST", + "yaxis": 2 + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "pps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + }, + "dataLinks": [] + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-12": { + "kind": "Panel", + "spec": { + "id": 12, + "title": "Flows processed Per Node", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "avg(sum(rate(hubble_flows_processed_total[1m])) by (pod))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "avg" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "min(sum(rate(hubble_flows_processed_total[1m])) by (pod))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "min" + } + }, + "refId": "B", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "max(sum(rate(hubble_flows_processed_total[1m])) by (pod))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "max" + } + }, + "refId": "C", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "fillGradient": 0, + "hiddenSeries": false, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "max", + "fillBelowTo": "avg", + "lines": false + }, + { + "alias": "avg", + "fill": 0, + "fillBelowTo": "min" + }, + { + "alias": "min", + "lines": false + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 1, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "ops", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + }, + "dataLinks": [] + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-18": { + "kind": "Panel", + "spec": { + "id": 18, + "title": "Top 10 Port Distribution", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "topk(10, sum (rate(hubble_port_distribution_total{port!=\"0\"}[1m])) by (pod, port, protocol))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{port}}/{{protocol}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "fillGradient": 0, + "hiddenSeries": false, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "pps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + }, + "dataLinks": [] + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-2": { + "kind": "Panel", + "spec": { + "id": 2, + "title": "DNS Requests", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_dns_queries_total[1m])) by (pod, qtypes)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{qtypes}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "reqps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + } + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-20": { + "kind": "Panel", + "spec": { + "id": 20, + "title": "Top 10 DNS Queries per minute", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "topk(10, sum(rate(hubble_dns_queries_total[10m])*60) by (query, qtypes))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{query}} ({{qtypes}})" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "none", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + } + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-28": { + "kind": "Panel", + "spec": { + "id": 28, + "title": "DNS Errors", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_dns_responses_total{rcode!=\"No Error\"}[1m])) by (pod, qtypes, rcode)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{rcode}} ({{qtypes}})" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 4, + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + } + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-31": { + "kind": "Panel", + "spec": { + "id": 31, + "title": "ICMPv4", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_icmp_total{family=\"IPv4\"}[1m])) by (pod, type)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{type}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "fillGradient": 0, + "hiddenSeries": false, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + }, + "dataLinks": [] + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-32": { + "kind": "Panel", + "spec": { + "id": 32, + "title": "Flows Types", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_flows_processed_total[1m])) by (pod, type)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{type}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "fillGradient": 0, + "hiddenSeries": false, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "ops", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + }, + "dataLinks": [] + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-33": { + "kind": "Panel", + "spec": { + "id": 33, + "title": "Forwarded vs Dropped", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_flows_processed_total[1m])) by (pod, verdict)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{verdict}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "fillGradient": 0, + "hiddenSeries": false, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "ops", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + }, + "dataLinks": [] + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-34": { + "kind": "Panel", + "spec": { + "id": 34, + "title": "Protocol Usage", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum (rate(hubble_port_distribution_total[1m])) by (pod, protocol)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{protocol}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "fillGradient": 0, + "hiddenSeries": false, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": true, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "pps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + }, + "dataLinks": [] + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-35": { + "kind": "Panel", + "spec": { + "id": 35, + "title": "TCPv6", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_tcp_flags_total{family=\"IPv6\"}[1m])) by (pod, flag)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{flag}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "fillGradient": 0, + "hiddenSeries": false, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "fin", + "yaxis": 1 + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "pps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + }, + "dataLinks": [] + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-36": { + "kind": "Panel", + "spec": { + "id": 36, + "title": "ICMPv6", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_icmp_total{family=\"IPv6\"}[1m])) by (pod, type)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{type}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "fillGradient": 0, + "hiddenSeries": false, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + }, + "dataLinks": [] + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-4": { + "kind": "Panel", + "spec": { + "id": 4, + "title": "DNS responses", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_dns_responses_total{rcode=\"No Error\"}[1m])) by (pod, qtypes)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{qtypes}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 1, + "format": "reqps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + } + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-40": { + "kind": "Panel", + "spec": { + "id": 40, + "title": "DNS Response Record Type", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_dns_response_types_total[1m])) by (pod, type)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{type}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 1, + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + } + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-43": { + "kind": "Panel", + "spec": { + "id": 43, + "title": "Denies by Reason", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_drop_total{reason=\"Policy denied\"}[1m])) by (pod, reason)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{reason}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "pps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + } + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-45": { + "kind": "Panel", + "spec": { + "id": 45, + "title": "HTTP Requests", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_http_requests_total[1m])) by (pod, method)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{method}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 1, + "format": "reqps", + "label": "", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + } + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-49": { + "kind": "Panel", + "spec": { + "id": 49, + "title": "HTTP responses", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_http_responses_total[1m])) by (pod, status)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{status}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 1, + "format": "reqps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + } + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-51": { + "kind": "Panel", + "spec": { + "id": 51, + "title": "HTTP Request/Response Latency (p50)", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "histogram_quantile(0.5, rate(hubble_http_request_duration_seconds_bucket[1m]))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{method}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "s", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + } + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-53": { + "kind": "Panel", + "spec": { + "id": 53, + "title": "HTTP Protocol Usage", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_http_requests_total[5m])) by (pod, protocol)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{protocol}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": true, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 0, + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + } + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-54": { + "kind": "Panel", + "spec": { + "id": 54, + "title": "Top 10 Destination Pods with Denied Packets", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "topk(10, sum(rate(hubble_drop_total{reason=\"Policy denied\"}[1m])) by (pod, destination))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{destination}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "pps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + } + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-55": { + "kind": "Panel", + "spec": { + "id": 55, + "title": "Top 10 Source Pods with Denied Packets", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "topk(10, sum(rate(hubble_drop_total{reason=\"Policy denied\"}[1m])) by (pod, source))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{source}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "pps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + } + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-56": { + "kind": "Panel", + "spec": { + "id": 56, + "title": "Pods with DNS errors", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "topk(10,sum(rate(hubble_dns_responses_total{rcode!=\"No Error\"}[1m])) by (pod, destination))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{destination}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 4, + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + } + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-57": { + "kind": "Panel", + "spec": { + "id": 57, + "title": "DNS Response IPs Returned", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_dns_responses_total{rcode=\"No Error\"}[1m])) by (pod,ips_returned)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{ips_returned}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 1, + "format": "reqps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + } + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-58": { + "kind": "Panel", + "spec": { + "id": 58, + "title": "HTTP Request/Response Latency (p99)", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "histogram_quantile(0.99, rate(hubble_http_request_duration_seconds_bucket[1m]))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{method}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "s", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + } + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-59": { + "kind": "Panel", + "spec": { + "id": 59, + "title": "L7 Flow Distribution", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_flows_processed_total{type=\"L7\"}[1m])) by (pod, subtype)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{subtype}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "fillGradient": 0, + "hiddenSeries": false, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "ops", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + }, + "dataLinks": [] + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-60": { + "kind": "Panel", + "spec": { + "id": 60, + "title": "Trace Flow Distribution", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_flows_processed_total{type=\"Trace\"}[1m])) by (pod, subtype)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{subtype}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "fillGradient": 0, + "hiddenSeries": false, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "ops", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + }, + "dataLinks": [] + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-61": { + "kind": "Panel", + "spec": { + "id": 61, + "title": "Denied Packets by Protocol", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_drop_total{reason=\"Policy denied\"}[1m])) by (pod, protocol)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{protocol}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "pps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + } + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-62": { + "kind": "Panel", + "spec": { + "id": 62, + "title": "Missing TCPv4 SYN-ACKs", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_tcp_flags_total{family=\"IPv4\", flag=\"SYN\"}[1m])) by (pod) - sum(rate(hubble_tcp_flags_total{family=\"IPv4\", flag=\"SYN-ACK\"}[1m])) by (pod)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "Missing SYN-ACK" + } + }, + "refId": "B", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "alert": { + "conditions": [ + { + "evaluator": { + "params": [ + 0.2 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "B", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "avg" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Missing TCP SYN-ACK", + "noDataState": "no_data", + "notifications": [] + }, + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "fillGradient": 0, + "hiddenSeries": false, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "fin", + "yaxis": 1 + }, + { + "alias": "FIN", + "yaxis": 2 + }, + { + "alias": "RST", + "yaxis": 2 + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [ + { + "colorMode": "critical", + "fill": true, + "line": true, + "op": "gt", + "value": 0.2 + } + ], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "pps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + }, + "dataLinks": [] + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-63": { + "kind": "Panel", + "spec": { + "id": 63, + "title": "Missing TCPv6 SYN-ACKs", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_tcp_flags_total{family=\"IPv6\", flag=\"SYN\"}[1m])) by (pod) - sum(rate(hubble_tcp_flags_total{family=\"IPv6\", flag=\"SYN-ACK\"}[1m])) by (pod)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "Missing SYN-ACK" + } + }, + "refId": "B", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "alert": { + "conditions": [ + { + "evaluator": { + "params": [ + 0.2 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "B", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "avg" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Missing TCPv6 SYN-ACKs alert", + "noDataState": "no_data", + "notifications": [] + }, + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "fillGradient": 0, + "hiddenSeries": false, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "fin", + "yaxis": 1 + }, + { + "alias": "FIN", + "yaxis": 2 + }, + { + "alias": "RST", + "yaxis": 2 + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [ + { + "colorMode": "critical", + "fill": true, + "line": true, + "op": "gt", + "value": 0.2 + } + ], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "pps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + }, + "dataLinks": [] + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-64": { + "kind": "Panel", + "spec": { + "id": 64, + "title": "Missing ICMPv4 Echo-Reply", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_icmp_total{family=\"IPv4\", type=\"EchoRequest\"}[1m])) by (pod) - sum(rate(hubble_icmp_total{family=\"IPv4\", type=\"EchoReply\"}[1m])) by (pod)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "Missing ICMP Echo-Reply" + } + }, + "refId": "B", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "alert": { + "conditions": [ + { + "evaluator": { + "params": [ + 0.1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "B", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "avg" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Missing ICMPv4 Echo-Reply alert", + "noDataState": "no_data", + "notifications": [] + }, + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "fillGradient": 0, + "hiddenSeries": false, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [ + { + "colorMode": "critical", + "fill": true, + "line": true, + "op": "gt", + "value": 0.1 + } + ], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "pps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + }, + "dataLinks": [] + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-65": { + "kind": "Panel", + "spec": { + "id": 65, + "title": "Missing ICMPv6 Echo-Reply", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_icmp_total{family=\"IPv6\", type=\"EchoRequest\"}[1m])) by (pod) - sum(rate(hubble_icmp_total{family=\"IPv6\", type=\"EchoReply\"}[1m])) by (pod)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "Missing ICMP Echo-Reply" + } + }, + "refId": "B", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "fillGradient": 0, + "hiddenSeries": false, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "pps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + }, + "dataLinks": [] + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-66": { + "kind": "Panel", + "spec": { + "id": 66, + "title": "Missing DNS Responses", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_dns_queries_total[1m])) by (pod, qtypes) - sum(rate(hubble_dns_responses_total[1m])) by (pod, qtypes)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{qtypes}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "alert": { + "conditions": [ + { + "evaluator": { + "params": [ + 0.5 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "avg" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "DNS Request/Response Symmetry alert", + "noDataState": "no_data", + "notifications": [] + }, + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [ + { + "colorMode": "critical", + "fill": true, + "line": true, + "op": "gt", + "value": 0.5 + } + ], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "reqps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + } + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + }, + "panel-8": { + "kind": "Panel", + "spec": { + "id": 8, + "title": "Drop Reason", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "sum(rate(hubble_drop_total[1m])) by (pod, reason)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{reason}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "__angularMigration": { + "autoMigrateFrom": "graph", + "originalOptions": { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "fill": 1, + "fillGradient": 0, + "hiddenSeries": false, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeRegions": [], + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "pps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + }, + "dataLinks": [] + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + } + } + } + } + } + }, + "layout": { + "kind": "RowsLayout", + "spec": { + "rows": [ + { + "kind": "RowsLayoutRow", + "spec": { + "title": "General Processing", + "collapse": false, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-12" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 0, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-32" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 5, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-59" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 5, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-60" + } + } + } + ] + } + } + } + }, + { + "kind": "RowsLayoutRow", + "spec": { + "title": "Network", + "collapse": false, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-33" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 0, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-8" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 5, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-34" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 5, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-18" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 10, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-10" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 10, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-62" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 15, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-35" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 15, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-63" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 20, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-31" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 20, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-64" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 25, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-36" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 25, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-65" + } + } + } + ] + } + } + } + }, + { + "kind": "RowsLayoutRow", + "spec": { + "title": "Network Policy", + "collapse": false, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 12, + "height": 4, + "element": { + "kind": "ElementReference", + "name": "panel-43" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 0, + "width": 12, + "height": 4, + "element": { + "kind": "ElementReference", + "name": "panel-61" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 4, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-55" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 4, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-54" + } + } + } + ] + } + } + } + }, + { + "kind": "RowsLayoutRow", + "spec": { + "title": "HTTP", + "collapse": false, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 12, + "height": 6, + "element": { + "kind": "ElementReference", + "name": "panel-45" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 0, + "width": 12, + "height": 6, + "element": { + "kind": "ElementReference", + "name": "panel-49" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 6, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-51" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 6, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-58" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 11, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-53" + } + } + } + ] + } + } + } + }, + { + "kind": "RowsLayoutRow", + "spec": { + "title": "DNS", + "collapse": false, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 8, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-2" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 8, + "y": 0, + "width": 8, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-4" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 16, + "y": 0, + "width": 8, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-66" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 5, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-40" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 5, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-57" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 10, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-28" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 10, + "width": 12, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-56" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 15, + "width": 24, + "height": 6, + "element": { + "kind": "ElementReference", + "name": "panel-20" + } + } + } + ] + } + } + } + } + ] + } + }, + "links": [], + "liveNow": false, + "preload": false, + "tags": [], + "timeSettings": { + "from": "now-6h", + "to": "now", + "autoRefresh": "30s", + "autoRefreshIntervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "hideTimepicker": false, + "fiscalYearStartMonth": 0 + }, + "title": "Cilium / Hubble", + "variables": [] + } + } +kind: ConfigMap +metadata: + name: cilium-hubble-grafana-dashboard + namespace: kube-system + labels: + grafana_dashboard: "1" diff --git a/yc-lab/manifests/grafana/dashboards/cilium-network-monitoring.yaml b/yc-lab/manifests/grafana/dashboards/cilium-network-monitoring.yaml new file mode 100644 index 0000000..2ae97c2 --- /dev/null +++ b/yc-lab/manifests/grafana/dashboards/cilium-network-monitoring.yaml @@ -0,0 +1,1627 @@ +apiVersion: v1 +data: + cilium-network-monitoring.json: | + { + "apiVersion": "dashboard.grafana.app/v2", + "kind": "Dashboard", + "metadata": { + "name": "cilium-network-monitoring", + "namespace": "default", + "uid": "82922795-ba6f-4336-9b90-efc140d42ef9", + "resourceVersion": "1788358240737998", + "generation": 1, + "creationTimestamp": "2026-09-02T14:10:40Z", + "labels": { + "grafana.app/deprecatedInternalID": "978606250184704" + }, + "annotations": { + "grafana.app/createdBy": "user:cfx1picle4dmod", + "grafana.app/saved-from-ui": "Grafana v13.2.0 (f681b1359f)" + } + }, + "spec": { + "annotations": [ + { + "kind": "AnnotationQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "grafana", + "version": "v0", + "datasource": { + "name": "-- Grafana --" + }, + "spec": {} + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "builtIn": true, + "legacyOptions": { + "type": "dashboard" + } + } + } + ], + "cursorSync": "Off", + "description": "Comprehensive Cilium network monitoring dashboard for Kubernetes clusters. Features instance filtering by Cilium instances (IP:port), endpoint state monitoring, BPF map usage, API performance metrics, and node connectivity status.", + "editable": true, + "elements": { + "panel-1": { + "kind": "Panel", + "spec": { + "id": 1, + "title": "Cilium Agent Bootstrap Time", + "description": "Shows how long it takes for Cilium agents to start up and become ready. **Overall Bootstrap** is total startup time, **Daemon Init** is core daemon initialization, and **K8s Init** is Kubernetes integration setup. Green = fast (<5s), Yellow = slow (5-10s), Red = very slow (>10s). High values may indicate resource constraints or network issues.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "cilium_agent_bootstrap_seconds{scope=\"overall\", instance=~\".*\"}", + "legendFormat": "Overall Bootstrap - {{instance}}" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "cilium_agent_bootstrap_seconds{scope=\"daemonInit\", instance=~\".*\"}", + "legendFormat": "Daemon Init - {{instance}}" + } + }, + "refId": "B", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "cilium_agent_bootstrap_seconds{scope=\"k8sInit\", instance=~\".*\"}", + "legendFormat": "K8s Init - {{instance}}" + } + }, + "refId": "C", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "12.1.1", + "spec": { + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" + }, + { + "value": 5, + "color": "orange" + }, + { + "value": 10, + "color": "dark-red" + } + ] + }, + "color": { + "mode": "thresholds" + } + }, + "overrides": [] + } + } + } + } + }, + "panel-10": { + "kind": "Panel", + "spec": { + "id": 10, + "title": "Node Health Connectivity - NODE_IP_3", + "description": "Shows the connectivity status between Cilium nodes. **Reachable** = nodes can communicate with each other, **Unreachable** = network connectivity issues, **Unknown** = status cannot be determined. All nodes should show as 'Reachable' for proper cluster operation. Unreachable nodes may indicate network failures, firewall issues, or node problems. This is critical for cluster-wide network policy enforcement and service mesh functionality.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "cilium_node_health_connectivity_status{instance=\"NODE_IP_3:9962\"}", + "legendFormat": "{{status}} - {{type}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "12.1.1", + "spec": { + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] + } + }, + "overrides": [] + } + } + } + } + }, + "panel-11": { + "kind": "Panel", + "spec": { + "id": 11, + "title": "Node Health Connectivity - NODE_IP_4", + "description": "Shows the connectivity status between Cilium nodes. **Reachable** = nodes can communicate with each other, **Unreachable** = network connectivity issues, **Unknown** = status cannot be determined. All nodes should show as 'Reachable' for proper cluster operation. Unreachable nodes may indicate network failures, firewall issues, or node problems. This is critical for cluster-wide network policy enforcement and service mesh functionality.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "cilium_node_health_connectivity_status{instance=\"NODE_IP_4:9962\"}", + "legendFormat": "{{status}} - {{type}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "12.1.1", + "spec": { + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] + } + }, + "overrides": [] + } + } + } + } + }, + "panel-12": { + "kind": "Panel", + "spec": { + "id": 12, + "title": "Node Health Connectivity - NODE_IP_2", + "description": "Shows the connectivity status between Cilium nodes. **Reachable** = nodes can communicate with each other, **Unreachable** = network connectivity issues, **Unknown** = status cannot be determined. All nodes should show as 'Reachable' for proper cluster operation. Unreachable nodes may indicate network failures, firewall issues, or node problems. This is critical for cluster-wide network policy enforcement and service mesh functionality.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "cilium_node_health_connectivity_status{instance=\"NODE_IP_2:9962\"}", + "legendFormat": "{{status}} - {{type}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "12.1.1", + "spec": { + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] + } + }, + "overrides": [] + } + } + } + } + }, + "panel-13": { + "kind": "Panel", + "spec": { + "id": 13, + "title": "Cilium Errors & Warnings", + "description": "Shows the total count of errors and warnings from Cilium components across all worker nodes. **ERROR** level indicates serious issues that may affect network functionality, **WARN** level indicates potential problems, **INFO** level shows normal operational messages. Zero counts are ideal. Spikes in errors may indicate network policy conflicts, resource exhaustion, or configuration issues. Monitor for sustained error rates or unusual warning patterns.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "cilium_errors_warnings_total{level=\"INFO\"}", + "legendFormat": "{{level}} {{subsystem}} - ({{instance}})", + "useBackend": false + } + }, + "refId": "B", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "bargauge", + "version": "12.1.1", + "spec": { + "options": { + "displayMode": "gradient", + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "maxVizHeight": 300, + "minVizHeight": 16, + "minVizWidth": 8, + "namePlacement": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": true, + "sizing": "auto", + "valueMode": "color" + }, + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "percentage", + "steps": [ + { + "value": 0, + "color": "super-light-blue" + }, + { + "value": 70, + "color": "light-blue" + }, + { + "value": 85, + "color": "blue" + } + ] + }, + "color": { + "mode": "thresholds" + } + }, + "overrides": [] + } + } + } + } + }, + "panel-14": { + "kind": "Panel", + "spec": { + "id": 14, + "title": "Cilium Warnings", + "description": "Shows the total count of errors and warnings from Cilium components across all worker nodes. **ERROR** level indicates serious issues that may affect network functionality, **WARN** level indicates potential problems, **INFO** level shows normal operational messages. Zero counts are ideal. Spikes in errors may indicate network policy conflicts, resource exhaustion, or configuration issues. Monitor for sustained error rates or unusual warning patterns.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "cilium_errors_warnings_total{level=\"WARN\"}", + "legendFormat": "{{level}} {{subsystem}} {{instance}}", + "useBackend": false + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "12.1.1", + "spec": { + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "center", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" + }, + { + "value": 1, + "color": "orange" + }, + { + "value": 3, + "color": "red" + } + ] + }, + "color": { + "mode": "thresholds" + } + }, + "overrides": [] + } + } + } + } + }, + "panel-2": { + "kind": "Panel", + "spec": { + "id": 2, + "title": "Cilium Errors", + "description": "Shows the total count of errors and warnings from Cilium components across all worker nodes. **ERROR** level indicates serious issues that may affect network functionality, **WARN** level indicates potential problems, **INFO** level shows normal operational messages. Zero counts are ideal. Spikes in errors may indicate network policy conflicts, resource exhaustion, or configuration issues. Monitor for sustained error rates or unusual warning patterns.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "cilium_errors_warnings_total{level=\"ERROR\"}", + "legendFormat": "{{level}} {{subsystem}} {{instance}}", + "useBackend": false + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "12.1.1", + "spec": { + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "center", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" + }, + { + "value": 1, + "color": "orange" + }, + { + "value": 3, + "color": "dark-red" + } + ] + }, + "color": { + "mode": "thresholds" + } + }, + "overrides": [] + } + } + } + } + }, + "panel-3": { + "kind": "Panel", + "spec": { + "id": 3, + "title": "Cilium Endpoint States", + "description": "Shows the distribution of endpoint states in your cluster. **Ready** (green) = endpoints are fully operational, **Regenerating** (yellow) = endpoints are updating policies, **Waiting-for-identity** (orange) = endpoints waiting for security identity assignment, **Restoring** (red) = endpoints recovering from failures. Most endpoints should be in 'Ready' state. High numbers of non-ready endpoints indicate network policy changes, security issues, or cluster instability.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "cilium_endpoint_state{instance=~\".*\"}", + "legendFormat": "{{instance}} - {{endpoint_state}}", + "useBackend": false + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "bargauge", + "version": "12.1.1", + "spec": { + "options": { + "displayMode": "gradient", + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "maxVizHeight": 300, + "minVizHeight": 16, + "minVizWidth": 8, + "namePlacement": "top", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": true, + "sizing": "auto", + "valueMode": "color" + }, + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" + } + ] + }, + "color": { + "mode": "continuous-BlPu" + } + }, + "overrides": [] + } + } + } + } + }, + "panel-4": { + "kind": "Panel", + "spec": { + "id": 4, + "title": "Cilium API Success Rate", + "description": "Shows the distribution of API request methods across Cilium instances. **GET** requests are typically health checks and status queries, **POST** requests are policy updates and configuration changes. Higher rates indicate more active cluster management. Monitor for unusual patterns that might indicate issues or heavy administrative activity.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "cilium_agent_api_process_time_seconds_count{instance=~\".*\"}", + "legendFormat": "{{method}} ({{return_code}}) - {{instance}} - {{path}}", + "useBackend": false + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "12.1.1", + "spec": { + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] + }, + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-5": { + "kind": "Panel", + "spec": { + "id": 5, + "title": "BPF Map Memory Usage", + "description": "Shows total memory usage of all BPF (Berkeley Packet Filter) maps combined for each Cilium instance. BPF maps store network state like connection tracking, IP cache, load balancer backends, and container network mappings. Higher values indicate more network state being tracked. Monitor for total capacity approaching limits which could cause performance issues or packet drops.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "cilium_bpf_map_capacity{instance=~\".*\"}", + "legendFormat": "{{instance}} - {{map_group}}", + "useBackend": false + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "heatmap", + "version": "12.1.1", + "spec": { + "options": { + "calculate": false, + "cellGap": 1, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "max": 8500000, + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdYlBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": false + }, + "yAxis": { + "axisPlacement": "hidden", + "reverse": false + } + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-6": { + "kind": "Panel", + "spec": { + "id": 6, + "title": "BPF Map Operations Rate", + "description": "Shows the rate of operations (create, update, delete) on BPF maps. High operation rates indicate active network state changes like new connections, policy updates, or endpoint modifications. **Update** operations are most common during normal operation. **Delete** operations may indicate connection cleanup or policy changes. Monitor for unusual spikes that could indicate network issues, policy conflicts, or resource pressure.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "rate(cilium_bpf_map_ops_total{instance=~\".*\"}[5m])", + "legendFormat": "{{map_name}} - {{operation}} ({{instance}})" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "12.1.1", + "spec": { + "options": { + "legend": { + "calcs": [ + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] + }, + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "vis": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-7": { + "kind": "Panel", + "spec": { + "id": 7, + "title": "Kubernetes Events Received", + "description": "Tracks the rate of Kubernetes events (create, update, delete) that Cilium agents receive from the Kubernetes API server. These events trigger network policy updates, endpoint state changes, and service discovery updates. **Create** events = new pods/services, **Update** events = configuration changes, **Delete** events = resource cleanup. High event rates may indicate cluster churn, deployments, or configuration changes. Monitor for correlation with network issues.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "cilium_kubernetes_events_received_total{instance=~\".*\"}", + "legendFormat": "({{instance}}) {{scope}} - {{action}}", + "useBackend": false + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "12.1.1", + "spec": { + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] + }, + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-8": { + "kind": "Panel", + "spec": { + "id": 8, + "title": "Node Health Connectivity - NODE_IP_1", + "description": "Shows the connectivity status between Cilium nodes. **Reachable** = nodes can communicate with each other, **Unreachable** = network connectivity issues, **Unknown** = status cannot be determined. All nodes should show as 'Reachable' for proper cluster operation. Unreachable nodes may indicate network failures, firewall issues, or node problems. This is critical for cluster-wide network policy enforcement and service mesh functionality.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "cilium_node_health_connectivity_status{instance=\"NODE_IP_1:9962\"}", + "legendFormat": "{{status}} - {{type}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "12.1.1", + "spec": { + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] + } + }, + "overrides": [] + } + } + } + } + }, + "panel-9": { + "kind": "Panel", + "spec": { + "id": 9, + "title": "Cilium Agent API Process Time Rate", + "description": "Shows the processing time for API requests to Cilium agents. Higher values indicate slower API response times, which may affect cluster management operations, policy updates, or troubleshooting activities. **GET /v1/healthz** = health check latency, **GET /v1/cluster** = cluster status queries. Monitor for sustained high latency which could indicate resource constraints, network issues, or agent performance problems. Critical for operational responsiveness.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "victoriametrics" + }, + "spec": { + "expr": "rate(cilium_agent_api_process_time_seconds_count{instance=~\".*\"}[5m])", + "legendFormat": "{{method}} {{path}} - {{return_code}} ({{instance}})" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "12.1.1", + "spec": { + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] + }, + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "vis": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + } + }, + "overrides": [] + } + } + } + } + } + }, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 6, + "height": 24, + "element": { + "kind": "ElementReference", + "name": "panel-1" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 6, + "y": 0, + "width": 18, + "height": 3, + "element": { + "kind": "ElementReference", + "name": "panel-2" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 6, + "y": 3, + "width": 18, + "height": 3, + "element": { + "kind": "ElementReference", + "name": "panel-14" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 6, + "y": 6, + "width": 11, + "height": 18, + "element": { + "kind": "ElementReference", + "name": "panel-4" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 17, + "y": 6, + "width": 7, + "height": 18, + "element": { + "kind": "ElementReference", + "name": "panel-13" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 24, + "width": 6, + "height": 32, + "element": { + "kind": "ElementReference", + "name": "panel-3" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 6, + "y": 24, + "width": 18, + "height": 32, + "element": { + "kind": "ElementReference", + "name": "panel-5" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 56, + "width": 24, + "height": 11, + "element": { + "kind": "ElementReference", + "name": "panel-9" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 67, + "width": 12, + "height": 16, + "element": { + "kind": "ElementReference", + "name": "panel-7" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 67, + "width": 12, + "height": 16, + "element": { + "kind": "ElementReference", + "name": "panel-6" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 83, + "width": 24, + "height": 6, + "element": { + "kind": "ElementReference", + "name": "panel-8" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 89, + "width": 24, + "height": 6, + "element": { + "kind": "ElementReference", + "name": "panel-12" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 95, + "width": 24, + "height": 6, + "element": { + "kind": "ElementReference", + "name": "panel-10" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 101, + "width": 24, + "height": 6, + "element": { + "kind": "ElementReference", + "name": "panel-11" + } + } + } + ] + } + }, + "links": [], + "liveNow": false, + "preload": false, + "tags": [], + "timeSettings": { + "from": "now-1h", + "to": "now", + "autoRefresh": "30s", + "autoRefreshIntervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "hideTimepicker": false, + "fiscalYearStartMonth": 0 + }, + "title": "Cilium / Network Monitoring", + "variables": [] + } + } +kind: ConfigMap +metadata: + name: cilium-network-monitoring-grafana-dashboard + namespace: kube-system + labels: + grafana_dashboard: "1" diff --git a/yc-lab/manifests/grafana/dashboards/etcd.yaml b/yc-lab/manifests/grafana/dashboards/etcd.yaml new file mode 100644 index 0000000..2930115 --- /dev/null +++ b/yc-lab/manifests/grafana/dashboards/etcd.yaml @@ -0,0 +1,548 @@ +apiVersion: v1 +data: + etcd.json: | + { + "description": "etcd sample Grafana dashboard with Prometheus", + "panels": [ + { + "datasource": { + "type": "datasource", + "uid": "-- Mixed --" + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 0 + }, + "id": 1, + "interval": "1m", + "options": { + "colorMode": "none", + "graphMode": "none", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ] + } + }, + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "sum(etcd_server_has_leader{job=~\".*etcd.*\", job=\"$cluster\"})", + "legendFormat": "{{cluster}} - {{namespace}}\n" + } + ], + "title": "Up", + "type": "stat" + }, + { + "datasource": { + "type": "datasource", + "uid": "-- Mixed --" + }, + "fieldConfig": { + "defaults": { + "custom": { + "fillOpacity": 0, + "lineWidth": 2, + "showPoints": "never" + }, + "unit": "ops" + } + }, + "gridPos": { + "h": 7, + "w": 10, + "x": 6, + "y": 0 + }, + "id": 2, + "interval": "1m", + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "sum(rate(grpc_server_started_total{job=~\".*etcd.*\", job=\"$cluster\",grpc_type=\"unary\"}[$__rate_interval]))", + "legendFormat": "RPC rate" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "sum(rate(grpc_server_handled_total{job=~\".*etcd.*\", job=\"$cluster\",grpc_type=\"unary\",grpc_code=~\"Unknown|FailedPrecondition|ResourceExhausted|Internal|Unavailable|DataLoss|DeadlineExceeded\"}[$__rate_interval]))", + "legendFormat": "RPC failed rate" + } + ], + "title": "RPC rate", + "type": "timeseries" + }, + { + "datasource": { + "type": "datasource", + "uid": "-- Mixed --" + }, + "fieldConfig": { + "defaults": { + "custom": { + "fillOpacity": 0, + "lineWidth": 2, + "showPoints": "never" + } + } + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 0 + }, + "id": 3, + "interval": "1m", + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "sum(grpc_server_started_total{job=~\".*etcd.*\",job=\"$cluster\",grpc_service=\"etcdserverpb.Watch\",grpc_type=\"bidi_stream\"}) - sum(grpc_server_handled_total{job=\"$cluster\",grpc_service=\"etcdserverpb.Watch\",grpc_type=\"bidi_stream\"})", + "legendFormat": "Watch streams" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "sum(grpc_server_started_total{job=~\".*etcd.*\",job=\"$cluster\",grpc_service=\"etcdserverpb.Lease\",grpc_type=\"bidi_stream\"}) - sum(grpc_server_handled_total{job=\"$cluster\",grpc_service=\"etcdserverpb.Lease\",grpc_type=\"bidi_stream\"})", + "legendFormat": "Lease streams" + } + ], + "title": "Active streams", + "type": "timeseries" + }, + { + "datasource": { + "type": "datasource", + "uid": "-- Mixed --" + }, + "fieldConfig": { + "defaults": { + "custom": { + "fillOpacity": 0, + "lineWidth": 2, + "showPoints": "never" + }, + "unit": "bytes" + } + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 25 + }, + "id": 4, + "interval": "1m", + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "etcd_mvcc_db_total_size_in_bytes{job=~\".*etcd.*\", job=\"$cluster\"}", + "legendFormat": "{{instance}} DB size" + } + ], + "title": "DB size", + "type": "timeseries" + }, + { + "datasource": { + "type": "datasource", + "uid": "-- Mixed --" + }, + "fieldConfig": { + "defaults": { + "custom": { + "fillOpacity": 0, + "lineWidth": 2, + "showPoints": "never" + }, + "unit": "s" + } + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 8, + "y": 25 + }, + "id": 5, + "interval": "1m", + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "histogram_quantile(0.99, sum(rate(etcd_disk_wal_fsync_duration_seconds_bucket{job=~\".*etcd.*\", job=\"$cluster\"}[$__rate_interval])) by (instance, le))", + "legendFormat": "{{instance}} WAL fsync" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "histogram_quantile(0.99, sum(rate(etcd_disk_backend_commit_duration_seconds_bucket{job=~\".*etcd.*\", job=\"$cluster\"}[$__rate_interval])) by (instance, le))", + "legendFormat": "{{instance}} DB fsync" + } + ], + "title": "Disk sync duration", + "type": "timeseries" + }, + { + "datasource": { + "type": "datasource", + "uid": "-- Mixed --" + }, + "fieldConfig": { + "defaults": { + "custom": { + "fillOpacity": 0, + "lineWidth": 2, + "showPoints": "never" + }, + "unit": "bytes" + } + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 25 + }, + "id": 6, + "interval": "1m", + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "process_resident_memory_bytes{job=~\".*etcd.*\", job=\"$cluster\"}", + "legendFormat": "{{instance}} resident memory" + } + ], + "title": "Memory", + "type": "timeseries" + }, + { + "datasource": { + "type": "datasource", + "uid": "-- Mixed --" + }, + "fieldConfig": { + "defaults": { + "custom": { + "fillOpacity": 0, + "lineWidth": 2, + "showPoints": "never" + }, + "unit": "Bps" + } + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 50 + }, + "id": 7, + "interval": "1m", + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "rate(etcd_network_client_grpc_received_bytes_total{job=~\".*etcd.*\", job=\"$cluster\"}[$__rate_interval])", + "legendFormat": "{{instance}} client traffic in" + } + ], + "title": "Client traffic in", + "type": "timeseries" + }, + { + "datasource": { + "type": "datasource", + "uid": "-- Mixed --" + }, + "fieldConfig": { + "defaults": { + "custom": { + "fillOpacity": 0, + "lineWidth": 2, + "showPoints": "never" + }, + "unit": "Bps" + } + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 50 + }, + "id": 8, + "interval": "1m", + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "rate(etcd_network_client_grpc_sent_bytes_total{job=~\".*etcd.*\", job=\"$cluster\"}[$__rate_interval])", + "legendFormat": "{{instance}} client traffic out" + } + ], + "title": "Client traffic out", + "type": "timeseries" + }, + { + "datasource": { + "type": "datasource", + "uid": "-- Mixed --" + }, + "fieldConfig": { + "defaults": { + "custom": { + "fillOpacity": 0, + "lineWidth": 2, + "showPoints": "never" + }, + "unit": "Bps" + } + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 12, + "y": 50 + }, + "id": 9, + "interval": "1m", + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "sum(rate(etcd_network_peer_received_bytes_total{job=~\".*etcd.*\", job=\"$cluster\"}[$__rate_interval])) by (instance)", + "legendFormat": "{{instance}} peer traffic in" + } + ], + "title": "Peer traffic in", + "type": "timeseries" + }, + { + "datasource": { + "type": "datasource", + "uid": "-- Mixed --" + }, + "fieldConfig": { + "defaults": { + "custom": { + "fillOpacity": 0, + "lineWidth": 2, + "showPoints": "never" + }, + "unit": "Bps" + } + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 18, + "y": 50 + }, + "id": 10, + "interval": "1m", + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "sum(rate(etcd_network_peer_sent_bytes_total{job=~\".*etcd.*\", job=\"$cluster\"}[$__rate_interval])) by (instance)", + "legendFormat": "{{instance}} peer traffic out" + } + ], + "title": "Peer traffic out", + "type": "timeseries" + }, + { + "datasource": { + "type": "datasource", + "uid": "-- Mixed --" + }, + "fieldConfig": { + "defaults": { + "custom": { + "fillOpacity": 0, + "lineWidth": 2, + "showPoints": "never" + } + } + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 75 + }, + "id": 11, + "interval": "1m", + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "changes(etcd_server_leader_changes_seen_total{job=~\".*etcd.*\", job=\"$cluster\"}[1d])", + "legendFormat": "{{instance}} total leader elections per day" + } + ], + "title": "Raft proposals", + "type": "timeseries" + }, + { + "datasource": { + "type": "datasource", + "uid": "-- Mixed --" + }, + "fieldConfig": { + "defaults": { + "custom": { + "fillOpacity": 0, + "lineWidth": 2, + "showPoints": "never" + } + } + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 8, + "y": 75 + }, + "id": 12, + "interval": "1m", + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "changes(etcd_server_leader_changes_seen_total{job=~\".*etcd.*\", job=\"$cluster\"}[1d])", + "legendFormat": "{{instance}} total leader elections per day" + } + ], + "title": "Total leader elections per day", + "type": "timeseries" + }, + { + "datasource": { + "type": "datasource", + "uid": "-- Mixed --" + }, + "fieldConfig": { + "defaults": { + "custom": { + "fillOpacity": 0, + "lineWidth": 2, + "showPoints": "never" + }, + "unit": "s" + } + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 75 + }, + "id": 13, + "interval": "1m", + "pluginVersion": "v10.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "expr": "histogram_quantile(0.99, sum by (instance, le) (rate(etcd_network_peer_round_trip_time_seconds_bucket{job=~\".*etcd.*\", job=\"$cluster\"}[$__rate_interval])))", + "legendFormat": "{{instance}} peer round trip time" + } + ], + "title": "Peer round trip time", + "type": "timeseries" + } + ], + "refresh": "10s", + "schemaVersion": 36, + "tags": [ + "etcd-mixin" + ], + "templating": { + "list": [ + { + "label": "Data Source", + "name": "datasource", + "query": "prometheus", + "type": "datasource" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "label": "cluster", + "name": "cluster", + "query": "label_values(etcd_server_has_leader{job=~\".*etcd.*\"}, job)", + "refresh": 2, + "type": "query" + } + ] + }, + "time": { + "from": "now-15m", + "to": "now" + }, + "timezone": "utc", + "title": "Kubernetes / etcd", + "uid": "c2f4e12cdf69feb95caa41a5a1b423d9" + } +kind: ConfigMap +metadata: + name: etcd-grafana-dashboard + namespace: kube-system + labels: + grafana_dashboard: "1" diff --git a/yc-lab/manifests/grafana/grafana-secrets.yaml b/yc-lab/manifests/grafana/grafana-secrets.yaml new file mode 100644 index 0000000..a2ce018 --- /dev/null +++ b/yc-lab/manifests/grafana/grafana-secrets.yaml @@ -0,0 +1,23 @@ +apiVersion: external-secrets.io/v1 +kind: ExternalSecret +metadata: + name: grafana-secrets + namespace: grafana +spec: + secretStoreRef: + name: infisical + kind: ClusterSecretStore + + target: + name: grafana-secrets + creationPolicy: Owner + template: + engineVersion: v2 + type: Opaque + + data: + - secretKey: client-secret + remoteRef: + key: /grafana/GRAFANA_OAUTH_CLIENT_SECRET + + refreshInterval: 1h diff --git a/yc-lab/manifests/grafana/victoriametics-datasource.yaml b/yc-lab/manifests/grafana/victoriametics-datasource.yaml new file mode 100644 index 0000000..86a9f21 --- /dev/null +++ b/yc-lab/manifests/grafana/victoriametics-datasource.yaml @@ -0,0 +1,26 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + grafana_datasource: "1" + name: victoriametrics-grafana-datasource + namespace: observability +data: + victoriametrics.yaml: |- + apiVersion: 1 + prune: true + + datasources: + - name: "VictoriaMetrics" + type: prometheus + access: proxy + orgId: 1 + uid: "victoriametrics" + url: "http://vmsingle-main.observability.svc.cluster.local:8429" + basicAuth: false + isDefault: true + editable: false + jsonData: + httpMethod: POST + queryTimeout: 10s + timeInterval: "10s" diff --git a/yc-lab/manifests/infrastructure/kubernetes-lb-service.yaml b/yc-lab/manifests/infrastructure/kubernetes-lb-service.yaml new file mode 100644 index 0000000..22b57c0 --- /dev/null +++ b/yc-lab/manifests/infrastructure/kubernetes-lb-service.yaml @@ -0,0 +1,31 @@ +apiVersion: v1 +kind: Service +metadata: + name: kubernetes-lb + namespace: default +spec: + type: LoadBalancer + ports: + - name: https + port: 8443 + targetPort: 6443 + protocol: TCP + internalTrafficPolicy: Cluster + ipFamilies: + - IPv4 + ipFamilyPolicy: SingleStack + sessionAffinity: None +--- +apiVersion: v1 +kind: Endpoints +metadata: + name: kubernetes-lb + namespace: default +subsets: + - addresses: + - ip: 10.4.0.10 + - ip: 10.5.0.24 + ports: + - name: https + port: 6443 + protocol: TCP diff --git a/yc-lab/manifests/infrastructure/local-path-storage/manifest.yaml b/yc-lab/manifests/infrastructure/local-path-storage/manifest.yaml new file mode 100644 index 0000000..c1b8f7c --- /dev/null +++ b/yc-lab/manifests/infrastructure/local-path-storage/manifest.yaml @@ -0,0 +1,186 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: local-path-storage + +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: local-path-provisioner-service-account + namespace: local-path-storage + +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: local-path-provisioner-role + namespace: local-path-storage +rules: + - apiGroups: [""] + resources: ["pods"] + verbs: ["get", "list", "watch", "create", "patch", "update", "delete"] + +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: local-path-provisioner-role +rules: + - apiGroups: [""] + resources: ["nodes", "persistentvolumeclaims", "configmaps", "pods", "pods/log"] + verbs: ["get", "list", "watch"] + - apiGroups: [""] + resources: ["persistentvolumes"] + verbs: ["get", "list", "watch", "create", "patch", "update", "delete"] + - apiGroups: [""] + resources: ["events"] + verbs: ["create", "patch"] + - apiGroups: ["storage.k8s.io"] + resources: ["storageclasses"] + verbs: ["get", "list", "watch"] + +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: local-path-provisioner-bind + namespace: local-path-storage +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: local-path-provisioner-role +subjects: + - kind: ServiceAccount + name: local-path-provisioner-service-account + namespace: local-path-storage + +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: local-path-provisioner-bind +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: local-path-provisioner-role +subjects: + - kind: ServiceAccount + name: local-path-provisioner-service-account + namespace: local-path-storage + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: local-path-provisioner + namespace: local-path-storage +spec: + replicas: 1 + selector: + matchLabels: + app: local-path-provisioner + template: + metadata: + labels: + app: local-path-provisioner + spec: + serviceAccountName: local-path-provisioner-service-account + containers: + - name: local-path-provisioner + image: docker.io/rancher/local-path-provisioner:v0.0.37 + imagePullPolicy: IfNotPresent + command: + - local-path-provisioner + - --debug + - start + - --config + - /etc/config/config.json + ports: + - name: health + containerPort: 8080 + protocol: TCP + startupProbe: + httpGet: + path: /health + port: health + initialDelaySeconds: 5 + periodSeconds: 5 + failureThreshold: 12 + livenessProbe: + httpGet: + path: /health + port: health + initialDelaySeconds: 10 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /ready + port: health + initialDelaySeconds: 5 + periodSeconds: 5 + volumeMounts: + - name: config-volume + mountPath: /etc/config/ + env: + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: CONFIG_MOUNT_PATH + value: /etc/config/ + - name: HEALTH_PORT + value: "8080" + volumes: + - name: config-volume + configMap: + name: local-path-config + +--- +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + name: local-path +provisioner: rancher.io/local-path +volumeBindingMode: WaitForFirstConsumer +reclaimPolicy: Delete + +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: local-path-config + namespace: local-path-storage +data: + config.json: |- + { + "nodePathMap":[ + { + "node":"DEFAULT_PATH_FOR_NON_LISTED_NODES", + "paths":["/mnt/k3s/storage"] + } + ] + } + setup: |- + #!/bin/sh + set -eu + mkdir -m 0777 -p "$VOL_DIR" + teardown: |- + #!/bin/sh + set -eu + rm -rf "$VOL_DIR" + helperPod.yaml: |- + apiVersion: v1 + kind: Pod + metadata: + name: helper-pod + spec: + priorityClassName: system-node-critical + tolerations: + - key: node.kubernetes.io/disk-pressure + operator: Exists + effect: NoSchedule + containers: + - name: helper-pod + image: docker.io/library/busybox + imagePullPolicy: IfNotPresent diff --git a/yc-lab/manifests/observability/rbac.yaml b/yc-lab/manifests/observability/rbac.yaml new file mode 100644 index 0000000..805429b --- /dev/null +++ b/yc-lab/manifests/observability/rbac.yaml @@ -0,0 +1,41 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: kube-health + namespace: observability + +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kube-health +rules: + - nonResourceURLs: + - /livez + - /readyz + verbs: + - get + +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: kube-health +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: kube-health +subjects: + - kind: ServiceAccount + name: kube-health + namespace: observability + +--- +apiVersion: v1 +kind: Secret +metadata: + name: kube-health-token + namespace: observability + annotations: + kubernetes.io/service-account.name: kube-health +type: kubernetes.io/service-account-token diff --git a/yc-lab/manifests/submariner/ipsec-secret.yaml b/yc-lab/manifests/submariner/ipsec-secret.yaml new file mode 100644 index 0000000..9af666a --- /dev/null +++ b/yc-lab/manifests/submariner/ipsec-secret.yaml @@ -0,0 +1,19 @@ +apiVersion: external-secrets.io/v1 +kind: ExternalSecret +metadata: + name: submariner-ipsec-psk + namespace: submariner-operator +spec: + refreshInterval: 1h + secretStoreRef: + name: infisical + kind: ClusterSecretStore + target: + name: submariner-ipsec-psk + creationPolicy: Owner + template: + type: Opaque + data: + - secretKey: psk + remoteRef: + key: /submariner/SUBMARINER_IPSEC_PSK diff --git a/yc-lab/manifests/victoria-metrics/cilium-agent.yaml b/yc-lab/manifests/victoria-metrics/cilium-agent.yaml new file mode 100644 index 0000000..74bd471 --- /dev/null +++ b/yc-lab/manifests/victoria-metrics/cilium-agent.yaml @@ -0,0 +1,20 @@ +apiVersion: operator.victoriametrics.com/v1beta1 +kind: VMPodScrape +metadata: + name: cilium-agent + namespace: kube-system +spec: + selector: + matchLabels: + k8s-app: cilium + + podMetricsEndpoints: + - port: prometheus + interval: 15s + scrapeTimeout: 10s + + relabelConfigs: + - action: replace + sourceLabels: + - __meta_kubernetes_pod_node_name + targetLabel: node diff --git a/yc-lab/manifests/victoria-metrics/cilium-envoy.yaml b/yc-lab/manifests/victoria-metrics/cilium-envoy.yaml new file mode 100644 index 0000000..54acc92 --- /dev/null +++ b/yc-lab/manifests/victoria-metrics/cilium-envoy.yaml @@ -0,0 +1,20 @@ +apiVersion: operator.victoriametrics.com/v1beta1 +kind: VMPodScrape +metadata: + name: cilium-envoy + namespace: kube-system +spec: + selector: + matchLabels: + k8s-app: cilium-envoy + + podMetricsEndpoints: + - port: envoy-metrics + interval: 15s + scrapeTimeout: 10s + + relabelConfigs: + - action: replace + sourceLabels: + - __meta_kubernetes_pod_node_name + targetLabel: node diff --git a/yc-lab/manifests/victoria-metrics/cilium-hubble-metrics.yaml b/yc-lab/manifests/victoria-metrics/cilium-hubble-metrics.yaml new file mode 100644 index 0000000..27e2a75 --- /dev/null +++ b/yc-lab/manifests/victoria-metrics/cilium-hubble-metrics.yaml @@ -0,0 +1,20 @@ +apiVersion: operator.victoriametrics.com/v1beta1 +kind: VMPodScrape +metadata: + name: hubble-metrics + namespace: kube-system +spec: + selector: + matchLabels: + k8s-app: cilium + + podMetricsEndpoints: + - port: hubble-metrics + interval: 15s + scrapeTimeout: 10s + + relabelConfigs: + - action: replace + sourceLabels: + - __meta_kubernetes_pod_node_name + targetLabel: node diff --git a/yc-lab/manifests/victoria-metrics/cilium-operator.yaml b/yc-lab/manifests/victoria-metrics/cilium-operator.yaml new file mode 100644 index 0000000..b1499d5 --- /dev/null +++ b/yc-lab/manifests/victoria-metrics/cilium-operator.yaml @@ -0,0 +1,18 @@ +apiVersion: operator.victoriametrics.com/v1beta1 +kind: VMServiceScrape +metadata: + name: cilium-operator + namespace: kube-system +spec: + selector: + matchLabels: + io.cilium/app: operator + + namespaceSelector: + matchNames: + - kube-system + + endpoints: + - port: metrics + interval: 30s + scrapeTimeout: 10s diff --git a/yc-lab/manifests/victoria-metrics/etcd.yaml b/yc-lab/manifests/victoria-metrics/etcd.yaml new file mode 100644 index 0000000..483282c --- /dev/null +++ b/yc-lab/manifests/victoria-metrics/etcd.yaml @@ -0,0 +1,18 @@ +apiVersion: operator.victoriametrics.com/v1beta1 +kind: VMStaticScrape +metadata: + name: etcd + namespace: observability + labels: + app.kubernetes.io/instance: victoria-metrics-k8s-stack +spec: + jobName: kube-etcd + targetEndpoints: + - targets: + - 10.4.0.3:2381 + - 10.4.0.10:2381 + - 10.5.0.24:2381 + labels: + job: kube-etcd + component: etcd + scheme: http diff --git a/yc-lab/manifests/victoria-metrics/vmagent.yaml b/yc-lab/manifests/victoria-metrics/vmagent.yaml new file mode 100644 index 0000000..c7ff315 --- /dev/null +++ b/yc-lab/manifests/victoria-metrics/vmagent.yaml @@ -0,0 +1,31 @@ +apiVersion: operator.victoriametrics.com/v1beta1 +kind: VMAgent +metadata: + name: main + namespace: observability +spec: + remoteWrite: + - url: http://vmsingle-main:8429/api/v1/write + + staticScrapeSelector: {} + staticScrapeNamespaceSelector: {} + + serviceScrapeSelector: {} + serviceScrapeNamespaceSelector: {} + + nodeScrapeSelector: {} + nodeScrapeNamespaceSelector: {} + + podScrapeSelector: {} + podScrapeNamespaceSelector: {} + + scrapeConfigSelector: {} + scrapeConfigNamespaceSelector: {} + + resources: + requests: + cpu: 20m + memory: 64Mi + limits: + cpu: 100m + memory: 256Mi diff --git a/yc-lab/manifests/victoria-metrics/vmsingle.yaml b/yc-lab/manifests/victoria-metrics/vmsingle.yaml new file mode 100644 index 0000000..076d25c --- /dev/null +++ b/yc-lab/manifests/victoria-metrics/vmsingle.yaml @@ -0,0 +1,21 @@ +apiVersion: operator.victoriametrics.com/v1beta1 +kind: VMSingle +metadata: + name: main + namespace: observability +spec: + retentionPeriod: 14d + + storage: + storageClassName: local-path + resources: + requests: + storage: 8Gi + + resources: + requests: + cpu: 50m + memory: 128Mi + limits: + cpu: 1000m + memory: 512Mi