diff --git a/config/observability/README.md b/config/observability/README.md index 654c3052e..3ea918ce7 100644 --- a/config/observability/README.md +++ b/config/observability/README.md @@ -9,6 +9,7 @@ If however you have run `make local-setup` and would like to install the observa ```bash ./bin/kustomize build ./config/observability/| docker run --rm -i docker.io/ryane/kfilt -i kind=CustomResourceDefinition | kubectl apply --server-side -f - ./bin/kustomize build ./config/observability/| docker run --rm -i docker.io/ryane/kfilt -x kind=CustomResourceDefinition | kubectl apply -f - +./bin/kustomize build ./config/observability/prometheus/monitors/envoy | kubectl apply -f - ./bin/kustomize build ./config/thanos | kubectl apply -f - ./bin/kustomize build ./examples/dashboards | kubectl apply -f - ./bin/kustomize build ./examples/alerts | kubectl apply -f - diff --git a/config/observability/prometheus/monitors/envoy/kustomization.yaml b/config/observability/prometheus/monitors/envoy/kustomization.yaml new file mode 100644 index 000000000..1c9869913 --- /dev/null +++ b/config/observability/prometheus/monitors/envoy/kustomization.yaml @@ -0,0 +1,4 @@ +resources: +- pod-monitor-envoy.yaml +- service-monitor.yaml + diff --git a/config/observability/prometheus/monitors/overlays/envoy/pod-monitor-envoy.yaml b/config/observability/prometheus/monitors/envoy/pod-monitor-envoy.yaml similarity index 89% rename from config/observability/prometheus/monitors/overlays/envoy/pod-monitor-envoy.yaml rename to config/observability/prometheus/monitors/envoy/pod-monitor-envoy.yaml index b489b72e0..128770980 100644 --- a/config/observability/prometheus/monitors/overlays/envoy/pod-monitor-envoy.yaml +++ b/config/observability/prometheus/monitors/envoy/pod-monitor-envoy.yaml @@ -2,6 +2,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PodMonitor metadata: name: envoy-stats + namespace: envoy-gateway-system spec: namespaceSelector: matchNames: @@ -12,3 +13,4 @@ spec: podMetricsEndpoints: - port: http-envoy-prom path: /stats/prometheus + diff --git a/config/observability/prometheus/monitors/envoy/service-monitor.yaml b/config/observability/prometheus/monitors/envoy/service-monitor.yaml new file mode 100644 index 000000000..b47b35c96 --- /dev/null +++ b/config/observability/prometheus/monitors/envoy/service-monitor.yaml @@ -0,0 +1,15 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: envoy-gateway + namespace: envoy-gateway-system +spec: + namespaceSelector: + matchNames: + - envoy-gateway-system + selector: + matchLabels: + control-plane: envoy-gateway + endpoints: + - port: metrics + diff --git a/config/observability/prometheus/monitors/base/kustomization.yaml b/config/observability/prometheus/monitors/istio/kustomization.yaml similarity index 95% rename from config/observability/prometheus/monitors/base/kustomization.yaml rename to config/observability/prometheus/monitors/istio/kustomization.yaml index 8d8b6290f..b2f343362 100644 --- a/config/observability/prometheus/monitors/base/kustomization.yaml +++ b/config/observability/prometheus/monitors/istio/kustomization.yaml @@ -1,4 +1,4 @@ resources: - service-monitor-istiod.yaml - telemetry.yaml - + diff --git a/config/observability/prometheus/monitors/base/service-monitor-istiod.yaml b/config/observability/prometheus/monitors/istio/service-monitor-istiod.yaml similarity index 89% rename from config/observability/prometheus/monitors/base/service-monitor-istiod.yaml rename to config/observability/prometheus/monitors/istio/service-monitor-istiod.yaml index 656cd440b..e2af452b7 100644 --- a/config/observability/prometheus/monitors/base/service-monitor-istiod.yaml +++ b/config/observability/prometheus/monitors/istio/service-monitor-istiod.yaml @@ -2,6 +2,7 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: istiod + namespace: istio-system spec: namespaceSelector: matchNames: @@ -11,3 +12,4 @@ spec: app: istiod endpoints: - port: http-monitoring + diff --git a/config/observability/prometheus/monitors/base/telemetry.yaml b/config/observability/prometheus/monitors/istio/telemetry.yaml similarity index 99% rename from config/observability/prometheus/monitors/base/telemetry.yaml rename to config/observability/prometheus/monitors/istio/telemetry.yaml index ac6796fce..d39050a9a 100644 --- a/config/observability/prometheus/monitors/base/telemetry.yaml +++ b/config/observability/prometheus/monitors/istio/telemetry.yaml @@ -26,3 +26,4 @@ spec: value: "request.host" request_url_path: value: "request.url_path" + diff --git a/config/observability/prometheus/monitors/overlays/envoy/kustomization.yaml b/config/observability/prometheus/monitors/overlays/envoy/kustomization.yaml deleted file mode 100644 index 06482aa32..000000000 --- a/config/observability/prometheus/monitors/overlays/envoy/kustomization.yaml +++ /dev/null @@ -1,10 +0,0 @@ -resources: -- ../../base -- pod-monitor-envoy.yaml - -namespace: gateway-system - -patchesStrategicMerge: - - service-monitor.yaml - - diff --git a/config/observability/prometheus/monitors/overlays/envoy/service-monitor.yaml b/config/observability/prometheus/monitors/overlays/envoy/service-monitor.yaml deleted file mode 100644 index 79403ee22..000000000 --- a/config/observability/prometheus/monitors/overlays/envoy/service-monitor.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: istiod -spec: - namespaceSelector: - matchNames: - - gateway-system - \ No newline at end of file diff --git a/config/observability/prometheus/monitors/overlays/envoy/telemetry.yaml b/config/observability/prometheus/monitors/overlays/envoy/telemetry.yaml deleted file mode 100644 index b5aabb906..000000000 --- a/config/observability/prometheus/monitors/overlays/envoy/telemetry.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: telemetry.istio.io/v1alpha1 -kind: Telemetry -metadata: - name: namespace-metrics - namespace: gateway-system -spec: - metrics: diff --git a/hack/quickstart-setup.sh b/hack/quickstart-setup.sh index f51851163..b5cb7c969 100755 --- a/hack/quickstart-setup.sh +++ b/hack/quickstart-setup.sh @@ -84,7 +84,7 @@ KUADRANT_CERT_MANAGER_KUSTOMIZATION="${KUADRANT_REPO}/config/dependencies/cert-m KUADRANT_METALLB_KUSTOMIZATION="${KUADRANT_REPO}/config/metallb?ref=${KUADRANT_REF}" KUADARNT_THANOS_KUSTOMIZATION="${KUADRANT_REPO}/config/thanos?ref=${KUADRANT_REF}" KUADARNT_OBSERVABILITY_KUSTOMIZATION="${KUADRANT_REPO}/config/observability?ref=${KUADRANT_REF}" -KUADARNT_OBSERVABILITY_ISTIO_KUSTOMIZATION="${KUADRANT_REPO}/config/observability/promtheus/monitors/base?ref=${KUADRANT_REF}" +KUADARNT_OBSERVABILITY_ISTIO_KUSTOMIZATION="${KUADRANT_REPO}/config/observability/prometheus/monitors/istio?ref=${KUADRANT_REF}" KUADRANT_DASHBOARDS_KUSTOMIZATION="${KUADRANT_REPO}/examples/dashboards?ref=${KUADRANT_REF}" KUADRANT_ALERTS_KUSTOMIZATION="${KUADRANT_REPO}/examples/alerts?ref=${KUADRANT_REF}" MGC_REPO="github.com/${KUADRANT_ORG}/multicluster-gateway-controller.git" @@ -461,8 +461,9 @@ fi # Install observability stack info "Installing observability stack in ${KUADRANT_CLUSTER_NAME}..." -kubectl kustomize ${KUADARNT_OBSERVABILITY_KUSTOMIZATION} | kubectl kustomize ${KUADARNT_OBSERVABILITY_ISTIO_KUSTOMIZATION} | $CONTAINER_RUNTIME_BIN run --rm -i docker.io/ryane/kfilt -i kind=CustomResourceDefinition | kubectl apply --server-side -f - -kubectl kustomize ${KUADARNT_OBSERVABILITY_KUSTOMIZATION} | kubectl kustomize ${KUADARNT_OBSERVABILITY_ISTIO_KUSTOMIZATION} | $CONTAINER_RUNTIME_BIN run --rm -i docker.io/ryane/kfilt -x kind=CustomResourceDefinition | kubectl apply -f - +kubectl kustomize ${KUADARNT_OBSERVABILITY_KUSTOMIZATION} | $CONTAINER_RUNTIME_BIN run --rm -i docker.io/ryane/kfilt -i kind=CustomResourceDefinition | kubectl apply --server-side -f - +kubectl kustomize ${KUADARNT_OBSERVABILITY_KUSTOMIZATION} | $CONTAINER_RUNTIME_BIN run --rm -i docker.io/ryane/kfilt -x kind=CustomResourceDefinition | kubectl apply -f - +kubectl kustomize ${KUADARNT_OBSERVABILITY_ISTIO_KUSTOMIZATION} | kubectl apply --server-side -f - kubectl kustomize ${KUADRANT_DASHBOARDS_KUSTOMIZATION} | kubectl apply --server-side -f - kubectl kustomize ${KUADRANT_ALERTS_KUSTOMIZATION} | kubectl apply --server-side -f - success "observability stack installed successfully."