cluster

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

commit 2e2f647c5e92b1bdac195cea737d374a026cd8ed
parent 285a5a45ad446129cff6e609129f1df9a632222d
Author: MTRNord <mtrnord1@gmail.com>
Date:   Mon, 31 Mar 2025 23:23:20 +0200

Prepare monitoring element.io

Diffstat:
Aapps/2024_cluster/secrets/archivebox.yaml | 28++++++++++++++++++++++++++++
Mapps/2024_cluster/secrets/kustomization.yaml | 1+
Mapps/base/element_changedetection/element_deployment.yaml | 107+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------
Mapps/base/envoy-gateway/release.yaml | 420++++++++++++++++++++++++++++++++++++++++----------------------------------------
4 files changed, 322 insertions(+), 234 deletions(-)

diff --git a/apps/2024_cluster/secrets/archivebox.yaml b/apps/2024_cluster/secrets/archivebox.yaml @@ -0,0 +1,28 @@ +apiVersion: v1 +kind: Secret +metadata: + name: element-changedetection + namespace: changedetection +type: Opaque +stringData: + search_backend_password: ENC[AES256_GCM,data:aWBgiXfzCaxnaP7A5754RKLCl+HCYghFqHAMziUWz6Jj/Ej3HifJfDfrYGIGxWTxrkECNPdvqC8+WcuLGYFBKA==,iv:Pv1WgqIfy2sw6ij8PN6rG9VVkW4lzCRL2EuLTbirO9c=,tag:is6dPRXE18X1u9tjRA0VwQ==,type:str] +sops: + kms: [] + gcp_kms: [] + azure_kv: [] + hc_vault: [] + age: + - recipient: age1esjyg2qfy49awv0ptkzvpk425adczjr38m37w2mmcahzc4p8n54sll2nzh + enc: | + -----BEGIN AGE ENCRYPTED FILE----- + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB5a28wRzEwUDVsMW16cG1Y + Y1hsaDF5cUdoRlJPRVpQcGl3L290blhJWERFCk56NjlxRXV0TkQxMUxSMU0zckk1 + ZE5Fbjh3OFNhMFZ6NUkrbG42ZXBNMGMKLS0tICtKOFdvbHcrTlM3L3cyWjJJVUpp + V1lCYkdoTjJnQmVPS0lLKzJBTDVMZVkK3hSndmPVfE7mgUyQJuZ7J7jgzwCAZr65 + 57/et1ulAPndjyz3xgMHNDygzEVwN1xBZX/uBEaWSUeKqKo3E4q+Pg== + -----END AGE ENCRYPTED FILE----- + lastmodified: "2025-03-31T21:23:04Z" + mac: ENC[AES256_GCM,data:XAjlhRX7BA3qQIjmhhjaMCtD7SEG6b0ymGmsvvV1YACJlMKKWbuLvthmDrO+6FG0ECNccIyVIFX/E2VTAzm0uEpv4Fld44MBsR6BEZGTBcYdfA3chyorVtZMX8rfZ8uyqdpsE7oF1WbL3DaoIo9kfaMQYGbxz+L3YTp8pmFP0Go=,iv:/Ysl4UOELncvYtqOBGKyaLnxrwBNfeT3eCqwoxODRtg=,tag:N86kDQuJor17klbn9wnfTQ==,type:str] + pgp: [] + encrypted_regex: ^(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)$ + version: 3.9.1 diff --git a/apps/2024_cluster/secrets/kustomization.yaml b/apps/2024_cluster/secrets/kustomization.yaml @@ -19,3 +19,4 @@ resources: - mariadb-operator.yaml - rundeck.yaml - hubzilla.yaml + - archivebox.yaml diff --git a/apps/base/element_changedetection/element_deployment.yaml b/apps/base/element_changedetection/element_deployment.yaml @@ -32,18 +32,59 @@ spec: app: element-changedetection spec: containers: - - image: dgtlmoon/sockpuppetbrowser:latest + - image: archivebox/sonic:latest imagePullPolicy: Always - name: element-changedetection-chromium + name: element-changedetection-sonic env: - - name: SCREEN_WIDTH - value: "1920" - - name: SCREEN_HEIGHT - value: "1080" - - name: SCREEN_DEPTH - value: "24" - - name: MAX_CONCURRENT_CHROME_PROCESSES - value: "10" + - name: SEARCH_BACKEND_PASSWORD + valueFrom: + secretKeyRef: + name: element-changedetection + key: search_backend_password + resources: + requests: + ephemeral-storage: 1024Mi + cpu: 100m + memory: 200Mi + limits: + ephemeral-storage: 2048Mi + cpu: 2000m + memory: 3000Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + #add: + # - SYS_ADMIN + readOnlyRootFilesystem: false + runAsNonRoot: false + volumeMounts: + - mountPath: /var/lib/sonic/store + name: element-changedetection-data + subPath: sonic + - mountPath: /tmp + name: tmp + - image: archivebox/archivebox:latest + imagePullPolicy: Always + name: element-changedetection-scheduler + env: + - name: TIMEOUT + value: "120" + - name: SEARCH_BACKEND_ENGINE + value: "sonic" + - name: SEARCH_BACKEND_HOST + value: "localhost" + - name: SEARCH_BACKEND_PASSWORD + valueFrom: + secretKeyRef: + name: element-changedetection + key: search_backend_password + arguments: + - scheduler + - --foreground + - --update + - '--every="15 * * * *"' resources: requests: ephemeral-storage: 1024Mi @@ -62,27 +103,45 @@ spec: - SYS_ADMIN readOnlyRootFilesystem: false runAsNonRoot: false - - image: ghcr.io/dgtlmoon/changedetection.io + volumeMounts: + - mountPath: /data + name: element-changedetection-data + - mountPath: /tmp + name: tmp + - image: archivebox/archivebox:latest imagePullPolicy: Always name: element-changedetection env: - - name: PORT - value: "5000" - - name: BASE_URL + - name: ALLOWED_HOSTS + value: "https://element-changes.midnightthoughts.space" + - name: CSRF_TRUSTED_ORIGINS value: "https://element-changes.midnightthoughts.space" - name: TZ value: "Europe/Berlin" - - name: PLAYWRIGHT_DRIVER_URL - value: "ws://localhost:3000" + - name: PUBLIC_INDEX + value: "True" + - name: PUBLIC_SNAPSHOTS + value: "False" + - name: PUBLIC_ADD_VIEW + value: "False" + - name: SEARCH_BACKEND_ENGINE + value: "sonic" + - name: SEARCH_BACKEND_HOST + value: "localhost" + - name: SEARCH_BACKEND_PASSWORD + valueFrom: + secretKeyRef: + name: element-changedetection + key: search_backend_password livenessProbe: failureThreshold: 3 httpGet: path: / - port: 5000 + port: 8000 readinessProbe: httpGet: path: / - port: 5000 + port: 8000 resources: requests: ephemeral-storage: 1024Mi @@ -97,12 +156,12 @@ spec: capabilities: drop: - ALL - #add: - # - SYS_ADMIN + #add: + # - SYS_ADMIN readOnlyRootFilesystem: false runAsNonRoot: false volumeMounts: - - mountPath: /datastore + - mountPath: /data name: element-changedetection-data - mountPath: /tmp name: tmp @@ -123,9 +182,9 @@ metadata: namespace: changedetection spec: ports: - - port: 5000 + - port: 8000 protocol: TCP - targetPort: 5000 + targetPort: 8000 selector: app: element-changedetection type: ClusterIP @@ -144,4 +203,4 @@ spec: rules: - backendRefs: - name: element-changedetection-srv - port: 5000 + port: 8000 diff --git a/apps/base/envoy-gateway/release.yaml b/apps/base/envoy-gateway/release.yaml @@ -75,42 +75,42 @@ spec: protocol: TCP port: 25 allowedRoutes: - kinds: - - kind: TCPRoute - namespaces: - from: All + kinds: + - kind: TCPRoute + namespaces: + from: All - name: submissions protocol: TCP port: 465 allowedRoutes: - kinds: - - kind: TCPRoute - namespaces: - from: All + kinds: + - kind: TCPRoute + namespaces: + from: All - name: submission protocol: TCP port: 587 allowedRoutes: - kinds: - - kind: TCPRoute - namespaces: - from: All + kinds: + - kind: TCPRoute + namespaces: + from: All - name: imap protocol: TCP port: 143 allowedRoutes: - kinds: - - kind: TCPRoute - namespaces: - from: All + kinds: + - kind: TCPRoute + namespaces: + from: All - name: imaps protocol: TCP port: 993 allowedRoutes: - kinds: - - kind: TCPRoute - namespaces: - from: All + kinds: + - kind: TCPRoute + namespaces: + from: All --- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway @@ -135,383 +135,383 @@ spec: hostname: "mas.matrix.midnightthoughts.space" port: 443 allowedRoutes: - namespaces: - from: "All" + namespaces: + from: "All" tls: - mode: Terminate - certificateRefs: - - kind: Secret - name: mas.matrix.midnightthoughts.space-tls + mode: Terminate + certificateRefs: + - kind: Secret + name: mas.matrix.midnightthoughts.space-tls - name: https-matrix-midnightthoughts protocol: HTTPS hostname: "matrix.midnightthoughts.space" port: 443 allowedRoutes: - namespaces: - from: "All" + namespaces: + from: "All" tls: - mode: Terminate - certificateRefs: - - kind: Secret - name: matrix.midnightthoughts.space-tls + mode: Terminate + certificateRefs: + - kind: Secret + name: matrix.midnightthoughts.space-tls - name: https-draupnir-midnightthoughts protocol: HTTPS hostname: "draupnir.midnightthoughts.space" port: 443 allowedRoutes: - namespaces: - from: "All" + namespaces: + from: "All" tls: - mode: Terminate - certificateRefs: - - kind: Secret - name: draupnir.midnightthoughts.space-tls + mode: Terminate + certificateRefs: + - kind: Secret + name: draupnir.midnightthoughts.space-tls - name: https-matrix-draupnir-midnightthoughts protocol: HTTPS hostname: "matrix.draupnir.midnightthoughts.space" port: 443 allowedRoutes: - namespaces: - from: "All" + namespaces: + from: "All" tls: - mode: Terminate - certificateRefs: - - kind: Secret - name: matrix.draupnir.midnightthoughts.space-tls + mode: Terminate + certificateRefs: + - kind: Secret + name: matrix.draupnir.midnightthoughts.space-tls - name: https-docuseal-midnightthoughts protocol: HTTPS hostname: "docuseal.midnightthoughts.space" port: 443 allowedRoutes: - namespaces: - from: "All" + namespaces: + from: "All" tls: - mode: Terminate - certificateRefs: - - kind: Secret - name: docuseal.midnightthoughts.space-tls + mode: Terminate + certificateRefs: + - kind: Secret + name: docuseal.midnightthoughts.space-tls - name: https-midnightthoughts-neoboard protocol: HTTPS hostname: "miro-export.neoboard.midnightthoughts.space" port: 443 allowedRoutes: - namespaces: - from: "All" + namespaces: + from: "All" tls: - mode: Terminate - certificateRefs: - - kind: Secret - name: miro-export.neoboard.midnightthoughts.space-tls + mode: Terminate + certificateRefs: + - kind: Secret + name: miro-export.neoboard.midnightthoughts.space-tls - name: https-midnightthoughts-certs protocol: HTTPS hostname: "certs.midnightthoughts.space" port: 443 allowedRoutes: - namespaces: - from: "All" + namespaces: + from: "All" tls: - mode: Terminate - certificateRefs: - - kind: Secret - name: certs.midnightthoughts.space-tls + mode: Terminate + certificateRefs: + - kind: Secret + name: certs.midnightthoughts.space-tls - name: https-midnightthoughts-capacitor protocol: HTTPS hostname: "ui.k8s.midnightthoughts.space" port: 443 allowedRoutes: - namespaces: - from: "All" + namespaces: + from: "All" tls: - mode: Terminate - certificateRefs: - - kind: Secret - name: ui.k8s.midnightthoughts.space-tls + mode: Terminate + certificateRefs: + - kind: Secret + name: ui.k8s.midnightthoughts.space-tls - name: https-midnightthoughts-auth protocol: HTTPS hostname: "auth.midnightthoughts.space" port: 443 allowedRoutes: - namespaces: - from: "All" + namespaces: + from: "All" tls: - mode: Terminate - certificateRefs: - - kind: Secret - name: auth.midnightthoughts.space-tls + mode: Terminate + certificateRefs: + - kind: Secret + name: auth.midnightthoughts.space-tls - name: https-midnightthoughts-ldap protocol: HTTPS hostname: "ldap.midnightthoughts.space" port: 443 allowedRoutes: - namespaces: - from: "All" + namespaces: + from: "All" tls: - mode: Terminate - certificateRefs: - - kind: Secret - name: ldap.midnightthoughts.space-tls + mode: Terminate + certificateRefs: + - kind: Secret + name: ldap.midnightthoughts.space-tls - name: https-midnightthoughts-status-webhook protocol: HTTPS hostname: "webhook.status.midnightthoughts.space" port: 443 allowedRoutes: - namespaces: - from: "All" + namespaces: + from: "All" tls: - mode: Terminate - certificateRefs: - - kind: Secret - name: webhook.status.midnightthoughts.space-tls + mode: Terminate + certificateRefs: + - kind: Secret + name: webhook.status.midnightthoughts.space-tls - name: https-midnightthoughts-budget protocol: HTTPS hostname: "budget.midnightthoughts.space" port: 443 allowedRoutes: - namespaces: - from: "All" + namespaces: + from: "All" tls: - mode: Terminate - certificateRefs: - - kind: Secret - name: budget.midnightthoughts.space-tls + mode: Terminate + certificateRefs: + - kind: Secret + name: budget.midnightthoughts.space-tls - name: https-midnightthoughts-bugzilla protocol: HTTPS hostname: "bugzilla.midnightthoughts.space" port: 443 allowedRoutes: - namespaces: - from: "All" + namespaces: + from: "All" tls: - mode: Terminate - certificateRefs: - - kind: Secret - name: bugzilla.midnightthoughts.space-tls + mode: Terminate + certificateRefs: + - kind: Secret + name: bugzilla.midnightthoughts.space-tls - name: https-midnightthoughts-root protocol: HTTPS hostname: "midnightthoughts.space" port: 443 allowedRoutes: - namespaces: - from: "All" + namespaces: + from: "All" tls: - mode: Terminate - certificateRefs: - - kind: Secret - name: midnightthoughts.space-tls + mode: Terminate + certificateRefs: + - kind: Secret + name: midnightthoughts.space-tls - name: https-midnightthoughts-status protocol: HTTPS hostname: "status.midnightthoughts.space" port: 443 allowedRoutes: - namespaces: - from: "All" + namespaces: + from: "All" tls: - mode: Terminate - certificateRefs: - - kind: Secret - name: status.midnightthoughts.space-tls + mode: Terminate + certificateRefs: + - kind: Secret + name: status.midnightthoughts.space-tls - name: https-midnightthoughts-webhook-kubernetes protocol: HTTPS hostname: "webhook.kubernetes.midnightthoughts.space" port: 443 allowedRoutes: - namespaces: - from: "All" + namespaces: + from: "All" tls: - mode: Terminate - certificateRefs: - - kind: Secret - name: webhook.kubernetes.midnightthoughts.space-tls + mode: Terminate + certificateRefs: + - kind: Secret + name: webhook.kubernetes.midnightthoughts.space-tls - name: https-midnightthoughts-rspamd protocol: HTTPS hostname: "rspamd.midnightthoughts.space" port: 443 allowedRoutes: - namespaces: - from: "All" + namespaces: + from: "All" tls: - mode: Terminate - certificateRefs: - - kind: Secret - name: rspamd.midnightthoughts.space-tls + mode: Terminate + certificateRefs: + - kind: Secret + name: rspamd.midnightthoughts.space-tls - name: https-midnightthoughts-grafana protocol: HTTPS hostname: "grafana.midnightthoughts.space" port: 443 allowedRoutes: - namespaces: - from: "All" + namespaces: + from: "All" tls: - mode: Terminate - certificateRefs: - - kind: Secret - name: grafana.midnightthoughts.space-tls + mode: Terminate + certificateRefs: + - kind: Secret + name: grafana.midnightthoughts.space-tls - name: https-midnightthoughts-osticket protocol: HTTPS hostname: "osticket.midnightthoughts.space" port: 443 allowedRoutes: - namespaces: - from: "All" + namespaces: + from: "All" tls: - mode: Terminate - certificateRefs: - - kind: Secret - name: osticket.midnightthoughts.space-tls + mode: Terminate + certificateRefs: + - kind: Secret + name: osticket.midnightthoughts.space-tls - name: https-midnightthoughts-vault protocol: HTTPS hostname: "vault.midnightthoughts.space" port: 443 allowedRoutes: - namespaces: - from: "All" + namespaces: + from: "All" tls: - mode: Terminate - certificateRefs: - - kind: Secret - name: vault.midnightthoughts.space-tls + mode: Terminate + certificateRefs: + - kind: Secret + name: vault.midnightthoughts.space-tls - name: https-midnightthoughts-rook protocol: HTTPS hostname: "rook.midnightthoughts.space" port: 443 allowedRoutes: - namespaces: - from: "All" + namespaces: + from: "All" tls: - mode: Terminate - certificateRefs: - - kind: Secret - name: rook.midnightthoughts.space-tls + mode: Terminate + certificateRefs: + - kind: Secret + name: rook.midnightthoughts.space-tls - name: https-midnightthoughts-jenkins protocol: HTTPS hostname: "jenkins.midnightthoughts.space" port: 443 allowedRoutes: - namespaces: - from: "All" + namespaces: + from: "All" tls: - mode: Terminate - certificateRefs: - - kind: Secret - name: jenkins.midnightthoughts.space-tls + mode: Terminate + certificateRefs: + - kind: Secret + name: jenkins.midnightthoughts.space-tls - name: https-midnightthoughts-gerrit protocol: HTTPS hostname: "gerrit.midnightthoughts.space" port: 443 allowedRoutes: - namespaces: - from: "All" + namespaces: + from: "All" tls: - mode: Terminate - certificateRefs: - - kind: Secret - name: gerrit.midnightthoughts.space-tls + mode: Terminate + certificateRefs: + - kind: Secret + name: gerrit.midnightthoughts.space-tls - name: https-midnightthoughts-uptime protocol: HTTPS hostname: "uptime.midnightthoughts.space" port: 443 allowedRoutes: - namespaces: - from: "All" + namespaces: + from: "All" tls: - mode: Terminate - certificateRefs: - - kind: Secret - name: uptime.midnightthoughts.space-tls + mode: Terminate + certificateRefs: + - kind: Secret + name: uptime.midnightthoughts.space-tls - name: https-midnightthoughts-element-changes protocol: HTTPS hostname: "element-changes.midnightthoughts.space" port: 443 allowedRoutes: - namespaces: - from: "All" + namespaces: + from: "All" tls: - mode: Terminate - certificateRefs: - - kind: Secret - name: element-changes.midnightthoughts.space + mode: Terminate + certificateRefs: + - kind: Secret + name: element-changes.midnightthoughts.space - name: https-nordgedanken-root protocol: HTTPS hostname: "nordgedanken.dev" port: 443 allowedRoutes: - namespaces: - from: "All" + namespaces: + from: "All" tls: - mode: Terminate - certificateRefs: - - kind: Secret - name: nordgedanken.dev-tls + mode: Terminate + certificateRefs: + - kind: Secret + name: nordgedanken.dev-tls - name: https-nordgedanken protocol: HTTPS hostname: "*.nordgedanken.dev" port: 443 allowedRoutes: - namespaces: - from: "All" + namespaces: + from: "All" tls: - mode: Terminate - certificateRefs: - - kind: Secret - name: nordgedanken.dev-tls + mode: Terminate + certificateRefs: + - kind: Secret + name: nordgedanken.dev-tls - name: https-mtrnord-blog-root protocol: HTTPS hostname: "mtrnord.blog" port: 443 allowedRoutes: - namespaces: - from: "All" + namespaces: + from: "All" tls: - mode: Terminate - certificateRefs: - - kind: Secret - name: mtrnord.blog-tls + mode: Terminate + certificateRefs: + - kind: Secret + name: mtrnord.blog-tls - name: https-mtrnord-blog-hubzilla protocol: HTTPS hostname: "hub.mtrnord.blog" port: 443 allowedRoutes: - namespaces: - from: "All" + namespaces: + from: "All" tls: - mode: Terminate - certificateRefs: - - kind: Secret - name: hub.mtrnord.blog-tls + mode: Terminate + certificateRefs: + - kind: Secret + name: hub.mtrnord.blog-tls - name: https-mtrnord-blog-mastodon protocol: HTTPS hostname: "mastodon.mtrnord.blog" port: 443 allowedRoutes: - namespaces: - from: "All" + namespaces: + from: "All" tls: - mode: Terminate - certificateRefs: - - kind: Secret - name: mastodon.mtrnord.blog-tls + mode: Terminate + certificateRefs: + - kind: Secret + name: mastodon.mtrnord.blog-tls - name: http protocol: HTTP port: 80 allowedRoutes: - namespaces: - from: "All" + namespaces: + from: "All" - name: ldap protocol: TCP port: 389 allowedRoutes: - kinds: - - kind: TCPRoute - namespaces: - from: All + kinds: + - kind: TCPRoute + namespaces: + from: All - name: gerrit-ssh protocol: TCP port: 29418 allowedRoutes: - kinds: - - kind: TCPRoute - namespaces: - from: All + kinds: + - kind: TCPRoute + namespaces: + from: All --- apiVersion: gateway.envoyproxy.io/v1alpha1 kind: ClientTrafficPolicy