diff --git a/k8s-kustomize/infrastructure/crds/cert-manager/kustomization.yaml b/k8s-kustomize/infrastructure/crds/cert-manager/kustomization.yaml new file mode 100644 index 000000000..034358103 --- /dev/null +++ b/k8s-kustomize/infrastructure/crds/cert-manager/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - https://github.com/cert-manager/cert-manager/releases/download/v1.14.1/cert-manager.yaml \ No newline at end of file diff --git a/k8s-kustomize/infrastructure/crds/kustomization.yaml b/k8s-kustomize/infrastructure/crds/kustomization.yaml index 4f7a7196a..251999ef2 100644 --- a/k8s-kustomize/infrastructure/crds/kustomization.yaml +++ b/k8s-kustomize/infrastructure/crds/kustomization.yaml @@ -1,5 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: + - cert-manager - gateway - - istio-operator \ No newline at end of file + - istio-operator + - open-telemetry-operator \ No newline at end of file diff --git a/k8s-kustomize/infrastructure/crds/open-telemetry-operator/kustomization.yaml b/k8s-kustomize/infrastructure/crds/open-telemetry-operator/kustomization.yaml new file mode 100644 index 000000000..e47436703 --- /dev/null +++ b/k8s-kustomize/infrastructure/crds/open-telemetry-operator/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - "https://github.com/open-telemetry/opentelemetry-operator/releases/latest/download/opentelemetry-operator.yaml" \ No newline at end of file diff --git a/k8s-kustomize/infrastructure/monitoring/kustomization.yaml b/k8s-kustomize/infrastructure/monitoring/kustomization.yaml new file mode 100644 index 000000000..6fd783427 --- /dev/null +++ b/k8s-kustomize/infrastructure/monitoring/kustomization.yaml @@ -0,0 +1,10 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: monitoring + +generatorOptions: + disableNameSuffixHash: true + +resources: + - "namespace.yaml" \ No newline at end of file diff --git a/k8s-kustomize/infrastructure/monitoring/namespace.yaml b/k8s-kustomize/infrastructure/monitoring/namespace.yaml new file mode 100644 index 000000000..3335b6a1b --- /dev/null +++ b/k8s-kustomize/infrastructure/monitoring/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: monitoring \ No newline at end of file diff --git a/k8s-kustomize/infrastructure/monitoring/otel-collector.yaml b/k8s-kustomize/infrastructure/monitoring/otel-collector.yaml new file mode 100644 index 000000000..8a14fa98e --- /dev/null +++ b/k8s-kustomize/infrastructure/monitoring/otel-collector.yaml @@ -0,0 +1,87 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: simplest +spec: + config: | + receivers: + otlp: + protocols: + grpc: + endpoint: ${env:MY_POD_IP}:4317 + http: + endpoint: ${env:MY_POD_IP}:4318 + # loki: + # protocols: + # http: + # endpoint: 0.0.0.0:3500 + # grpc: + # endpoint: 0.0.0.0:3600 + # use_incoming_timestamp: true + + exporters: + prometheus: + endpoint: "0.0.0.0:8889" + const_labels: + env: local + + otlp: + endpoint: tempo:4317 + tls: + insecure: true + + logging: + loglevel: debug + + loki: + endpoint: http://loki:3100/loki/api/v1/push + + otlphttp: + endpoint: "https://collector.gethelios.dev" + traces_endpoint: "https://collector.gethelios.dev/v1/traces" + headers: + Authorization: ${env:HS_API_TOKEN} + + otlp/jaeger: # Jaeger supports OTLP directly + endpoint: jaeger-all-in-one:4317 + tls: + insecure: true + zipkin: + endpoint: http://zipkin-all-in-one:9411/api/v2/spans + + processors: + batch: + + attributes: + actions: + - action: insert + key: loki.attribute.labels + value: container + - action: insert + key: loki.format + value: raw + + extensions: + health_check: + pprof: + endpoint: :1888 + zpages: + endpoint: :55679 + + service: + extensions: [pprof, zpages, health_check] + pipelines: + traces: + receivers: [otlp] + processors: [batch] + exporters: [otlp, otlphttp, otlp/jaeger, zipkin] + + metrics: + receivers: [otlp] + processors: [batch] + exporters: [logging, prometheus] + + logs: + receivers: [loki] + processors: [attributes] + exporters: [loki]