cluster

Infrastructure files for Nordgedanken and Midnightthoughts.
git clone git://archive.git.mtrnord.blog/MTRNord/cluster.git
Log | Files | Refs | README

commit 44acbb0290292e592e9fed571bcdc1d90a9a1a86
parent df603b5005f82bc8188a87a7cb2c5c0299056d36
Author: MTRNord <MTRNord@users.noreply.github.com>
Date:   Wed,  7 Jan 2026 09:56:54 +0100

deploy the collectors

Signed-off-by: MTRNord <MTRNord@users.noreply.github.com>

Diffstat:
Mapps/talos_cluster/blog/docker/Dockerfile | 15+++++++++++++++
Aapps/talos_cluster/clickstack/k8s_events_global_metrics_collector.yaml | 73+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aapps/talos_cluster/clickstack/k8s_log_metrics_collector.yaml | 111+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mapps/talos_cluster/clickstack/kustomization.yaml | 3+++
Aapps/talos_cluster/clickstack/secrets.yaml | 57+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 259 insertions(+), 0 deletions(-)

diff --git a/apps/talos_cluster/blog/docker/Dockerfile b/apps/talos_cluster/blog/docker/Dockerfile @@ -174,6 +174,21 @@ RUN wget -q https://downloads.wordpress.org/plugin/akismet.5.6.zip \ && unzip -q -o akismet.5.6.zip -d /var/www/html/wordpress/wp-content/plugins/ \ && rm akismet.5.6.zip +# Install Podlove Publisher +RUN wget -q https://downloads.wordpress.org/plugin/podlove-podcasting-plugin-for-wordpress.4.3.2.zip \ + && unzip -q -o podlove-podcasting-plugin-for-wordpress.4.3.2.zip -d /var/www/html/wordpress/wp-content/plugins/ \ + && rm podlove-podcasting-plugin-for-wordpress.4.3.2.zip + +# Install Podlove Web Player +RUN wget -q https://downloads.wordpress.org/plugin/podlove-web-player.5.9.2.zip \ + && unzip -q -o podlove-web-player.5.9.2.zip -d /var/www/html/wordpress/wp-content/plugins/ \ + && rm podlove-web-player.5.9.2.zip + +# Install Podlove Subscribe button +RUN wget -q https://downloads.wordpress.org/plugin/podlove-subscribe-button.1.3.12.zip \ + && unzip -q -o podlove-subscribe-button.1.3.12.zip -d /var/www/html/wordpress/wp-content/plugins/ \ + && rm podlove-subscribe-button.1.3.12.zip + # Configure nginx: replace default site and enable wordpress config RUN rm -f /etc/nginx/sites-enabled/default COPY wordpress.conf /etc/nginx/sites-available/wordpress.conf diff --git a/apps/talos_cluster/clickstack/k8s_events_global_metrics_collector.yaml b/apps/talos_cluster/clickstack/k8s_events_global_metrics_collector.yaml @@ -0,0 +1,73 @@ +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: k8s-events-global-metrics-collector + namespace: clickstack +spec: + releaseName: k8s-events-global-metrics-collector + chart: + spec: + chart: opentelemetry-collector + sourceRef: + kind: HelmRepository + name: open-telemetry + interval: 60m + values: + # deployment.yaml + mode: deployment + + image: + repository: otel/opentelemetry-collector-contrib + tag: 0.143.1 + + # We only want one of these collectors - any more and we'd produce duplicate data + replicaCount: 1 + + presets: + kubernetesAttributes: + enabled: true + # When enabled the processor will extra all labels for an associated pod and add them as resource attributes. + # The label's exact name will be the key. + extractAllPodLabels: true + # When enabled the processor will extra all annotations for an associated pod and add them as resource attributes. + # The annotation's exact name will be the key. + extractAllPodAnnotations: true + # Configures the collector to collect kubernetes events. + # Adds the k8sobject receiver to the logs pipeline and collects kubernetes events by default. + # More Info: https://opentelemetry.io/docs/kubernetes/collector/components/#kubernetes-objects-receiver + kubernetesEvents: + enabled: true + # Configures the Kubernetes Cluster Receiver to collect cluster-level metrics. + # Adds the k8s_cluster receiver to the metrics pipeline and adds the necessary rules to ClusteRole. + # More Info: https://opentelemetry.io/docs/kubernetes/collector/components/#kubernetes-cluster-receiver + clusterMetrics: + enabled: true + + extraEnvs: + - name: HYPERDX_API_KEY + valueFrom: + secretKeyRef: + name: hyperdx-secret + key: HYPERDX_API_KEY + optional: true + - name: YOUR_OTEL_COLLECTOR_ENDPOINT + valueFrom: + configMapKeyRef: + name: otel-config-vars + key: YOUR_OTEL_COLLECTOR_ENDPOINT + + config: + exporters: + otlphttp: + endpoint: "${env:YOUR_OTEL_COLLECTOR_ENDPOINT}" + compression: gzip + headers: + authorization: "${env:HYPERDX_API_KEY}" + service: + pipelines: + logs: + exporters: + - otlphttp + metrics: + exporters: + - otlphttp diff --git a/apps/talos_cluster/clickstack/k8s_log_metrics_collector.yaml b/apps/talos_cluster/clickstack/k8s_log_metrics_collector.yaml @@ -0,0 +1,111 @@ +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: k8s-log-metrics-collector + namespace: clickstack +spec: + releaseName: k8s-log-metrics-collector + chart: + spec: + chart: opentelemetry-collector + sourceRef: + kind: HelmRepository + name: open-telemetry + interval: 60m + values: + # daemonset.yaml + mode: daemonset + + # Required to use the kubeletstats cpu/memory utilization metrics + clusterRole: + create: true + rules: + - apiGroups: + - "" + resources: + - nodes/proxy + verbs: + - get + + presets: + logsCollection: + enabled: true + hostMetrics: + enabled: true + # Configures the Kubernetes Processor to add Kubernetes metadata. + # Adds the k8sattributes processor to all the pipelines and adds the necessary rules to ClusterRole. + # More info: https://opentelemetry.io/docs/kubernetes/collector/components/#kubernetes-attributes-processor + kubernetesAttributes: + enabled: true + # When enabled the processor will extra all labels for an associated pod and add them as resource attributes. + # The label's exact name will be the key. + extractAllPodLabels: true + # When enabled the processor will extra all annotations for an associated pod and add them as resource attributes. + # The annotation's exact name will be the key. + extractAllPodAnnotations: true + # Configures the collector to collect node, pod, and container metrics from the API server on a kubelet.. + # Adds the kubeletstats receiver to the metrics pipeline and adds the necessary rules to ClusterRole. + # More Info: https://opentelemetry.io/docs/kubernetes/collector/components/#kubeletstats-receiver + kubeletMetrics: + enabled: true + + extraEnvs: + - name: HYPERDX_API_KEY + valueFrom: + secretKeyRef: + name: hyperdx-secret + key: HYPERDX_API_KEY + optional: true + - name: YOUR_OTEL_COLLECTOR_ENDPOINT + valueFrom: + configMapKeyRef: + name: otel-config-vars + key: YOUR_OTEL_COLLECTOR_ENDPOINT + + config: + receivers: + # Configures additional kubelet metrics + kubeletstats: + collection_interval: 20s + auth_type: "serviceAccount" + endpoint: "${env:K8S_NODE_NAME}:10250" + insecure_skip_verify: true + metrics: + k8s.pod.cpu_limit_utilization: + enabled: true + k8s.pod.cpu_request_utilization: + enabled: true + k8s.pod.memory_limit_utilization: + enabled: true + k8s.pod.memory_request_utilization: + enabled: true + k8s.pod.uptime: + enabled: true + k8s.node.uptime: + enabled: true + k8s.container.cpu_limit_utilization: + enabled: true + k8s.container.cpu_request_utilization: + enabled: true + k8s.container.memory_limit_utilization: + enabled: true + k8s.container.memory_request_utilization: + enabled: true + container.uptime: + enabled: true + + exporters: + otlphttp: + endpoint: "${env:YOUR_OTEL_COLLECTOR_ENDPOINT}" + headers: + authorization: "${env:HYPERDX_API_KEY}" + compression: gzip + + service: + pipelines: + logs: + exporters: + - otlphttp + metrics: + exporters: + - otlphttp diff --git a/apps/talos_cluster/clickstack/kustomization.yaml b/apps/talos_cluster/clickstack/kustomization.yaml @@ -5,3 +5,6 @@ resources: - repository.yaml - release.yaml - route.yaml + - secrets.yaml + - k8s_log_metrics_collector.yaml + - k8s_events_global_metrics_collector.yaml diff --git a/apps/talos_cluster/clickstack/secrets.yaml b/apps/talos_cluster/clickstack/secrets.yaml @@ -0,0 +1,57 @@ +apiVersion: v1 +kind: Secret +metadata: + name: hyperdx-secret + namespace: clickstack +type: Opaque +stringData: + HYPERDX_API_KEY: ENC[AES256_GCM,data:A+gj3fg/FMVjRuqMVUoYWqJWl25L4hZrw6YiQNlbtKKeMb5C,iv:hOFqFn2vV+mSNTZAu5OG/NVgPvAugSaSPJ2NG/9Tpj4=,tag:U4/K9zHnpGSpKnc+zIUhTQ==,type:str] +sops: + kms: [] + gcp_kms: [] + azure_kv: [] + hc_vault: [] + age: + - recipient: age1esjyg2qfy49awv0ptkzvpk425adczjr38m37w2mmcahzc4p8n54sll2nzh + enc: | + -----BEGIN AGE ENCRYPTED FILE----- + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBDYVFJUnFXVWYyNk91aGxZ + VjZ0Y0IyajJMYnEwaVdTZzhNY1d6eWNTbjJZCkx6Zm1zYnd6a3U5c0RoR1Z3eGV5 + MndobFFCV0FnazU1dW5Qa3ROdzg3aUUKLS0tIFVnUDhjenhHK3owNkZMcE1xWlFl + amxYOUhKSGU0bGIrTnM1WTBtZ0hwUTgKmCD84Zz6gfHFzySqqAU6S+zX+z2l/LEh + u6+FzzEHdwnaTDLcXhkuaushcH+NaeGApLPaFBVVzpHiXn+NKvw7Ig== + -----END AGE ENCRYPTED FILE----- + lastmodified: "2026-01-07T08:48:49Z" + mac: ENC[AES256_GCM,data:hhfCPstGlLkRQBgiLVibY8nAIj4spkfSEyr1hGii1oQCV7bNCdDdiiSrOve9FSTJF+6gyQu4A2kLezqudc9dYWqlRdVJ3MHp/Gr8hDxjKkp5zmxuVDk7+N17vHajCyKtTzW/jRAqmKQLyMAdUBCxyPXyzc+/nBVVeXWncwSXVhQ=,iv:9M71puGKMgEGRxbbO7iLsoP0N7ZEbZ4keiYS6fTp0rc=,tag:oCXXt9+w82+Fw7ZTBlrb0Q==,type:str] + pgp: [] + encrypted_regex: ^(apiKey|appUserPassword|otelUserPassword|harborAdminPassword|totpVaultKey|kimaiAppSecret|kimaiAdminPassword|GITHUB_CLIENT_ID|GITHUB_CLIENT_SECRET|GITHUB_PRIVATE_KEY|woosh|root_password|rspamd_password|pgdb_password|matrix_access_token|pgdb_remote_url|hmac_secret_key|adminPassword|adminEmail|jenkinsAdminEmail|securityRealm|gerrit.config|routing_key|DATABASE_URL|SMTP_PASSWORD|SECRET_KEY_BASE|admin_password|extraCommands|key|clickhouseDatabaseURL|databaseURL|client_id|client_secret|secret_key_base|otp_secret|private_key|public_key|primaryKey|deterministicKey|keyDerivationSalt|token|clientId|secretKey|installationId|installationKey|uriOverride|adminToken.value|password.value|sql_password|erlangCookie|AUTHENTICATION_PASSWORD|ROOM_API_SECRET_KEY|adminPassword|configPassword|adminUser|configUser|MAIL_PASSWORD|APP_KEY|api_key|api_secret|keys|livekit_key|livekit_secret|secret_key|admin_pass|admin_email|mariadbPassword|mariadbRootPassword|privateKey|data|stringData|PASSWD|password|pass|postgresPassword|postgresqlPassword|redminePassword|smtpPassword|registration_shared_secret|shared_secret|secret|admin_token|integrationKey|rootPassword|adminPassword|adminUser|adminEmail|emailPassword|secretKey|appId|clientSecret|webhookSecret)$ + version: 3.9.1 +--- +# Configmap for the otel collector endpoint +apiVersion: v1 +kind: ConfigMap +metadata: + name: otel-config-vars + namespace: clickstack +data: + YOUR_OTEL_COLLECTOR_ENDPOINT: ENC[AES256_GCM,data:jKOaxrj5Fb+wNMZcybCMD/+eP2E+Wz0hOe8H6ctGq8mW/FD601kX2IP6azbfobz8NbgwvQc5RQrao05FuYDOY9Jq,iv:Bu71B4EPiwT+3nh5xO2J3u50Fmb1KduivEYPi8sS+Ak=,tag:evJx/AUSJzLiKvW9D92L5Q==,type:str] +sops: + kms: [] + gcp_kms: [] + azure_kv: [] + hc_vault: [] + age: + - recipient: age1esjyg2qfy49awv0ptkzvpk425adczjr38m37w2mmcahzc4p8n54sll2nzh + enc: | + -----BEGIN AGE ENCRYPTED FILE----- + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBDYVFJUnFXVWYyNk91aGxZ + VjZ0Y0IyajJMYnEwaVdTZzhNY1d6eWNTbjJZCkx6Zm1zYnd6a3U5c0RoR1Z3eGV5 + MndobFFCV0FnazU1dW5Qa3ROdzg3aUUKLS0tIFVnUDhjenhHK3owNkZMcE1xWlFl + amxYOUhKSGU0bGIrTnM1WTBtZ0hwUTgKmCD84Zz6gfHFzySqqAU6S+zX+z2l/LEh + u6+FzzEHdwnaTDLcXhkuaushcH+NaeGApLPaFBVVzpHiXn+NKvw7Ig== + -----END AGE ENCRYPTED FILE----- + lastmodified: "2026-01-07T08:48:49Z" + mac: ENC[AES256_GCM,data:hhfCPstGlLkRQBgiLVibY8nAIj4spkfSEyr1hGii1oQCV7bNCdDdiiSrOve9FSTJF+6gyQu4A2kLezqudc9dYWqlRdVJ3MHp/Gr8hDxjKkp5zmxuVDk7+N17vHajCyKtTzW/jRAqmKQLyMAdUBCxyPXyzc+/nBVVeXWncwSXVhQ=,iv:9M71puGKMgEGRxbbO7iLsoP0N7ZEbZ4keiYS6fTp0rc=,tag:oCXXt9+w82+Fw7ZTBlrb0Q==,type:str] + pgp: [] + encrypted_regex: ^(apiKey|appUserPassword|otelUserPassword|harborAdminPassword|totpVaultKey|kimaiAppSecret|kimaiAdminPassword|GITHUB_CLIENT_ID|GITHUB_CLIENT_SECRET|GITHUB_PRIVATE_KEY|woosh|root_password|rspamd_password|pgdb_password|matrix_access_token|pgdb_remote_url|hmac_secret_key|adminPassword|adminEmail|jenkinsAdminEmail|securityRealm|gerrit.config|routing_key|DATABASE_URL|SMTP_PASSWORD|SECRET_KEY_BASE|admin_password|extraCommands|key|clickhouseDatabaseURL|databaseURL|client_id|client_secret|secret_key_base|otp_secret|private_key|public_key|primaryKey|deterministicKey|keyDerivationSalt|token|clientId|secretKey|installationId|installationKey|uriOverride|adminToken.value|password.value|sql_password|erlangCookie|AUTHENTICATION_PASSWORD|ROOM_API_SECRET_KEY|adminPassword|configPassword|adminUser|configUser|MAIL_PASSWORD|APP_KEY|api_key|api_secret|keys|livekit_key|livekit_secret|secret_key|admin_pass|admin_email|mariadbPassword|mariadbRootPassword|privateKey|data|stringData|PASSWD|password|pass|postgresPassword|postgresqlPassword|redminePassword|smtpPassword|registration_shared_secret|shared_secret|secret|admin_token|integrationKey|rootPassword|adminPassword|adminUser|adminEmail|emailPassword|secretKey|appId|clientSecret|webhookSecret)$ + version: 3.9.1