Compare commits

..
1 Commits
Author SHA1 Message Date
renovate[bot] 488e5c7fc2 chore(deps): update helm chart external-secrets to v2 2026-10-16 15:41:51 +00:00
116 changed files with 1257 additions and 5338 deletions

No files matched your search

+1 -1
View File
@@ -1,4 +1,4 @@
apiVersion: external-secrets.io/v1
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: actualbudget-oidc-client-secret
-14
View File
@@ -36,20 +36,6 @@ spec:
extraEnvVars:
ACTUAL_OPENID_SERVER_HOSTNAME: https://ynab.rubenhensen.nl
# Node trusts its built-in roots, which still include the ones
# above the compromised eMudhra intermediates. Use patched-ca-bundle
# through OpenSSL instead until Node ships a fix.
NODE_OPTIONS: --use-openssl-ca
SSL_CERT_FILE: /etc/ssl/certs/ca-certificates.crt
volumes:
- name: patched-ca-bundle
configMap:
name: patched-ca-bundle
volumeMounts:
- name: patched-ca-bundle
mountPath: /etc/ssl/certs
readOnly: true
# Service configuration
service:
-34
View File
@@ -1,34 +0,0 @@
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: actual-budget
spec:
parentRefs:
- name: homelab
namespace: envoy-gateway-system
sectionName: https-ynab
hostnames:
- ynab.rubenhensen.nl
rules:
- backendRefs:
- name: helm-actual-budget-actualbudget
port: 5006
# No limit on the whole request, as with nginx. Envoy's default of 15s
# cuts off uploads and long-lived connections.
timeouts:
request: 0s
---
# Lets the Gateway serve the certificate cert-manager keeps in this namespace.
apiVersion: gateway.networking.k8s.io/v1
kind: ReferenceGrant
metadata:
name: gateway-tls
spec:
from:
- group: gateway.networking.k8s.io
kind: Gateway
namespace: envoy-gateway-system
to:
- group: ""
kind: Secret
name: actual-budget-tls
-6
View File
@@ -2,9 +2,6 @@ apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: argocd-folder
annotations:
# Let the API server fill in Gateway API defaults before diffing.
argocd.argoproj.io/compare-options: ServerSideDiff=true
spec:
project: default
source:
@@ -17,8 +14,5 @@ spec:
syncPolicy:
syncOptions:
- CreateNamespace=true
# From Argo CD 3.3 the ApplicationSet CRD is too big for client-side
# apply's last-applied annotation.
- ServerSideApply=true
automated:
selfHeal: true
-36
View File
@@ -86,23 +86,8 @@ spec:
secretKeyRef:
name: actualbudget-oidc-client-secret
key: client_secret
- name: LONGHORN_OIDC_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: longhorn-oidc-client-secret
key: client_secret
# Point OpenSSL and requests (which uses certifi otherwise) at
# patched-ca-bundle, mounted below until the image drops the
# compromised eMudhra intermediates.
- name: SSL_CERT_FILE
value: /etc/ssl/certs/ca-certificates.crt
- name: REQUESTS_CA_BUNDLE
value: /etc/ssl/certs/ca-certificates.crt
server:
volumes:
- name: patched-ca-bundle
configMap:
name: patched-ca-bundle
- name: blueprint-vault
configMap:
name: authentik-blueprint-vault
@@ -124,9 +109,6 @@ spec:
- name: blueprint-session
configMap:
name: authentik-blueprint-session
- name: blueprint-longhorn
configMap:
name: authentik-blueprint-longhorn
volumeMounts:
- name: blueprint-vault
mountPath: /blueprints/custom/vault-oidc.yaml
@@ -149,12 +131,6 @@ spec:
- name: blueprint-session
mountPath: /blueprints/custom/session-duration.yaml
subPath: session-duration.yaml
- name: blueprint-longhorn
mountPath: /blueprints/custom/longhorn-oidc.yaml
subPath: longhorn-oidc.yaml
- name: patched-ca-bundle
mountPath: /etc/ssl/certs
readOnly: true
ingress:
enabled: true
ingressClassName: nginx
@@ -168,9 +144,6 @@ spec:
- authentik.rubenhensen.nl
worker:
volumes:
- name: patched-ca-bundle
configMap:
name: patched-ca-bundle
- name: blueprint-vault
configMap:
name: authentik-blueprint-vault
@@ -192,9 +165,6 @@ spec:
- name: blueprint-session
configMap:
name: authentik-blueprint-session
- name: blueprint-longhorn
configMap:
name: authentik-blueprint-longhorn
volumeMounts:
- name: blueprint-vault
mountPath: /blueprints/custom/vault-oidc.yaml
@@ -217,12 +187,6 @@ spec:
- name: blueprint-session
mountPath: /blueprints/custom/session-duration.yaml
subPath: session-duration.yaml
- name: blueprint-longhorn
mountPath: /blueprints/custom/longhorn-oidc.yaml
subPath: longhorn-oidc.yaml
- name: patched-ca-bundle
mountPath: /etc/ssl/certs
readOnly: true
postgresql:
enabled: false
redis:
+1 -17
View File
@@ -12,28 +12,12 @@ spec:
project: default
source:
repoURL: https://charts.jetstack.io
targetRevision: v1.21.2
targetRevision: v1.15.5
chart: cert-manager
helm:
parameters:
- name: crds.enabled
value: 'true'
# The controller talks ACME to Let's Encrypt. Give it a trust store
# without the compromised eMudhra intermediates, see ca-bundle/.
values: |
# Lets cert-manager solve HTTP-01 challenges with an HTTPRoute on
# the Gateway once ingress-nginx is gone.
config:
gatewayAPI:
enabled: true
volumes:
- name: patched-ca-bundle
configMap:
name: patched-ca-bundle
volumeMounts:
- name: patched-ca-bundle
mountPath: /etc/ssl/certs
readOnly: true
syncPolicy:
syncOptions:
- CreateNamespace=true
+2 -7
View File
@@ -10,15 +10,10 @@ spec:
source:
chart: cloudnative-pg
repoURL: https://cloudnative-pg.github.io/charts
targetRevision: 0.29.1
targetRevision: 0.23.2
helm:
values: |
config:
data:
# Swap the instance manager inside running pods on operator
# upgrades instead of restarting them. Both clusters have a
# single instance, so a restart means downtime.
ENABLE_INSTANCE_MANAGER_INPLACE_UPDATES: "true"
# Default values are fine
destination:
server: https://kubernetes.default.svc
namespace: cnpg-system
-26
View File
@@ -1,26 +0,0 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: helm-envoy-gateway
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
project: default
source:
# No scheme, so Argo CD pulls the chart from the OCI registry.
repoURL: docker.io/envoyproxy
chart: gateway-helm
# v1.9 supports Kubernetes 1.33 to 1.36
targetRevision: v1.9.2
destination:
server: https://kubernetes.default.svc
namespace: envoy-gateway-system
syncPolicy:
syncOptions:
- CreateNamespace=true
# The bundled Gateway API CRDs are too big for client-side apply.
- ServerSideApply=true
automated:
prune: true
selfHeal: true
+1 -3
View File
@@ -9,15 +9,13 @@ spec:
syncPolicy:
syncOptions:
- CreateNamespace=true
# From 0.19 the ESO CRDs are too big for client-side apply.
- ServerSideApply=true
automated:
selfHeal: true
project: default
sources:
- chart: external-secrets
repoURL: https://charts.external-secrets.io
targetRevision: 2.14.0
targetRevision: 2.13.0
destination:
server: https://kubernetes.default.svc
namespace: external-secrets
@@ -1,7 +1,7 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: gatus-folder
name: ghost-blog
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
@@ -10,10 +10,10 @@ spec:
source:
repoURL: https://github.com/rubenhensen/k8scd.git
targetRevision: HEAD
path: gatus
path: ghost-blog
destination:
server: https://kubernetes.default.svc
namespace: gatus
namespace: ghost-blog
syncPolicy:
syncOptions:
- CreateNamespace=true
@@ -1,7 +1,7 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: ca-bundle
name: ip-updater
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
@@ -10,12 +10,13 @@ spec:
source:
repoURL: https://github.com/rubenhensen/k8scd.git
targetRevision: HEAD
path: ca-bundle
path: ip-updater
destination:
server: https://kubernetes.default.svc
# Every ConfigMap sets its own namespace.
namespace: argocd
namespace: ip-updater
syncPolicy:
syncOptions:
- CreateNamespace=true
automated:
selfHeal: true
prune: true
@@ -1,7 +1,7 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: ntfy-folder
name: lingo
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
@@ -10,10 +10,10 @@ spec:
source:
repoURL: https://github.com/rubenhensen/k8scd.git
targetRevision: HEAD
path: ntfy
path: lingo
destination:
server: https://kubernetes.default.svc
namespace: ntfy
namespace: lingo
syncPolicy:
syncOptions:
- CreateNamespace=true
+1 -16
View File
@@ -5,10 +5,6 @@ metadata:
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
# Argo CD 3.x adds these for apps with PreDelete hooks (the Longhorn
# chart has one). Listed here so the parent app doesn't see a diff.
- pre-delete-finalizer.argocd.argoproj.io
- pre-delete-finalizer.argocd.argoproj.io/cleanup
spec:
syncPolicy:
syncOptions:
@@ -20,24 +16,13 @@ spec:
sources:
- chart: longhorn
repoURL: https://charts.longhorn.io/
# Stay on 1.11.2 while on Kubernetes 1.33: 1.11.3 and newer need 1.34,
# see docs/upgrade-k8s-1.33.md
targetRevision: 1.11.2
targetRevision: 1.7.3 # Replace with the Longhorn version you'd like to install or upgrade to
helm:
values: |
persistence:
defaultClassReplicaCount: 1
preUpgradeChecker:
jobEnabled: false
# Since 1.8 the backup target is a BackupTarget resource instead of
# the backup-target setting.
defaultBackupStore:
backupTarget: nfs://192.168.1.99:/volume1/microk8s-nfs
pollInterval: 300
defaultSettings:
# Move volumes to the new engine image after each Longhorn
# upgrade, one at a time. At 0 they stayed behind on 1.7.1/1.7.2.
concurrentAutomaticEngineUpgradePerNodeLimit: 1
parameters:
- name: csi.kubeletRootDir
value: "/var/snap/microk8s/common/var/lib/kubelet"
+2 -4
View File
@@ -16,13 +16,11 @@ spec:
chart: wordpress
helm:
values: |
# Official WordPress image configuration. WordPress core lives on the
# volume, so the tag only sets PHP and Apache; 7.1.3-php8.3-apache
# ships PHP 8.3.36, which fixes CVE-2026-109618 and CVE-2026-109619.
# Official WordPress image configuration
image:
registry: docker.io
repository: wordpress
tag: "7.1.3-php8.3-apache"
tag: "6.9.1-apache"
pullPolicy: IfNotPresent
# Disable embedded MariaDB
+21
View File
@@ -0,0 +1,21 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: nas
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
project: default
source:
repoURL: https://github.com/rubenhensen/k8scd.git
targetRevision: HEAD
path: nas
destination:
server: https://kubernetes.default.svc
namespace: nas
syncPolicy:
syncOptions:
- CreateNamespace=true
automated:
selfHeal: true
@@ -1,12 +1,8 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: gateway-folder
name: phocas-lustrum
namespace: argocd
annotations:
# Let the API server fill in Gateway API defaults before diffing, or
# every defaulted field shows up as a difference.
argocd.argoproj.io/compare-options: ServerSideDiff=true
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
@@ -14,13 +10,12 @@ spec:
source:
repoURL: https://github.com/rubenhensen/k8scd.git
targetRevision: HEAD
path: gateway
path: phocas-lustrum
destination:
server: https://kubernetes.default.svc
namespace: envoy-gateway-system
namespace: phocas-lustrum
syncPolicy:
syncOptions:
- ServerSideApply=true
- CreateNamespace=true
automated:
prune: true
selfHeal: true
+22
View File
@@ -0,0 +1,22 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: stalwart
namespace: argocd
spec:
project: default
source:
repoURL: https://github.com/rubenhensen/k8scd.git
targetRevision: HEAD
path: stalwart
destination:
server: https://kubernetes.default.svc
namespace: stalwart
syncPolicy:
automated:
selfHeal: true
prune: true
syncOptions:
- CreateNamespace=true
automated:
selfHeal: true
+21
View File
@@ -0,0 +1,21 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: whisper
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
project: default
source:
repoURL: https://github.com/rubenhensen/k8scd.git
targetRevision: HEAD
path: whishper
destination:
server: https://kubernetes.default.svc
namespace: whisper
syncPolicy:
syncOptions:
- CreateNamespace=true
automated:
selfHeal: true
-34
View File
@@ -1,34 +0,0 @@
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: argocd
spec:
parentRefs:
- name: homelab
namespace: envoy-gateway-system
sectionName: https-argocd
hostnames:
- argocd.rubenhensen.nl
rules:
- backendRefs:
- name: argocd-server
port: 80
# No limit on the whole request, as with nginx. Envoy's default of 15s
# cuts off uploads and long-lived connections.
timeouts:
request: 0s
---
# Lets the Gateway serve the certificate cert-manager keeps in this namespace.
apiVersion: gateway.networking.k8s.io/v1
kind: ReferenceGrant
metadata:
name: gateway-tls
spec:
from:
- group: gateway.networking.k8s.io
kind: Gateway
namespace: envoy-gateway-system
to:
- group: ""
kind: Secret
name: letsencrypt-prod
+8 -3
View File
@@ -3,9 +3,13 @@ kind: Ingress
metadata:
name: argocd-server-ingress
annotations:
# nginx.ingress.kubernetes.io/rewrite-target: /
cert-manager.io/cluster-issuer: prod-cluster-issuer
# argocd-server runs with server.insecure, see overlays/
nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
nginx.ingress.kubernetes.io/ssl-passthrough: "true"
# If you encounter a redirect loop or are getting a 307 response code
# then you need to force the nginx ingress to connect to the backend using HTTPS.
#
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
namespace: argocd
spec:
ingressClassName: nginx
@@ -19,8 +23,9 @@ spec:
service:
name: argocd-server
port:
name: http
name: https
tls:
- secretName: letsencrypt-prod
hosts:
- argocd.rubenhensen.nl
+1 -4
View File
@@ -6,9 +6,8 @@ namespace: argocd
# additional resources like ingress rules, cluster and repository secrets.
resources:
- https://raw.githubusercontent.com/argoproj/argo-cd/refs/tags/v3.4.12/manifests/install.yaml
- https://raw.githubusercontent.com/argoproj/argo-cd/refs/tags/v2.14.2/manifests/install.yaml
- ingress.yaml
- httproute.yaml
- oidc-secret.yaml
patches:
@@ -20,5 +19,3 @@ patches:
path: overlays/argocd-notifications-controller-patch.yaml
- path: overlays/argocd-cm.patch.yaml
- path: overlays/argocd-rbac-cm.patch.yaml
- path: overlays/argocd-cmd-params-cm.patch.yaml
- path: overlays/patched-ca-bundle.patch.yaml
+1 -1
View File
@@ -1,4 +1,4 @@
apiVersion: external-secrets.io/v1
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: argocd-oidc-secret
-4
View File
@@ -7,10 +7,6 @@ metadata:
app.kubernetes.io/part-of: argocd
data:
url: https://argocd.rubenhensen.nl
# Argo CD 3.0 defaults to annotation tracking. Stay on labels through the
# upgrade so no app loses track of its resources; switching is a
# separate step that needs every app synced once.
application.resourceTrackingMethod: label
oidc.config: |
name: Authentik
issuer: https://authentik.rubenhensen.nl/application/o/argocd/
@@ -1,11 +0,0 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-cmd-params-cm
labels:
app.kubernetes.io/name: argocd-cmd-params-cm
app.kubernetes.io/part-of: argocd
data:
# TLS ends at the ingress, so argocd-server serves plain HTTP. Needed for
# the Gateway API, which has no simple way to trust its self-signed cert.
server.insecure: "true"
@@ -1,112 +0,0 @@
# Mount patched-ca-bundle (from ca-bundle/) over /etc/ssl/certs so git, helm
# and the Go binaries stop trusting the compromised eMudhra intermediates.
# The whole directory is replaced because OpenSSL and Go also read the
# per-root files next to ca-certificates.crt. Drop this once Argo CD ships a
# fixed image.
apiVersion: apps/v1
kind: Deployment
metadata:
name: argocd-server
spec:
template:
spec:
containers:
- name: argocd-server
volumeMounts:
- name: patched-ca-bundle
mountPath: /etc/ssl/certs
readOnly: true
volumes:
- name: patched-ca-bundle
configMap:
name: patched-ca-bundle
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: argocd-repo-server
spec:
template:
spec:
containers:
- name: argocd-repo-server
volumeMounts:
- name: patched-ca-bundle
mountPath: /etc/ssl/certs
readOnly: true
volumes:
- name: patched-ca-bundle
configMap:
name: patched-ca-bundle
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: argocd-application-controller
spec:
template:
spec:
containers:
- name: argocd-application-controller
volumeMounts:
- name: patched-ca-bundle
mountPath: /etc/ssl/certs
readOnly: true
volumes:
- name: patched-ca-bundle
configMap:
name: patched-ca-bundle
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: argocd-applicationset-controller
spec:
template:
spec:
containers:
- name: argocd-applicationset-controller
volumeMounts:
- name: patched-ca-bundle
mountPath: /etc/ssl/certs
readOnly: true
volumes:
- name: patched-ca-bundle
configMap:
name: patched-ca-bundle
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: argocd-notifications-controller
spec:
template:
spec:
containers:
- name: argocd-notifications-controller
volumeMounts:
- name: patched-ca-bundle
mountPath: /etc/ssl/certs
readOnly: true
volumes:
- name: patched-ca-bundle
configMap:
name: patched-ca-bundle
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: argocd-dex-server
spec:
template:
spec:
containers:
- name: dex
volumeMounts:
- name: patched-ca-bundle
mountPath: /etc/ssl/certs
readOnly: true
volumes:
- name: patched-ca-bundle
configMap:
name: patched-ca-bundle
+1 -1
View File
@@ -1,4 +1,4 @@
apiVersion: external-secrets.io/v1
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: webhook-es
-53
View File
@@ -1,53 +0,0 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: authentik-blueprint-longhorn
data:
longhorn-oidc.yaml: |
version: 1
metadata:
name: Longhorn OIDC
entries:
# Envoy Gateway does the login for Longhorn, which has no users of its
# own (see longhorn/httproute.yaml).
- model: authentik_providers_oauth2.oauth2provider
id: longhorn-provider
state: present
identifiers:
name: Longhorn
attrs:
name: Longhorn
authorization_flow: !Find [authentik_flows.flow, [slug, default-provider-authorization-implicit-consent]]
authentication_flow: !Find [authentik_flows.flow, [slug, default-authentication-flow]]
invalidation_flow: !Find [authentik_flows.flow, [slug, default-provider-invalidation-flow]]
client_type: confidential
client_id: longhorn
client_secret: !Env [LONGHORN_OIDC_CLIENT_SECRET, ""]
redirect_uris:
- matching_mode: strict
url: https://longhorn.rubenhensen.nl/oauth2/callback
# Envoy's test port until the switch from ingress-nginx
- matching_mode: strict
url: https://longhorn.rubenhensen.nl:10443/oauth2/callback
signing_key: !Find [authentik_crypto.certificatekeypair, [name, "authentik Self-signed Certificate"]]
property_mappings:
- !Find [authentik_providers_oauth2.scopemapping, [managed, goauthentik.io/providers/oauth2/scope-openid]]
- !Find [authentik_providers_oauth2.scopemapping, [managed, goauthentik.io/providers/oauth2/scope-email]]
- !Find [authentik_providers_oauth2.scopemapping, [managed, goauthentik.io/providers/oauth2/scope-profile]]
- model: authentik_core.application
id: longhorn-app
state: present
identifiers:
slug: longhorn
attrs:
name: Longhorn
provider: !KeyOf longhorn-provider
meta_launch_url: https://longhorn.rubenhensen.nl
# Longhorn can delete volumes, so only admins get in.
- model: authentik_policies.policybinding
state: present
identifiers:
order: 0
target: !KeyOf longhorn-app
attrs:
group: !Find [authentik_core.group, [name, "authentik Admins"]]
+7 -25
View File
@@ -1,4 +1,4 @@
apiVersion: external-secrets.io/v1
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: authentik-secrets
@@ -24,7 +24,7 @@ spec:
key: kv/authentik
property: bootstrap_token
---
apiVersion: external-secrets.io/v1
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: authentik-postgres-credentials
@@ -46,7 +46,7 @@ spec:
key: kv/authentik
property: postgres_password
---
apiVersion: external-secrets.io/v1
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: vault-oidc-client-secret
@@ -64,7 +64,7 @@ spec:
key: kv/vault-oidc
property: client_secret
---
apiVersion: external-secrets.io/v1
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: stalwart-oidc-client-secret
@@ -82,7 +82,7 @@ spec:
key: kv/stalwart-oidc
property: client_secret
---
apiVersion: external-secrets.io/v1
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: argocd-oidc-client-secret
@@ -100,7 +100,7 @@ spec:
key: kv/argocd-oidc
property: client_secret
---
apiVersion: external-secrets.io/v1
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: freshrss-oidc-client-secret
@@ -118,7 +118,7 @@ spec:
key: kv/freshrss-oidc
property: client_secret
---
apiVersion: external-secrets.io/v1
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: actualbudget-oidc-client-secret
@@ -135,21 +135,3 @@ spec:
remoteRef:
key: kv/actualbudget-oidc
property: client_secret
---
apiVersion: external-secrets.io/v1
kind: ExternalSecret
metadata:
name: longhorn-oidc-client-secret
spec:
secretStoreRef:
name: vault-backend
kind: ClusterSecretStore
refreshInterval: 15m
target:
name: longhorn-oidc-client-secret
creationPolicy: Owner
data:
- secretKey: client_secret
remoteRef:
key: kv/longhorn-oidc
property: client_secret
-34
View File
@@ -1,34 +0,0 @@
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: authentik
spec:
parentRefs:
- name: homelab
namespace: envoy-gateway-system
sectionName: https-authentik
hostnames:
- authentik.rubenhensen.nl
rules:
- backendRefs:
- name: authentik-server
port: 80
# No limit on the whole request, as with nginx. Envoy's default of 15s
# cuts off uploads and long-lived connections.
timeouts:
request: 0s
---
# Lets the Gateway serve the certificate cert-manager keeps in this namespace.
apiVersion: gateway.networking.k8s.io/v1
kind: ReferenceGrant
metadata:
name: gateway-tls
spec:
from:
- group: gateway.networking.k8s.io
kind: Gateway
namespace: envoy-gateway-system
to:
- group: ""
kind: Secret
name: authentik-tls
-3
View File
@@ -4,9 +4,6 @@ metadata:
name: authentik-postgres
spec:
instances: 1
# Pinned so a new operator default (PostgreSQL 18 since CNPG 1.26.3) can't
# start an in-place major upgrade. CNPG filled this in at creation.
imageName: ghcr.io/cloudnative-pg/postgresql:17.4
primaryUpdateStrategy: unsupervised
bootstrap:
initdb:
@@ -69,13 +69,6 @@ spec:
optional: true
- name: VAPID_SUBJECT
value: mailto:ruben.hensen@protonmail.com
# Node trusts its built-in roots, which still include the ones
# above the compromised eMudhra intermediates. Use
# patched-ca-bundle through OpenSSL instead until Node ships a fix.
- name: NODE_OPTIONS
value: --use-openssl-ca
- name: SSL_CERT_FILE
value: /etc/ssl/certs/ca-certificates.crt
resources:
requests:
memory: "128Mi"
@@ -98,14 +91,8 @@ spec:
volumeMounts:
- mountPath: /app/data
name: data
- mountPath: /etc/ssl/certs
name: patched-ca-bundle
readOnly: true
restartPolicy: Always
volumes:
- name: data
persistentVolumeClaim:
claimName: bolletjestrui-data
- name: patched-ca-bundle
configMap:
name: patched-ca-bundle
+1 -1
View File
@@ -1,4 +1,4 @@
apiVersion: external-secrets.io/v1
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: bolletjestrui-secrets
-34
View File
@@ -1,34 +0,0 @@
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: bolletjestrui
spec:
parentRefs:
- name: homelab
namespace: envoy-gateway-system
sectionName: https-vic
hostnames:
- vic.rubenhensen.nl
rules:
- backendRefs:
- name: bolletjestrui
port: 3000
# No limit on the whole request, as with nginx. Envoy's default of 15s
# cuts off uploads and long-lived connections.
timeouts:
request: 0s
---
# Lets the Gateway serve the certificate cert-manager keeps in this namespace.
apiVersion: gateway.networking.k8s.io/v1
kind: ReferenceGrant
metadata:
name: gateway-tls
spec:
from:
- group: gateway.networking.k8s.io
kind: Gateway
namespace: envoy-gateway-system
to:
- group: ""
kind: Secret
name: letsencrypt-prod
-5
View File
@@ -1,5 +0,0 @@
apiVersion: v2
name: ca-bundle
description: Puts the patched-ca-bundle ConfigMap in every namespace listed in values.yaml
type: application
version: 0.1.0
File diff suppressed because it is too large. Load diff
-20
View File
@@ -1,20 +0,0 @@
{{- /*
Temporary CA bundle: ca-certificates.crt is /etc/ssl/certs/ca-certificates.crt
from Alpine ca-certificates-bundle 20261020-r0, which drops the roots above
the compromised eMudhra intermediates (https://emudhra.we-have-a-problem.com).
Workloads mount it over /etc/ssl/certs until their images ship a fixed
bundle. Server-side apply keeps the bundle out of the last-applied annotation.
*/}}
{{- range .Values.namespaces }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: patched-ca-bundle
namespace: {{ . }}
annotations:
argocd.argoproj.io/sync-options: ServerSideApply=true
data:
ca-certificates.crt: |
{{ $.Files.Get "ca-certificates.crt" | indent 4 }}
{{- end }}
-12
View File
@@ -1,12 +0,0 @@
# Namespaces that get the patched-ca-bundle ConfigMap.
namespaces:
- actual-budget
- argocd
- authentik
- bolletjestrui
- cert-manager
- gatus
- gitea
- immich
- ntfy
- serpbear
+2 -5
View File
@@ -14,8 +14,5 @@ spec:
# Enable the HTTP-01 challenge provider
solvers:
- http01:
gatewayHTTPRoute:
parentRefs:
- name: homelab
namespace: envoy-gateway-system
sectionName: http
ingress:
ingressClassName: nginx
+12 -19
View File
@@ -7,6 +7,10 @@ records:
expire: 300
type: A
content: "46.224.26.65"
- name: "phocaslustrum"
expire: 300
type: A
content: "62.41.86.27"
- name: "ynab"
expire: 300
type: A
@@ -39,6 +43,14 @@ records:
expire: 300
type: A
content: "46.224.26.65"
- name: "lingo"
expire: 300
type: A
content: "46.224.26.65"
- name: "blog"
expire: 300
type: A
content: "46.224.26.65"
- name: "serpbear"
expire: 300
type: A
@@ -51,25 +63,6 @@ records:
expire: 300
type: A
content: "46.224.26.65"
# Gatus status pages. s2 points straight at home, not through the
# Hetzner tunnel, so it stays reachable when Hetzner is down.
- name: "s1"
expire: 300
type: A
content: "46.224.26.65"
- name: "s2"
expire: 300
type: A
content: "62.41.86.27"
# ntfy for Gatus alerts, one next to each Gatus. Same reasoning as s2.
- name: "ntfy1"
expire: 300
type: A
content: "46.224.26.65"
- name: "ntfy2"
expire: 300
type: A
content: "62.41.86.27"
- name: "@"
expire: 300
type: MX
+1 -1
View File
@@ -1,4 +1,4 @@
apiVersion: external-secrets.io/v1
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: transip-credentials
-196
View File
@@ -1,196 +0,0 @@
# Upgrade to Kubernetes 1.33
The cluster runs microk8s 1.32, which is out of upstream support, and Envoy
Gateway v1.9 (the planned ingress-nginx replacement) needs 1.33 or newer.
Several components are too old for 1.33 and have to move first, most of
them one minor version at a time. Everything up to step 7 happens on 1.32.
Compatibility research from 2026-10-22. Recheck release notes before each
step; versions move.
## 1. Preparation
- [x] Every Longhorn volume on engine image v1.7.3, old engine images deleted
- [x] Longhorn system backup (`pre-upgrade-v1-7-3-20261022`)
- [x] Renovate held at Longhorn 1.11.x (1.11.3 and 1.13 need k8s 1.34)
## 2. Longhorn 1.7.3 → 1.11.2
One minor per step, engine images upgraded after each one. Check volumes,
the NFS backup target, the recurring backup job and the Velero `bak`
snapshots after every step. Fresh Velero backup before starting.
- [x] 1.8.2: `backup-target` settings move to a `default` BackupTarget
([notes](https://longhorn.io/docs/archives/1.8.2/important-notes/))
- [x] 1.9.2
- [x] Migrate every Longhorn CRD to `v1beta2` only in `storedVersions`.
Already the case after 1.8.2/1.9.2; recheck right before 1.10.
Mandatory before 1.10; skipping it leaves only a forced downgrade
([notes](https://longhorn.io/docs/archives/1.10.2/important-notes/))
- [x] 1.10.2: v1beta1 API removed, settings move to a v1/v2 JSON format.
Engine images are now `docker.io/longhornio/...`
- [x] 1.11.2. Not 1.11.3 or 1.12.x: those need k8s 1.34
## 3. Smaller components
- [x] CloudNativePG 1.25.1 → 1.26 → 1.27 → 1.28 → 1.29 → 1.30.1 (1.27-1.29 are
EOL already). In-place instance manager updates are on; the databases
restarted once, on the first hop
- [x] Velero 1.15.2 → 1.16.2 (chart 10.1.3), plugin-for-aws v1.12.2
- [x] Vault chart 0.28.1 → 0.34.1 (vault-k8s 1.7.6), server pinned to 1.17.2.
Upgrading the Vault server itself needs the unseal keys
- [x] cert-manager 1.15.5 → 1.16.5 → 1.17.4 → 1.18.6 → 1.19.6 → 1.20.4
(1.18 changes the `rotationPolicy` default to Always)
## 4. External Secrets 0.10.7 → 2.13.0
- [x] Every ExternalSecret and the ClusterSecretStore on `external-secrets.io/v1`
- [x] One minor at a time, 28 hops. The ESO app syncs with server-side apply.
At 0.16.2 the old conversion webhook blocked the new CRDs; setting
`spec.conversion` to `None` by hand on the three CRDs fixed it
- [ ] Later: once every object is stored as v1, drop v1beta1 from the CRDs'
`status.storedVersions` (needed before ESO removes v1beta1 entirely)
## 5. Argo CD 2.14.2 → 3.4.12
- [x] v3.0.23 → v3.1.16 → v3.2.12 → v3.3.18 → v3.4.12. Label tracking is
pinned in `argocd-cm`; our own `resource.exclusions` replaces the 3.0
defaults, so the home-assistant EndpointSlice stays managed.
`argocd-folder` syncs with server-side apply (needed from 3.3)
- [ ] Later: switch to annotation tracking (remove the pin, then sync every
app once)
## 6. Calico 3.25.1 → 3.29.3
- [x] Applied microk8s 1.33's manifest (canonical/microk8s branch 1.33,
`upgrade-scripts/000-switch-to-calico/resources/calico.yaml`) with
`kubectl apply --server-side --force-conflicts`. Same calico-node settings
as before. The manifest is also in
`/var/snap/microk8s/current/args/cni-network/cni.yaml`; the 3.25.1 one is
saved as `~/cni-3.25.1-backup.yaml` on opti1
## 7. microk8s 1.32 → 1.33
- [x] First fix the k8s-dqlite write stalls, see below
- [x] Fresh Velero backup (`pre-microk8s-1-33-202610230712`) and
`sudo microk8s dbctl backup` (`/root/dqlite-pre-1.33-*`)
- [x] `sudo snap refresh microk8s --channel=1.33/stable`: v1.33.13, snap
revision 9067, done 2026-10-23
- [x] `sudo microk8s addons repo update core`: branch 1.33, ingress-nginx
v1.13.8
- [x] If kubelite panics with "Missing actuated resource record"
([#5057](https://github.com/canonical/microk8s/issues/5057)):
`sudo snap revert microk8s`. No panic. The message does show up in the log
without consequences, and kubelite has not restarted since the refresh.
The dqlite snapshot tuning survived the refresh.
- [x] Argo CD 3.x puts pre-delete finalizers on helm-longhorn, so they are
now in git as well
## 8. After 1.33
- [x] cert-manager 1.21.2. The chart dropped the unused tokenrequest Role and
RoleBinding; Argo CD pruned them
- [ ] Envoy Gateway v1.9 instead of ingress-nginx, Longhorn behind authentik
OIDC
- [x] Envoy Gateway v1.9.2 next to nginx. Gateway `homelab` in
`envoy-gateway-system`, Envoy on host ports 10080/10443 (`gateway/`)
- [x] One app (gatus, s2.rubenhensen.nl) on an HTTPRoute, reusing its
existing certificate through a ReferenceGrant; test with
`curl --resolve <host>:10443:192.168.1.204`
- [ ] Longhorn behind authentik OIDC with a SecurityPolicy. Ready on the
local branch `longhorn-oidc`; needs `client_secret` in Vault at
`kv/longhorn-oidc` first, or authentik's pods won't start
- [x] The other apps. Envoy cuts requests off after 15s by default, so the
routes set `timeouts.request: 0s`. All hosts answer the same through
Envoy as through nginx; WordPress only redirects on the test port
because the Host header carries `:10443`
- [x] Argo CD on `server.insecure`, so both nginx and Envoy talk plain
HTTP to argocd-server
- [x] cert-manager `config.gatewayAPI.enabled`
- [ ] Switch over: `microk8s disable ingress`, Envoy on 80/443, and a
`gatewayHTTPRoute` HTTP-01 solver on the ClusterIssuer
- [ ] Replace the Ingress objects with Certificate resources (the
ingress-shim Certificates go with their Ingress, and gateway-shim
can't write to the app namespaces) and drop the nginx annotations
Out of scope here but due: the immich PostgreSQL 14 cluster reaches end of
life on 2026-11-12.
## k8s-dqlite write stalls (found 2026-10-22)
Lease updates regularly take more than 10s (169 of ~162k since the API
server started), so controllers using leader election keep losing it and
restarting: snapshot-controller over 1000 times, the CNPG operator,
Longhorn's CSI sidecars.
Cause: the SQLite file behind dqlite is ~709 MB (173k pages of 4 KB) but
164k pages are free. The live data is ~35 MB: 3,700 kine rows for 3,006
keys, so compaction works. SQLite never returns free pages without VACUUM,
and dqlite writes the whole file into a snapshot (~150 MB compressed)
every 1,024 commits, i.e. every few minutes. Each snapshot takes about 6s
of writing on the Apacer AS350 (DRAM-less SATA SSD, which also holds every
Longhorn volume). Commits queue behind it. Outside snapshots fsync takes
about 1.2 ms.
Constraints:
- microk8s 1.32 and 1.33 ship k8s-dqlite v1.3.5 (dqlite 1.17 LTS). VACUUM
needs dqlite 1.18.2+ (microk8s 1.36). `dbctl restore` writes into the
running DB, so it doesn't shrink anything.
- microk8s 1.34+ ships k8s-dqlite 1.8.x with a reworked write path; that is
where Canonical fixed this class of problem (canonical/microk8s#5153).
Plan (needs sudo; the API is down for the length of a dqlite restart,
workloads keep running). `~/dqlite-tuning.sh` and `~/tuning.yaml` on opti1
do the first three steps: `ssh -t ruben@192.168.1.204 ./dqlite-tuning.sh`
- [x] `sudo microk8s dbctl backup -o /root/dqlite-pre-tuning-<date>`
- [x] Install `backend/tuning.yaml` with
`snapshot: {threshold: 8192, trailing: 16384}`: a snapshot every ~25
minutes instead of every ~3. Never set trailing alone (threshold then
becomes 0). Leaving out the kine intervals keeps their defaults. Costs
~0.5 GB more raft log on disk.
- [x] `sudo snap restart microk8s.daemon-k8s-dqlite`, then check snapshot
spacing in the backend dir and that lease updates stay under 10s.
Measured over the first 40 minutes: snapshots 24.7 minutes apart
(were ~3), 0 of 9,445 lease updates over 4s, no controller restarts
- [ ] Optional: Longhorn backupstore poll interval 300s -> 1800s
(backupvolume updates are ~8% of all writes)
- Later: microk8s 1.34+ for the new write path and 1.36 for VACUUM, see
"On to 1.36" below.
`--cgroups-per-qos=false`, the likely trigger of the 1.32->1.33 kubelite
panic (#5057), is not set in `args/kubelet`.
## On to 1.36
microk8s goes up one minor per refresh. 1.34 brings k8s-dqlite 1.8.x with
the reworked write path, 1.36 brings dqlite 1.18.2, which can VACUUM the
mostly empty database. Before every hop: fresh Velero backup, no
deprecated APIs in use (`apiserver_requested_deprecated_apis` metric
empty), and the Calico manifest of the target version (canonical/microk8s
branch `<version>`, `upgrade-scripts/000-switch-to-calico/resources/calico.yaml`).
### microk8s 1.34
- [ ] Read canonical/microk8s#5568 (LIST stalls with k8s-dqlite on 1.34)
- [ ] Offline backup first: k8s-dqlite 1.8 migrates the schema on first
start, so 1.33 can't read the database afterwards.
`microk8s stop; sudo tar -cf /root/backend-1.33.tar /var/snap/microk8s/current/var/kubernetes/backend; microk8s start`
- [ ] `sudo snap refresh microk8s --channel=1.34/stable`, then
`sudo microk8s addons repo update core` and Calico
### Components for 1.35 and 1.36
- [ ] Longhorn 1.11.2 → 1.12 → 1.13 (one minor at a time, now allowed on
1.34); lift the Renovate hold
- [ ] Argo CD 3.4 → 3.5 (3.4 is tested up to 1.35)
- [ ] Velero 1.16 → 1.17 → 1.18 (1.17 drops restic, we use kopia)
- [ ] Recheck CNPG, External Secrets, the Vault chart and Envoy Gateway
against 1.36
### microk8s 1.35 and 1.36
- [ ] `sudo snap refresh microk8s --channel=1.35/stable`, addons repo, Calico
- [ ] `sudo snap refresh microk8s --channel=1.36/stable`, addons repo, Calico
### Shrink the database
- [ ] On dqlite 1.18.2+: offline backup, then a supervised VACUUM (the
maintainers advise against running it unattended). Expect the file to
go from ~709 MB to ~35 MB and snapshots to shrink with it
+1 -1
View File
@@ -1,4 +1,4 @@
apiVersion: external-secrets.io/v1
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: freshrss-oidc-client-secret
+1 -3
View File
@@ -72,9 +72,7 @@ spec:
value: "server-cache:persistent"
- name: TZ
value: Europe/Amsterdam
# 1.30.3 ships PHP 8.4.27, which fixes CVE-2026-109618 and
# CVE-2026-109619.
image: freshrss/freshrss:1.30.3
image: freshrss/freshrss:latest
name: freshrss
ports:
- containerPort: 80
-34
View File
@@ -1,34 +0,0 @@
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: freshrss
spec:
parentRefs:
- name: homelab
namespace: envoy-gateway-system
sectionName: https-rss
hostnames:
- rss.rubenhensen.nl
rules:
- backendRefs:
- name: freshrss
port: 8080
# No limit on the whole request, as with nginx. Envoy's default of 15s
# cuts off uploads and long-lived connections.
timeouts:
request: 0s
---
# Lets the Gateway serve the certificate cert-manager keeps in this namespace.
apiVersion: gateway.networking.k8s.io/v1
kind: ReferenceGrant
metadata:
name: gateway-tls
spec:
from:
- group: gateway.networking.k8s.io
kind: Gateway
namespace: envoy-gateway-system
to:
- group: ""
kind: Secret
name: letsencrypt-prod
-30
View File
@@ -1,30 +0,0 @@
# How Envoy Gateway runs the proxy: a DaemonSet that takes the node's ports
# 80 and 443 directly, the way the microk8s ingress-nginx addon did. Gateway
# listeners below 1024 run on port + 10000 inside the container (80 becomes
# 10080).
apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyProxy
metadata:
name: hostport
namespace: envoy-gateway-system
spec:
provider:
type: Kubernetes
kubernetes:
# No cloud load balancer here; a LoadBalancer Service would stay pending.
envoyService:
type: ClusterIP
envoyDaemonSet:
patch:
type: StrategicMerge
value:
spec:
template:
spec:
containers:
- name: envoy
ports:
- containerPort: 10080
hostPort: 80
- containerPort: 10443
hostPort: 443
-228
View File
@@ -1,228 +0,0 @@
# The single entry point for all HTTP(S) traffic. Each app adds an HTTPS
# listener for its hostname here and an HTTPRoute in its own namespace.
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: homelab
namespace: envoy-gateway-system
spec:
gatewayClassName: envoy
listeners:
- name: http
protocol: HTTP
port: 80
allowedRoutes:
namespaces:
from: All
# One HTTPS listener per hostname, each limited to its app's namespace.
# The certificates stay in the app namespaces (ReferenceGrant there).
- name: https-s2
protocol: HTTPS
port: 443
hostname: s2.rubenhensen.nl
tls:
certificateRefs:
- name: letsencrypt-prod
namespace: gatus
allowedRoutes:
namespaces:
from: Selector
selector:
matchLabels:
kubernetes.io/metadata.name: gatus
- name: https-ynab
protocol: HTTPS
port: 443
hostname: ynab.rubenhensen.nl
tls:
certificateRefs:
- name: actual-budget-tls
namespace: actual-budget
allowedRoutes:
namespaces:
from: Selector
selector:
matchLabels:
kubernetes.io/metadata.name: actual-budget
- name: https-authentik
protocol: HTTPS
port: 443
hostname: authentik.rubenhensen.nl
tls:
certificateRefs:
- name: authentik-tls
namespace: authentik
allowedRoutes:
namespaces:
from: Selector
selector:
matchLabels:
kubernetes.io/metadata.name: authentik
- name: https-vic
protocol: HTTPS
port: 443
hostname: vic.rubenhensen.nl
tls:
certificateRefs:
- name: letsencrypt-prod
namespace: bolletjestrui
allowedRoutes:
namespaces:
from: Selector
selector:
matchLabels:
kubernetes.io/metadata.name: bolletjestrui
- name: https-rss
protocol: HTTPS
port: 443
hostname: rss.rubenhensen.nl
tls:
certificateRefs:
- name: letsencrypt-prod
namespace: freshrss
allowedRoutes:
namespaces:
from: Selector
selector:
matchLabels:
kubernetes.io/metadata.name: freshrss
- name: https-git
protocol: HTTPS
port: 443
hostname: git.rubenhensen.nl
tls:
certificateRefs:
- name: letsencrypt-prod
namespace: gitea
allowedRoutes:
namespaces:
from: Selector
selector:
matchLabels:
kubernetes.io/metadata.name: gitea
- name: https-ha
protocol: HTTPS
port: 443
hostname: ha.rubenhensen.nl
tls:
certificateRefs:
- name: letsencrypt-prod
namespace: home-assistant
allowedRoutes:
namespaces:
from: Selector
selector:
matchLabels:
kubernetes.io/metadata.name: home-assistant
- name: https-foto
protocol: HTTPS
port: 443
hostname: foto.scoutingmbg.nl
tls:
certificateRefs:
- name: letsencrypt-prod
namespace: immich
allowedRoutes:
namespaces:
from: Selector
selector:
matchLabels:
kubernetes.io/metadata.name: immich
- name: https-scoutingmbg
protocol: HTTPS
port: 443
hostname: scoutingmbg.nl
tls:
certificateRefs:
- name: scoutingmbg-nl-tls
namespace: mbgwp
allowedRoutes:
namespaces:
from: Selector
selector:
matchLabels:
kubernetes.io/metadata.name: mbgwp
- name: https-www-scoutingmbg
protocol: HTTPS
port: 443
hostname: www.scoutingmbg.nl
tls:
certificateRefs:
- name: scoutingmbg-nl-tls
namespace: mbgwp
allowedRoutes:
namespaces:
from: Selector
selector:
matchLabels:
kubernetes.io/metadata.name: mbgwp
- name: https-ntfy2
protocol: HTTPS
port: 443
hostname: ntfy2.rubenhensen.nl
tls:
certificateRefs:
- name: letsencrypt-prod
namespace: ntfy
allowedRoutes:
namespaces:
from: Selector
selector:
matchLabels:
kubernetes.io/metadata.name: ntfy
- name: https-serpbear
protocol: HTTPS
port: 443
hostname: serpbear.rubenhensen.nl
tls:
certificateRefs:
- name: letsencrypt-prod
namespace: serpbear
allowedRoutes:
namespaces:
from: Selector
selector:
matchLabels:
kubernetes.io/metadata.name: serpbear
- name: https-vault
protocol: HTTPS
port: 443
hostname: vault.rubenhensen.nl
tls:
certificateRefs:
- name: letsencrypt-prod
namespace: vault
allowedRoutes:
namespaces:
from: Selector
selector:
matchLabels:
kubernetes.io/metadata.name: vault
- name: https-argocd
protocol: HTTPS
port: 443
hostname: argocd.rubenhensen.nl
tls:
certificateRefs:
- name: letsencrypt-prod
namespace: argocd
allowedRoutes:
namespaces:
from: Selector
selector:
matchLabels:
kubernetes.io/metadata.name: argocd
- name: https-longhorn
protocol: HTTPS
port: 443
hostname: longhorn.rubenhensen.nl
tls:
certificateRefs:
- name: letsencrypt-prod
namespace: longhorn-system
allowedRoutes:
namespaces:
from: Selector
selector:
matchLabels:
kubernetes.io/metadata.name: longhorn-system
-11
View File
@@ -1,11 +0,0 @@
apiVersion: gateway.networking.k8s.io/v1
kind: GatewayClass
metadata:
name: envoy
spec:
controllerName: gateway.envoyproxy.io/gatewayclass-controller
parametersRef:
group: gateway.envoyproxy.io
kind: EnvoyProxy
name: hostport
namespace: envoy-gateway-system
-17
View File
@@ -1,17 +0,0 @@
# Plain HTTP only redirects to HTTPS. cert-manager's HTTP-01 challenge
# routes name an exact hostname, so they win over this catch-all.
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: https-redirect
namespace: envoy-gateway-system
spec:
parentRefs:
- name: homelab
sectionName: http
rules:
- filters:
- type: RequestRedirect
requestRedirect:
scheme: https
statusCode: 301
-105
View File
@@ -1,105 +0,0 @@
# Gatus
Two Gatus instances check the same endpoints from two places:
| Status page | Runs on | Config |
|---|---|---|
| https://s1.rubenhensen.nl | Hetzner (node001) | `nix-infra-machine/nodes/node001.nix` |
| https://s2.rubenhensen.nl | Home cluster | `gatus/config.yaml` (this folder) |
Each one also checks the other's `/health`. The s2 DNS record points straight
at the home IP instead of going through the Hetzner tunnel, so s2 stays
reachable when Hetzner is down.
The endpoint list exists twice, so a new service has to be added in both
places. s1 builds its list from `tunneledHosts`, so new tunneled hosts show up
there automatically. s2 needs them added by hand.
## Alerting
Each Gatus sends alerts to an ntfy instance on its own node:
`ntfy1.rubenhensen.nl` (Hetzner, node001.nix) and `ntfy2.rubenhensen.nl`
(home, `ntfy/` in this repo). Subscribe the phone app to topic `alerts` on
both servers, with the same login on each.
Only the watcher that sees a service from outside alerts on it:
- s1 alerts on everything that runs at home (all tunneled apps, Scouting MBG)
and on s2.
- s2 alerts on mail and on s1.
An outage on either node still reaches you, through the other node's ntfy,
and you get one notification per outage instead of two. An alert fires after
3 failed checks in a row (about 3 minutes), and you get another notification
when the service recovers.
Both ntfy servers deny everything except the provisioned user. The
credentials are the same on both:
- Home: Vault `kv/ntfy` with `auth_users`, `auth_tokens` and `gatus_token`,
pulled in by External Secrets.
- Hetzner: the nix-infra secrets `ntfy-auth-users`, `ntfy-auth-tokens` and
`ntfy-gatus-token`.
## Reading the two pages
- s1 sees the homelab from outside, so trust it for homelab services. s2 sees
Hetzner from outside, so trust it for mail and anything else on Hetzner.
- Every `*.rubenhensen.nl` app is tunneled Hetzner → home, so a Hetzner
outage shows all of them as down on both pages. That is accurate: nobody
can reach them then.
- If s1 and s2 disagree about an endpoint, the problem is the network path
between one watcher and that service, not the service itself.
- Neither page has history for the time its own node was down.
## Later: one URL with self-hosted DNS failover
This is the plan for replacing s1/s2 with a single `status.rubenhensen.nl`
that always points at a watcher that's up, with no third party involved.
Hand `status.rubenhensen.nl` over to two nameservers we run ourselves, one per
node, both PowerDNS Authoritative. PowerDNS LUA records health-check
addresses and only return the healthy ones:
```
@ 30 IN LUA A "ifurlup('https://status.rubenhensen.nl/health', {{'46.224.26.65'}, {'62.41.86.27'}})"
```
The double braces make two groups. PowerDNS returns the first group that has
a healthy address, so Hetzner is primary and home is the fallback. Each
nameserver runs the check from its own location.
| Situation | Hetzner NS | Home NS | Visitors end up on |
|---|---|---|---|
| Both up | answers Hetzner | answers Hetzner | Hetzner |
| Hetzner down | dead | Hetzner check fails, answers home | home |
| Home down / home internet down | answers Hetzner | dead | Hetzner |
| Hetzner up, its Gatus broken | own check fails, answers home | answers home | home |
A node that goes down takes its nameserver down with it, so DNS resolvers
switch to the other nameserver. The two nodes never have to agree with each
other: the answer depends on what the internet can reach. The 30s TTL caps
how long clients keep a stale answer.
Steps:
1. Parent zone (`dns/domains/rubenhensen.nl.yaml`, synced to TransIP): add
`status NS ns-hetzner.rubenhensen.nl.` and `status NS ns-home.rubenhensen.nl.`,
plus A records for `ns-hetzner` (46.224.26.65) and `ns-home` (62.41.86.27).
First check that TransIP accepts NS records for a subdomain.
2. Hetzner: run PowerDNS from node001.nix with `enable-lua-records=yes` and
the bind backend. Use the same zone file as home. Open 53/udp and 53/tcp.
3. Home: run PowerDNS in the cluster with the same zone file, on 53/udp and
53/tcp of the home IP (router port forward, and check how the cluster
exposes UDP).
4. Both Gatus instances also serve `status.rubenhensen.nl`. On Hetzner, add the
name to the SNI map, the same way as s1.
5. TLS: Hetzner gets its cert through HTTP-01 as usual. On Hetzner's :80 vhost
for `status`, serve local ACME challenges and proxy the rest to the home
cluster (`try_files $uri @home`). That way cert-manager's HTTP-01 also
works while DNS points at Hetzner. When Hetzner is down, DNS points home
and cert-manager reaches the home cluster directly.
6. Requirements: a static home IP (`homeIP` in node001.nix already assumes
one), and port 53 open on both nodes.
After that, s1/s2 can be removed, or kept as direct links to each instance.
-136
View File
@@ -1,136 +0,0 @@
# s2.rubenhensen.nl: Gatus on the home cluster.
# Its twin s1.rubenhensen.nl runs on the Hetzner box, see
# nix-infra-machine/nodes/node001.nix. Keep the endpoint lists in sync.
storage:
type: sqlite
path: /data/data.db
ui:
title: Status (homelab)
header: s2 · homelab
buttons:
- name: s1 (Hetzner)
link: https://s1.rubenhensen.nl
# NTFY_TOKEN comes from the gatus-ntfy secret (Vault kv/ntfy)
alerting:
ntfy:
url: http://ntfy.ntfy.svc.cluster.local
topic: alerts
token: ${NTFY_TOKEN}
priority: 4
click: https://s2.rubenhensen.nl
default-alert:
failure-threshold: 3
success-threshold: 2
send-on-resolved: true
# s2 is the outside view of Hetzner, so it alerts on mail and on s1. The
# home services are left to s1.
endpoints:
# Tunneled through Hetzner to the home cluster
- name: rss
group: rubenhensen.nl
url: https://rss.rubenhensen.nl
interval: 60s
# mod_auth_openidc answers 401 instead of redirecting to the login
# page unless the client asks for HTML
headers:
Accept: text/html
conditions: &http-ok
- "[STATUS] == 200"
- "[CERTIFICATE_EXPIRATION] > 168h"
- name: authentik
group: rubenhensen.nl
url: https://authentik.rubenhensen.nl
interval: 60s
conditions: *http-ok
- name: vault
group: rubenhensen.nl
url: https://vault.rubenhensen.nl
interval: 60s
conditions: *http-ok
- name: ynab
group: rubenhensen.nl
url: https://ynab.rubenhensen.nl
interval: 60s
conditions: *http-ok
- name: argocd
group: rubenhensen.nl
url: https://argocd.rubenhensen.nl
interval: 60s
conditions: *http-ok
- name: ha
group: rubenhensen.nl
url: https://ha.rubenhensen.nl
interval: 60s
conditions: *http-ok
- name: longhorn
group: rubenhensen.nl
url: https://longhorn.rubenhensen.nl
interval: 60s
# Behind basic auth, so 401 means it's up
conditions:
- "[STATUS] == 401"
- "[CERTIFICATE_EXPIRATION] > 168h"
- name: serpbear
group: rubenhensen.nl
url: https://serpbear.rubenhensen.nl
interval: 60s
conditions: *http-ok
- name: git
group: rubenhensen.nl
url: https://git.rubenhensen.nl
interval: 60s
conditions: *http-ok
- name: vic
group: rubenhensen.nl
url: https://vic.rubenhensen.nl
interval: 60s
conditions: *http-ok
# Stalwart on Hetzner
- name: webmail
group: mail
url: https://mail.rubenhensen.nl
interval: 60s
conditions: *http-ok
alerts: &ntfy
- type: ntfy
- name: smtp
group: mail
url: tcp://mail.rubenhensen.nl:25
interval: 60s
conditions:
- "[CONNECTED] == true"
alerts: *ntfy
- name: imaps
group: mail
url: tls://mail.rubenhensen.nl:993
interval: 60s
conditions:
- "[CONNECTED] == true"
- "[CERTIFICATE_EXPIRATION] > 168h"
alerts: *ntfy
# Served straight from the home IP
- name: scoutingmbg.nl
group: Scouting MBG
url: https://scoutingmbg.nl
interval: 60s
conditions: *http-ok
- name: foto.scoutingmbg.nl
group: Scouting MBG
url: https://foto.scoutingmbg.nl/_app
interval: 60s
conditions: *http-ok
# The other watcher
- name: s1 (Hetzner)
group: watchers
url: https://s1.rubenhensen.nl/health
interval: 60s
conditions:
- "[STATUS] == 200"
- "[BODY].status == UP"
alerts: *ntfy
-65
View File
@@ -1,65 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: gatus
spec:
replicas: 1
selector:
matchLabels:
app: gatus
strategy:
type: Recreate
template:
metadata:
labels:
app: gatus
spec:
containers:
- name: gatus
image: twinproduction/gatus:v5.37.0
env:
- name: GATUS_CONFIG_PATH
value: /config/config.yaml
- name: TZ
value: Europe/Amsterdam
envFrom:
- secretRef:
name: gatus-ntfy
ports:
- containerPort: 8080
protocol: TCP
readinessProbe:
httpGet:
path: /health
port: 8080
livenessProbe:
httpGet:
path: /health
port: 8080
resources:
requests:
memory: "64Mi"
cpu: "20m"
limits:
memory: "256Mi"
volumeMounts:
- name: config
mountPath: /config
readOnly: true
- name: data
mountPath: /data
# Trust store without the compromised eMudhra intermediates,
# see ca-bundle/. Drop once the image ships a fixed bundle.
- name: patched-ca-bundle
mountPath: /etc/ssl/certs
readOnly: true
volumes:
- name: config
configMap:
name: gatus-config
- name: data
persistentVolumeClaim:
claimName: gatus-data
- name: patched-ca-bundle
configMap:
name: patched-ca-bundle
-11
View File
@@ -1,11 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: gatus
spec:
ports:
- name: http
port: 8080
targetPort: 8080
selector:
app: gatus
-30
View File
@@ -1,30 +0,0 @@
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: gatus
spec:
parentRefs:
- name: homelab
namespace: envoy-gateway-system
sectionName: https-s2
hostnames:
- s2.rubenhensen.nl
rules:
- backendRefs:
- name: gatus
port: 8080
---
# Lets the Gateway serve the certificate cert-manager keeps in this namespace.
apiVersion: gateway.networking.k8s.io/v1
kind: ReferenceGrant
metadata:
name: gateway-tls
spec:
from:
- group: gateway.networking.k8s.io
kind: Gateway
namespace: envoy-gateway-system
to:
- group: ""
kind: Secret
name: letsencrypt-prod
-17
View File
@@ -1,17 +0,0 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: gatus
resources:
- external-secret.yaml
- data-persistentvolumeclaim.yaml
- gatus-deployment.yaml
- gatus-service.yaml
- ingress.yaml
- httproute.yaml
configMapGenerator:
- name: gatus-config
files:
- config.yaml
+42
View File
@@ -0,0 +1,42 @@
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: ghost-mail-config
namespace: ghost-blog
spec:
refreshInterval: "15m"
secretStoreRef:
name: vault-backend
kind: ClusterSecretStore
target:
name: ghost-mail-config
creationPolicy: Owner
data:
- secretKey: mail__transport
remoteRef:
key: kv/ghost-blog/config
property: email_transport
- secretKey: mail__from
remoteRef:
key: kv/ghost-blog/config
property: email_from
- secretKey: mail__options__service
remoteRef:
key: kv/ghost-blog/config
property: email_service
- secretKey: mail__options__host
remoteRef:
key: kv/ghost-blog/config
property: email_host
- secretKey: mail__options__port
remoteRef:
key: kv/ghost-blog/config
property: email_port
- secretKey: mail__options__auth__user
remoteRef:
key: kv/ghost-blog/config
property: email_user
- secretKey: mail__options__auth__pass
remoteRef:
key: kv/ghost-blog/config
property: email_password
+165
View File
@@ -0,0 +1,165 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ghost-blog
namespace: ghost-blog
labels:
app: ghost-blog
app.kubernetes.io/name: ghost-blog
app.kubernetes.io/instance: ghost-blog
app.kubernetes.io/version: '5.92'
app.kubernetes.io/component: ghost
app.kubernetes.io/part-of: ghost-blog
spec:
replicas: 1
selector:
matchLabels:
app: ghost-blog
minReadySeconds: 5
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 0
maxSurge: 3
revisionHistoryLimit: 4
progressDeadlineSeconds: 600
template:
metadata:
namespace: ghost-blog
labels:
app: ghost-blog
spec:
automountServiceAccountToken: false
volumes:
- name: ghost-content
persistentVolumeClaim:
claimName: ghost-content
- name: tmp
emptyDir:
sizeLimit: 64Mi
initContainers:
- name: permissions-fix
imagePullPolicy: IfNotPresent
image: docker.io/busybox:stable-musl
env:
- name: GHOST_CONTENT
value: /var/lib/ghost/content
securityContext:
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
resources:
limits:
cpu: 500m
memory: 256Mi
requests:
cpu: 100m
memory: 128Mi
command:
- /bin/sh
- '-c'
- |
set -e
export DIRS='files logs apps themes data public settings images media'
echo 'Check if base dirs exists, if not, create them'
echo "Directories to check: $DIRS"
for dir in $DIRS; do
if [ ! -d $GHOST_CONTENT/$dir ]; then
echo "Creating $GHOST_CONTENT/$dir directory"
mkdir -pv $GHOST_CONTENT/$dir || echo "Error creating $GHOST_CONTENT/$dir directory"
fi
chown -Rfv 1000:1000 $GHOST_CONTENT/$dir && echo "chown ok on $dir" || echo "Error changing ownership of $GHOST_CONTENT/$dir directory"
done
exit 0
volumeMounts:
- name: ghost-content
mountPath: /var/lib/ghost/content
readOnly: false
containers:
- name: ghost-blog
image: ghost:5.114.1-alpine
imagePullPolicy: Always
ports:
- name: ghost
containerPort: 2368
protocol: TCP
readinessProbe:
httpGet:
path: /ghost/api/v4/admin/site/
port: ghost
httpHeaders:
- name: X-Forwarded-Proto
value: https
- name: Host
value: blog.rubenhensen.nl
periodSeconds: 10
timeoutSeconds: 3
successThreshold: 1
failureThreshold: 3
initialDelaySeconds: 10
livenessProbe:
httpGet:
path: /ghost/api/v4/admin/site/
port: ghost
httpHeaders:
- name: X-Forwarded-Proto
value: https
- name: Host
value: blog.rubenhensen.nl
periodSeconds: 300
timeoutSeconds: 3
successThreshold: 1
failureThreshold: 1
initialDelaySeconds: 30
env:
- name: NODE_ENV
value: production
- name: database__client
value: mysql
- name: database__connection__host
value: ghost-mysql-service
- name: database__connection__user
valueFrom:
secretKeyRef:
name: ghost-mysql-env
key: MYSQL_USER
- name: database__connection__password
valueFrom:
secretKeyRef:
name: ghost-mysql-env
key: MYSQL_PASSWORD
- name: database__connection__database
valueFrom:
secretKeyRef:
name: ghost-mysql-env
key: MYSQL_DATABASE
- name: url
value: https://blog.rubenhensen.nl
envFrom:
- secretRef:
name: ghost-mail-config
resources:
limits:
cpu: 800m
memory: 800Mi
requests:
cpu: 200m
memory: 400Mi
volumeMounts:
- name: ghost-content
mountPath: /var/lib/ghost/content
readOnly: false
- name: tmp
mountPath: /tmp
readOnly: false
securityContext:
allowPrivilegeEscalation: false
runAsNonRoot: true
runAsUser: 1000
restartPolicy: Always
terminationGracePeriodSeconds: 15
dnsPolicy: ClusterFirst
securityContext:
seccompProfile:
type: RuntimeDefault
+33
View File
@@ -0,0 +1,33 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ghost-blog-ingress
namespace: ghost-blog
labels:
app: ghost-blog
app.kubernetes.io/name: ghost-blog-ingress
app.kubernetes.io/instance: ghost-blog
app.kubernetes.io/version: '5.92'
app.kubernetes.io/component: ingress
app.kubernetes.io/part-of: ghost-blog
annotations:
cert-manager.io/cluster-issuer: prod-cluster-issuer
nginx.ingress.kubernetes.io/proxy-body-size: 1G
argocd.argoproj.io/sync-wave: "7"
spec:
ingressClassName: nginx
tls:
- hosts:
- blog.rubenhensen.nl
secretName: ghost-tls-secret
rules:
- host: blog.rubenhensen.nl
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: ghost-service
port:
name: ghost
+36
View File
@@ -0,0 +1,36 @@
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: ghost-mysql-env
namespace: ghost-blog
annotations:
argocd.argoproj.io/sync-wave: "1"
spec:
refreshInterval: "15m"
secretStoreRef:
name: vault-backend
kind: ClusterSecretStore
target:
name: ghost-mysql-env
creationPolicy: Owner
data:
- secretKey: MYSQL_DATABASE
remoteRef:
key: kv/ghost-blog/mysql
property: database
- secretKey: MYSQL_USER
remoteRef:
key: kv/ghost-blog/mysql
property: username
- secretKey: MYSQL_PASSWORD
remoteRef:
key: kv/ghost-blog/mysql
property: password
- secretKey: MYSQL_ROOT_PASSWORD
remoteRef:
key: kv/ghost-blog/mysql
property: root_password
# - secretKey: MYSQL_HOST
# remoteRef:
# key: kv/ghost-blog/mysql
# property: host
+114
View File
@@ -0,0 +1,114 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: ghost-mysql
namespace: ghost-blog
labels:
app: ghost-mysql
app.kubernetes.io/name: ghost-mysql
app.kubernetes.io/instance: ghost-blog
app.kubernetes.io/version: '5.92'
app.kubernetes.io/component: database
app.kubernetes.io/part-of: ghost-blog
annotations:
argocd.argoproj.io/sync-wave: "5"
spec:
serviceName: ghost-mysql-service
replicas: 1
selector:
matchLabels:
app: ghost-mysql
template:
metadata:
labels:
app: ghost-mysql
spec:
initContainers:
- name: ghost-mysql-init
securityContext:
allowPrivilegeEscalation: false
privileged: false
readOnlyRootFilesystem: true
image: docker.io/busybox:stable-musl
imagePullPolicy: IfNotPresent
command:
- /bin/sh
- -c
- |
set -e
echo 'Changing ownership of mysql mount directory to 65534:65534'
chown -Rfv 65534:65534 /mnt/mysql || echo 'Error changing ownership of mysql mount directory to 65534:65534'
echo 'Changing ownership of tmp mount directory to 65534:65534'
chown -Rfv 65534:65534 /mnt/tmp || echo 'Error changing ownership of tmp mount directory to 65534:65534'
echo 'Changing ownership of socket mount directory to 65534:65534'
chown -Rfv 65534:65534 /mnt/var/run/mysqld || echo 'Error changing ownership of socket mount directory to 65534:65534'
volumeMounts:
- name: ghost-mysql-volume
mountPath: /mnt/mysql
subPath: mysql-empty-subdir
readOnly: false
- name: ghost-mysql-tmp
mountPath: /mnt/tmp
readOnly: false
- name: ghost-mysql-socket
mountPath: /mnt/var/run/mysqld
readOnly: false
resources:
requests:
memory: 50Mi
cpu: 50m
limits:
memory: 100Mi
cpu: 100m
containers:
- name: ghost-mysql
securityContext:
allowPrivilegeEscalation: false
privileged: false
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 65534
image: docker.io/mysql:8.4
imagePullPolicy: IfNotPresent
envFrom:
- secretRef:
name: ghost-mysql-env
resources:
requests:
memory: 256Mi
cpu: 100m
limits:
memory: 512Mi
cpu: 500m
ports:
- containerPort: 3306
protocol: TCP
name: mysql
volumeMounts:
- name: ghost-mysql-volume
mountPath: /var/lib/mysql
subPath: mysql-empty-subdir
readOnly: false
- name: ghost-mysql-tmp
mountPath: /tmp
readOnly: false
- name: ghost-mysql-socket
mountPath: /var/run/mysqld
readOnly: false
automountServiceAccountToken: false
securityContext:
seccompProfile:
type: RuntimeDefault
volumes:
- name: ghost-mysql-volume
persistentVolumeClaim:
claimName: ghost-mysql-pvc
- name: ghost-mysql-tmp
emptyDir:
sizeLimit: 128Mi
- name: ghost-mysql-socket
emptyDir:
sizeLimit: 128Mi
+41
View File
@@ -0,0 +1,41 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: ghost-content
namespace: ghost-blog
labels:
app: ghost-blog
app.kubernetes.io/name: ghost-content
app.kubernetes.io/instance: ghost-blog
app.kubernetes.io/version: '5.92'
app.kubernetes.io/component: storage
app.kubernetes.io/part-of: ghost-blog
spec:
storageClassName: "longhorn"
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: ghost-mysql-pvc
namespace: ghost-blog
labels:
app: ghost-mysql
app.kubernetes.io/name: ghost-mysql-pvc
app.kubernetes.io/instance: ghost-blog
app.kubernetes.io/version: '5.92'
app.kubernetes.io/component: database-storage
app.kubernetes.io/part-of: ghost-blog
spec:
storageClassName: "longhorn"
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
+44
View File
@@ -0,0 +1,44 @@
apiVersion: v1
kind: Service
metadata:
name: ghost-service
namespace: ghost-blog
labels:
app: ghost-blog
app.kubernetes.io/name: ghost-service
app.kubernetes.io/instance: ghost-blog
app.kubernetes.io/version: '5.92'
app.kubernetes.io/component: service-frontend
app.kubernetes.io/part-of: ghost-blog
spec:
ports:
- port: 2368
protocol: TCP
targetPort: ghost
name: ghost
type: ClusterIP
selector:
app: ghost-blog
---
apiVersion: v1
kind: Service
metadata:
name: ghost-mysql-service
namespace: ghost-blog
labels:
app: ghost-mysql
app.kubernetes.io/name: ghost-mysql-service
app.kubernetes.io/instance: ghost-blog
app.kubernetes.io/version: '5.92'
app.kubernetes.io/component: service-database
app.kubernetes.io/part-of: ghost-blog
spec:
ports:
- port: 3306
protocol: TCP
targetPort: mysql
name: mysql
type: ClusterIP
selector:
app: ghost-mysql
-8
View File
@@ -53,16 +53,8 @@ spec:
volumeMounts:
- mountPath: /data
name: data
# Trust store without the compromised eMudhra intermediates,
# see ca-bundle/. Drop once the image ships a fixed bundle.
- mountPath: /etc/ssl/certs
name: patched-ca-bundle
readOnly: true
restartPolicy: Always
volumes:
- name: data
persistentVolumeClaim:
claimName: gitea-data
- name: patched-ca-bundle
configMap:
name: patched-ca-bundle
-34
View File
@@ -1,34 +0,0 @@
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: gitea
spec:
parentRefs:
- name: homelab
namespace: envoy-gateway-system
sectionName: https-git
hostnames:
- git.rubenhensen.nl
rules:
- backendRefs:
- name: gitea
port: 3000
# No limit on the whole request, as with nginx. Envoy's default of 15s
# cuts off uploads and long-lived connections.
timeouts:
request: 0s
---
# Lets the Gateway serve the certificate cert-manager keeps in this namespace.
apiVersion: gateway.networking.k8s.io/v1
kind: ReferenceGrant
metadata:
name: gateway-tls
spec:
from:
- group: gateway.networking.k8s.io
kind: Gateway
namespace: envoy-gateway-system
to:
- group: ""
kind: Secret
name: letsencrypt-prod
-34
View File
@@ -1,34 +0,0 @@
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: home-assistant
spec:
parentRefs:
- name: homelab
namespace: envoy-gateway-system
sectionName: https-ha
hostnames:
- ha.rubenhensen.nl
rules:
- backendRefs:
- name: home-assistant-external
port: 8123
# No limit on the whole request, as with nginx. Envoy's default of 15s
# cuts off uploads and long-lived connections.
timeouts:
request: 0s
---
# Lets the Gateway serve the certificate cert-manager keeps in this namespace.
apiVersion: gateway.networking.k8s.io/v1
kind: ReferenceGrant
metadata:
name: gateway-tls
spec:
from:
- group: gateway.networking.k8s.io
kind: Gateway
namespace: envoy-gateway-system
to:
- group: ""
kind: Secret
name: letsencrypt-prod
+3 -23
View File
@@ -1,30 +1,10 @@
# Home Assistant runs outside the cluster on 192.168.1.202. ingress-nginx
# 1.13 resolves an ExternalName as a DNS name and fails on a bare IP, so
# point a selector-less Service at it with a hand-written EndpointSlice.
apiVersion: v1
kind: Service
metadata:
name: home-assistant-external
spec:
type: ExternalName
externalName: 192.168.1.202
ports:
- name: http
port: 8123
- port: 8123
protocol: TCP
targetPort: 8123
---
apiVersion: discovery.k8s.io/v1
kind: EndpointSlice
metadata:
name: home-assistant-external-1
labels:
kubernetes.io/service-name: home-assistant-external
addressType: IPv4
ports:
- name: http
port: 8123
protocol: TCP
endpoints:
- addresses:
- 192.168.1.202
conditions:
ready: true
-25
View File
@@ -91,20 +91,6 @@ spec:
image:
repository: ghcr.io/immich-app/immich-server
pullPolicy: IfNotPresent
# Node trusts its built-in roots, which still include the
# ones above the compromised eMudhra intermediates. Use
# patched-ca-bundle through OpenSSL until Node ships a fix.
env:
NODE_OPTIONS: --use-openssl-ca
SSL_CERT_FILE: /etc/ssl/certs/ca-certificates.crt
persistence:
patched-ca-bundle:
enabled: true
type: configMap
name: patched-ca-bundle
globalMounts:
- path: /etc/ssl/certs
readOnly: true
ingress:
main:
enabled: true
@@ -149,18 +135,7 @@ spec:
TRANSFORMERS_CACHE: /cache
HF_XET_CACHE: /cache/huggingface-xet
MPLCONFIGDIR: /cache/matplotlib-config
# Trust store without the compromised eMudhra
# intermediates; requests would otherwise use certifi.
SSL_CERT_FILE: /etc/ssl/certs/ca-certificates.crt
REQUESTS_CA_BUNDLE: /etc/ssl/certs/ca-certificates.crt
persistence:
patched-ca-bundle:
enabled: true
type: configMap
name: patched-ca-bundle
globalMounts:
- path: /etc/ssl/certs
readOnly: true
cache:
enabled: true
size: 10Gi
-34
View File
@@ -1,34 +0,0 @@
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: immich
spec:
parentRefs:
- name: homelab
namespace: envoy-gateway-system
sectionName: https-foto
hostnames:
- foto.scoutingmbg.nl
rules:
- backendRefs:
- name: sol-auth-svc
port: 8002
# No limit on the whole request, as with nginx. Envoy's default of 15s
# cuts off uploads and long-lived connections.
timeouts:
request: 0s
---
# Lets the Gateway serve the certificate cert-manager keeps in this namespace.
apiVersion: gateway.networking.k8s.io/v1
kind: ReferenceGrant
metadata:
name: gateway-tls
spec:
from:
- group: gateway.networking.k8s.io
kind: Gateway
namespace: envoy-gateway-system
to:
- group: ""
kind: Secret
name: letsencrypt-prod
+39
View File
@@ -0,0 +1,39 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: ip-updater
spec:
schedule: "*/5 * * * *"
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 3
jobTemplate:
spec:
template:
spec:
containers:
- name: ip-updater
image: alpine:3.19
command: ["/bin/sh", "-c"]
args:
- |
apk add --no-cache openssh-client curl > /dev/null 2>&1
cp /ssh-key/private_key /tmp/ssh_key
chmod 600 /tmp/ssh_key
IP=$(curl -s --max-time 10 https://api.ipify.org)
if [ -z "$IP" ]; then
echo "Failed to get external IP"
exit 1
fi
echo "Current external IP: $IP"
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \
-i /tmp/ssh_key root@46.224.26.65 "$IP"
volumeMounts:
- name: ssh-key
mountPath: /ssh-key
readOnly: true
volumes:
- name: ssh-key
secret:
secretName: ip-updater-ssh-key
defaultMode: 0400
restartPolicy: OnFailure
@@ -1,17 +1,17 @@
apiVersion: external-secrets.io/v1
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: gatus-ntfy
name: ip-updater-ssh-key
spec:
secretStoreRef:
name: vault-backend
kind: ClusterSecretStore
refreshInterval: 15m
target:
name: gatus-ntfy
name: ip-updater-ssh-key
creationPolicy: Owner
data:
- secretKey: NTFY_TOKEN
- secretKey: private_key
remoteRef:
key: kv/ntfy
property: gatus_token
key: kv/ip-updater
property: ssh_private_key
+32
View File
@@ -0,0 +1,32 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: lingo-api
name: lingo-api
spec:
replicas: 1
selector:
matchLabels:
app: lingo-api
strategy:
type: Recreate
template:
metadata:
labels:
app: lingo-api
spec:
containers:
- image: ghcr.io/rubenhensen/lingo-api:master-4404fe5
name: lingo-api
ports:
- containerPort: 80
protocol: TCP
resources:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "512Mi"
cpu: "500m"
restartPolicy: Always
+13
View File
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: lingo-api
name: lingo-api
spec:
ports:
- name: "api"
port: 8000
targetPort: 80
selector:
app: lingo-api
+32
View File
@@ -0,0 +1,32 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: lingo-frontend
name: lingo-frontend
spec:
replicas: 1
selector:
matchLabels:
app: lingo-frontend
strategy:
type: Recreate
template:
metadata:
labels:
app: lingo-frontend
spec:
containers:
- image: ghcr.io/rubenhensen/lingo-frontend:master-46bddb5
name: lingo-frontend
ports:
- containerPort: 80
protocol: TCP
resources:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "512Mi"
cpu: "500m"
restartPolicy: Always
+13
View File
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: lingo-frontend
name: lingo-frontend
spec:
ports:
- name: "frontend"
port: 8001
targetPort: 80
selector:
app: lingo-frontend
+50
View File
@@ -0,0 +1,50 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: lingo-api-ingress
annotations:
cert-manager.io/cluster-issuer: prod-cluster-issuer
nginx.ingress.kubernetes.io/ssl-passthrough: "false"
nginx.ingress.kubernetes.io/rewrite-target: /$2
spec:
ingressClassName: nginx
rules:
- host: lingo.rubenhensen.nl
http:
paths:
- path: /api(/|$)(.*)
pathType: ImplementationSpecific
backend:
service:
name: lingo-api
port:
number: 8000
tls:
- secretName: letsencrypt-prod
hosts:
- lingo.rubenhensen.nl
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: lingo-frontend-ingress
annotations:
cert-manager.io/cluster-issuer: prod-cluster-issuer
nginx.ingress.kubernetes.io/ssl-passthrough: "false"
spec:
ingressClassName: nginx
rules:
- host: lingo.rubenhensen.nl
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: lingo-frontend
port:
number: 8001
tls:
- secretName: letsencrypt-prod
hosts:
- lingo.rubenhensen.nl
-76
View File
@@ -1,76 +0,0 @@
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: longhorn
spec:
parentRefs:
- name: homelab
namespace: envoy-gateway-system
sectionName: https-longhorn
hostnames:
- longhorn.rubenhensen.nl
rules:
- backendRefs:
- name: longhorn-frontend
port: 80
# No limit on the whole request, as with nginx. Envoy's default of 15s
# cuts off uploads and long-lived connections.
timeouts:
request: 0s
---
# Longhorn has no login of its own. Envoy sends visitors through authentik
# first; the authentik application only lets admins in.
apiVersion: gateway.envoyproxy.io/v1alpha1
kind: SecurityPolicy
metadata:
name: longhorn-oidc
spec:
targetRefs:
- group: gateway.networking.k8s.io
kind: HTTPRoute
name: longhorn
oidc:
provider:
issuer: https://authentik.rubenhensen.nl/application/o/longhorn/
clientID: longhorn
clientSecret:
name: longhorn-oidc-client-secret
scopes:
- openid
- email
- profile
logoutPath: /logout
---
# Same client secret as authentik's, under the key Envoy Gateway expects.
apiVersion: external-secrets.io/v1
kind: ExternalSecret
metadata:
name: longhorn-oidc-client-secret
spec:
secretStoreRef:
name: vault-backend
kind: ClusterSecretStore
refreshInterval: 15m
target:
name: longhorn-oidc-client-secret
creationPolicy: Owner
data:
- secretKey: client-secret
remoteRef:
key: kv/longhorn-oidc
property: client_secret
---
# Lets the Gateway serve the certificate cert-manager keeps in this namespace.
apiVersion: gateway.networking.k8s.io/v1
kind: ReferenceGrant
metadata:
name: gateway-tls
spec:
from:
- group: gateway.networking.k8s.io
kind: Gateway
namespace: envoy-gateway-system
to:
- group: ""
kind: Secret
name: letsencrypt-prod
-1
View File
@@ -5,6 +5,5 @@ namespace: longhorn-system
resources:
- ingress.yaml
- httproute.yaml
- volume-snapshot.yaml
- https://github.com/kubernetes-csi/external-snapshotter/client/config/crd
+1 -1
View File
@@ -1,4 +1,4 @@
apiVersion: external-secrets.io/v1
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: wordpress-secrets
-38
View File
@@ -1,38 +0,0 @@
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: wordpress
spec:
parentRefs:
- name: homelab
namespace: envoy-gateway-system
sectionName: https-scoutingmbg
- name: homelab
namespace: envoy-gateway-system
sectionName: https-www-scoutingmbg
hostnames:
- scoutingmbg.nl
- www.scoutingmbg.nl
rules:
- backendRefs:
- name: mbgwp-official-helm-wordpress
port: 80
# No limit on the whole request, as with nginx. Envoy's default of 15s
# cuts off uploads and long-lived connections.
timeouts:
request: 0s
---
# Lets the Gateway serve the certificate cert-manager keeps in this namespace.
apiVersion: gateway.networking.k8s.io/v1
kind: ReferenceGrant
metadata:
name: gateway-tls
spec:
from:
- group: gateway.networking.k8s.io
kind: Gateway
namespace: envoy-gateway-system
to:
- group: ""
kind: Secret
name: scoutingmbg-nl-tls
+1 -1
View File
@@ -1,4 +1,4 @@
apiVersion: external-secrets.io/v1
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: mbgwp-mariadb-credentials
+9 -5
View File
@@ -1,7 +1,7 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: gatus-ingress
name: nas-ingress
annotations:
cert-manager.io/cluster-issuer: prod-cluster-issuer
nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
@@ -9,17 +9,21 @@ metadata:
spec:
ingressClassName: nginx
rules:
- host: s2.rubenhensen.nl
- host: nas.rubenhensen.nl
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: gatus
name: nas-external
port:
number: 8080
number: 5000
# TLS configuration for HTTPS
tls:
# TLS secretName used on ClusterIssuer
- secretName: letsencrypt-prod
hosts:
- s2.rubenhensen.nl
- nas.rubenhensen.nl
+14
View File
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: nas-external
spec:
type: ExternalName
externalName: 192.168.1.99
ports:
- name: nas-5000
protocol: TCP
port: 5000
- name: nas-5001
protocol: TCP
port: 5001
+2 -198
View File
@@ -16,6 +16,8 @@ let
"argocd.rubenhensen.nl"
"ha.rubenhensen.nl"
"longhorn.rubenhensen.nl"
"lingo.rubenhensen.nl"
"blog.rubenhensen.nl"
"serpbear.rubenhensen.nl"
"git.rubenhensen.nl"
"vic.rubenhensen.nl"
@@ -36,75 +38,6 @@ let
locations."/".proxyPass = "http://${homeIP}";
};
}) tunneledHosts);
# Gatus endpoints for s1.rubenhensen.nl. Its twin s2.rubenhensen.nl runs
# on the home cluster with the same list, see gatus/config.yaml in k8scd.
# Keep the two in sync.
gatusHttp = group: name: url: {
inherit name group url;
interval = "60s";
conditions = [
"[STATUS] == 200"
"[CERTIFICATE_EXPIRATION] > 168h"
];
};
# Per-host tweaks on top of the default check.
gatusOverrides = {
# Behind basic auth, so 401 means it's up
"longhorn.rubenhensen.nl".conditions = [
"[STATUS] == 401"
"[CERTIFICATE_EXPIRATION] > 168h"
];
# mod_auth_openidc answers 401 instead of redirecting to the login
# page unless the client asks for HTML
"rss.rubenhensen.nl".headers.Accept = "text/html";
};
# s1 is the outside view of home, so it alerts on what runs there and on
# s2. Mail lives on this box, so s2 alerts on that.
gatusAlert = { alerts = [ { type = "ntfy"; } ]; };
gatusEndpoints =
map (h:
gatusHttp "rubenhensen.nl" (lib.removeSuffix ".rubenhensen.nl" h) "https://${h}"
// gatusAlert
// (gatusOverrides.${h} or { })) tunneledHosts
++ [
(gatusHttp "mail" "webmail" "https://mail.rubenhensen.nl")
{
name = "smtp";
group = "mail";
url = "tcp://mail.rubenhensen.nl:25";
interval = "60s";
conditions = [ "[CONNECTED] == true" ];
}
{
name = "imaps";
group = "mail";
url = "tls://mail.rubenhensen.nl:993";
interval = "60s";
conditions = [ "[CONNECTED] == true" "[CERTIFICATE_EXPIRATION] > 168h" ];
}
(gatusHttp "Scouting MBG" "scoutingmbg.nl" "https://scoutingmbg.nl" // gatusAlert)
(gatusHttp "Scouting MBG" "foto.scoutingmbg.nl" "https://foto.scoutingmbg.nl/_app" // gatusAlert)
({
name = "s2 (homelab)";
group = "watchers";
url = "https://s2.rubenhensen.nl/health";
interval = "60s";
conditions = [ "[STATUS] == 200" "[BODY].status == UP" ];
} // gatusAlert)
];
# Runs a service with secrets from LoadCredentialEncrypted exported as
# env vars, for services that only take secrets through the environment.
withCredentialEnv = name: vars: cmd: pkgs.writeShellScript "${name}-with-credentials" ''
${lib.concatStrings (lib.mapAttrsToList (var: cred: ''
export ${var}="$(cat "$CREDENTIALS_DIRECTORY/${cred}")"
'') vars)}
exec ${cmd}
'';
in
{
# ──────────────────────────────────────────────
@@ -120,17 +53,6 @@ in
80 # HTTP (ACME)
];
# ──────────────────────────────────────────────
# Trust store
# ──────────────────────────────────────────────
# Distrust the roots above the compromised eMudhra intermediates until
# nixpkgs ships NSS 3.131.1, see https://emudhra.we-have-a-problem.com.
# Everything this box talks to chains to ISRG Root X1.
security.pki.caCertificateBlacklist = [
"Comodo AAA Services root"
"emSign ECC Root CA - G3"
];
# ──────────────────────────────────────────────
# ACME / Let's Encrypt
# ──────────────────────────────────────────────
@@ -164,12 +86,9 @@ in
# SNI passthrough on 443:
# - mail.rubenhensen.nl (and anything else) → local stalwart on 8443
# - tunneled hosts → home cluster ingress on 443
# - s1 / ntfy1.rubenhensen.nl → local nginx on 8444 (Gatus, ntfy)
streamConfig = ''
map $ssl_preread_server_name $tunnel_upstream {
${sniMapEntries}
s1.rubenhensen.nl 127.0.0.1:8444;
ntfy1.rubenhensen.nl 127.0.0.1:8444;
default 127.0.0.1:8443;
}
@@ -218,121 +137,6 @@ ${sniMapEntries}
locations."/.well-known/acme-challenge/".root = "/var/lib/acme/acme-challenge";
locations."/".return = "301 https://$host$request_uri";
};
# Gatus status page. The stream block above passes its SNI to
# 8444, where nginx terminates TLS with its own ACME cert.
"s1.rubenhensen.nl" = {
listen = [
{ addr = "0.0.0.0"; port = 80; }
{ addr = "[::]"; port = 80; }
{ addr = "127.0.0.1"; port = 8444; ssl = true; }
];
enableACME = true;
forceSSL = true;
locations."/".proxyPass = "http://127.0.0.1:8090";
};
# ntfy for Gatus alerts, same TLS setup as s1. Proxy settings follow
# the ntfy docs so subscriptions can stay open.
"ntfy1.rubenhensen.nl" = {
listen = [
{ addr = "0.0.0.0"; port = 80; }
{ addr = "[::]"; port = 80; }
{ addr = "127.0.0.1"; port = 8444; ssl = true; }
];
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:2586";
proxyWebsockets = true;
extraConfig = ''
proxy_buffering off;
proxy_request_buffering off;
proxy_connect_timeout 3m;
proxy_send_timeout 3m;
proxy_read_timeout 3m;
client_max_body_size 0;
'';
};
};
};
};
# ──────────────────────────────────────────────
# ntfy (ntfy1.rubenhensen.nl)
# ──────────────────────────────────────────────
# Users and tokens come from secrets, everything else is denied. The
# same login works on ntfy2.rubenhensen.nl at home.
services.ntfy-sh = {
enable = true;
settings = {
base-url = "https://ntfy1.rubenhensen.nl";
listen-http = "127.0.0.1:2586";
behind-proxy = true;
auth-file = "/var/lib/ntfy-sh/user.db";
auth-default-access = "deny-all";
cache-file = "/var/lib/ntfy-sh/cache.db";
# Needed for instant delivery on iOS. ntfy.sh only gets the message
# ID, never the content.
upstream-base-url = "https://ntfy.sh";
};
};
systemd.services.ntfy-sh.serviceConfig = {
LoadCredentialEncrypted = [
"ntfy-auth-users:/root/secrets/[%%secrets/ntfy-auth-users%%]"
"ntfy-auth-tokens:/root/secrets/[%%secrets/ntfy-auth-tokens%%]"
];
ExecStart = lib.mkForce (withCredentialEnv "ntfy-sh" {
NTFY_AUTH_USERS = "ntfy-auth-users";
NTFY_AUTH_TOKENS = "ntfy-auth-tokens";
} "${config.services.ntfy-sh.package}/bin/ntfy serve -c /etc/ntfy/server.yml");
};
# ──────────────────────────────────────────────
# Gatus (s1.rubenhensen.nl)
# ──────────────────────────────────────────────
services.gatus = {
enable = true;
settings = {
web = {
address = "127.0.0.1";
port = 8090;
};
storage = {
type = "sqlite";
path = "/var/lib/gatus/data.db";
};
ui = {
title = "Status (Hetzner)";
header = "s1 · Hetzner";
buttons = [
{ name = "s2 (homelab)"; link = "https://s2.rubenhensen.nl"; }
];
};
alerting.ntfy = {
url = "http://127.0.0.1:2586";
topic = "alerts";
token = "\${NTFY_TOKEN}";
priority = 4;
click = "https://s1.rubenhensen.nl";
default-alert = {
failure-threshold = 3;
success-threshold = 2;
send-on-resolved = true;
};
};
endpoints = gatusEndpoints;
};
};
systemd.services.gatus = {
after = [ "ntfy-sh.service" ];
serviceConfig = {
LoadCredentialEncrypted = [
"ntfy-gatus-token:/root/secrets/[%%secrets/ntfy-gatus-token%%]"
];
ExecStart = lib.mkForce (withCredentialEnv "gatus" {
NTFY_TOKEN = "ntfy-gatus-token";
} (lib.getExe config.services.gatus.package));
};
};
-21
View File
@@ -1,21 +0,0 @@
apiVersion: external-secrets.io/v1
kind: ExternalSecret
metadata:
name: ntfy-auth
spec:
secretStoreRef:
name: vault-backend
kind: ClusterSecretStore
refreshInterval: 15m
target:
name: ntfy-auth
creationPolicy: Owner
data:
- secretKey: NTFY_AUTH_USERS
remoteRef:
key: kv/ntfy
property: auth_users
- secretKey: NTFY_AUTH_TOKENS
remoteRef:
key: kv/ntfy
property: auth_tokens
-34
View File
@@ -1,34 +0,0 @@
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: ntfy
spec:
parentRefs:
- name: homelab
namespace: envoy-gateway-system
sectionName: https-ntfy2
hostnames:
- ntfy2.rubenhensen.nl
rules:
- backendRefs:
- name: ntfy
port: 80
# No limit on the whole request, as with nginx. Envoy's default of 15s
# cuts off uploads and long-lived connections.
timeouts:
request: 0s
---
# Lets the Gateway serve the certificate cert-manager keeps in this namespace.
apiVersion: gateway.networking.k8s.io/v1
kind: ReferenceGrant
metadata:
name: gateway-tls
spec:
from:
- group: gateway.networking.k8s.io
kind: Gateway
namespace: envoy-gateway-system
to:
- group: ""
kind: Secret
name: letsencrypt-prod
-28
View File
@@ -1,28 +0,0 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ntfy-ingress
annotations:
cert-manager.io/cluster-issuer: prod-cluster-issuer
nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
nginx.ingress.kubernetes.io/ssl-passthrough: "false"
# Keep subscriptions open, as in the ntfy proxy docs
nginx.ingress.kubernetes.io/proxy-read-timeout: "180"
nginx.ingress.kubernetes.io/proxy-send-timeout: "180"
spec:
ingressClassName: nginx
rules:
- host: ntfy2.rubenhensen.nl
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: ntfy
port:
number: 80
tls:
- secretName: letsencrypt-prod
hosts:
- ntfy2.rubenhensen.nl
-12
View File
@@ -1,12 +0,0 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: ntfy
resources:
- external-secret.yaml
- data-persistentvolumeclaim.yaml
- ntfy-deployment.yaml
- ntfy-service.yaml
- ingress.yaml
- httproute.yaml
-74
View File
@@ -1,74 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ntfy
spec:
replicas: 1
selector:
matchLabels:
app: ntfy
strategy:
type: Recreate
template:
metadata:
labels:
app: ntfy
spec:
containers:
- name: ntfy
image: binwiederhier/ntfy:v2.28.0
args: ["serve"]
env:
- name: NTFY_BASE_URL
value: https://ntfy2.rubenhensen.nl
- name: NTFY_LISTEN_HTTP
value: ":80"
- name: NTFY_BEHIND_PROXY
value: "true"
- name: NTFY_AUTH_FILE
value: /var/lib/ntfy/user.db
- name: NTFY_AUTH_DEFAULT_ACCESS
value: deny-all
- name: NTFY_CACHE_FILE
value: /var/lib/ntfy/cache.db
# Needed for instant delivery on iOS. ntfy.sh only gets the
# message ID, never the content.
- name: NTFY_UPSTREAM_BASE_URL
value: https://ntfy.sh
- name: TZ
value: Europe/Amsterdam
envFrom:
- secretRef:
name: ntfy-auth
ports:
- containerPort: 80
protocol: TCP
readinessProbe:
httpGet:
path: /v1/health
port: 80
livenessProbe:
httpGet:
path: /v1/health
port: 80
resources:
requests:
memory: "32Mi"
cpu: "10m"
limits:
memory: "256Mi"
volumeMounts:
- name: data
mountPath: /var/lib/ntfy
# Trust store without the compromised eMudhra intermediates,
# see ca-bundle/. Drop once the image ships a fixed bundle.
- name: patched-ca-bundle
mountPath: /etc/ssl/certs
readOnly: true
volumes:
- name: data
persistentVolumeClaim:
claimName: ntfy-data
- name: patched-ca-bundle
configMap:
name: patched-ca-bundle
-11
View File
@@ -1,11 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: ntfy
spec:
ports:
- name: http
port: 80
targetPort: 80
selector:
app: ntfy
+1 -10
View File
@@ -18,9 +18,7 @@
"/apps/templates/.+\\.yaml$/",
"/serpbear/.+\\.yaml$/",
"/bolletjestrui/.+\\.yaml$/",
"/gitea/.+\\.yaml$/",
"/gatus/.+\\.yaml$/",
"/ntfy/.+\\.yaml$/"
"/gitea/.+\\.yaml$/"
]
},
"customManagers": [
@@ -46,13 +44,6 @@
}
],
"packageRules": [
{
"description": "Longhorn 1.11.3 and newer need Kubernetes 1.34, see docs/upgrade-k8s-1.33.md",
"matchPackageNames": [
"longhorn"
],
"allowedVersions": "<1.11.3"
},
{
"matchDatasources": [
"helm"
+33
View File
@@ -0,0 +1,33 @@
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: hensenio-ghost-secrets
namespace: blog
spec:
refreshInterval: "15m"
secretStoreRef:
name: vault-backend
kind: ClusterSecretStore
target:
name: ghost-es
creationPolicy: Owner
data:
- secretKey: mysql-root-password
remoteRef:
key: kv/ghost
property: ghostmsqlrootpw
- secretKey: mysql-password
remoteRef:
key: kv/ghost
property: ghostmsqlpw
- secretKey: ghost-password
remoteRef:
key: kv/ghost
property: ghostpw
- secretKey: smtp-password
remoteRef:
key: kv/hensenio/smtp
property: password
+1 -1
View File
@@ -1,4 +1,4 @@
apiVersion: external-secrets.io/v1
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: serpbear-secrets
-34
View File
@@ -1,34 +0,0 @@
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: serpbear
spec:
parentRefs:
- name: homelab
namespace: envoy-gateway-system
sectionName: https-serpbear
hostnames:
- serpbear.rubenhensen.nl
rules:
- backendRefs:
- name: serpbear
port: 3000
# No limit on the whole request, as with nginx. Envoy's default of 15s
# cuts off uploads and long-lived connections.
timeouts:
request: 0s
---
# Lets the Gateway serve the certificate cert-manager keeps in this namespace.
apiVersion: gateway.networking.k8s.io/v1
kind: ReferenceGrant
metadata:
name: gateway-tls
spec:
from:
- group: gateway.networking.k8s.io
kind: Gateway
namespace: envoy-gateway-system
to:
- group: ""
kind: Secret
name: letsencrypt-prod
-13
View File
@@ -44,13 +44,6 @@ spec:
value: https://serpbear.rubenhensen.nl
- name: TZ
value: Europe/Amsterdam
# Node trusts its built-in roots, which still include the ones
# above the compromised eMudhra intermediates. Use
# patched-ca-bundle through OpenSSL instead until Node ships a fix.
- name: NODE_OPTIONS
value: --use-openssl-ca
- name: SSL_CERT_FILE
value: /etc/ssl/certs/ca-certificates.crt
image: towfiqi/serpbear:3.1.0
name: serpbear
ports:
@@ -59,14 +52,8 @@ spec:
volumeMounts:
- mountPath: /app/data
name: data
- mountPath: /etc/ssl/certs
name: patched-ca-bundle
readOnly: true
restartPolicy: Always
volumes:
- name: data
persistentVolumeClaim:
claimName: data
- name: patched-ca-bundle
configMap:
name: patched-ca-bundle
+1 -1
View File
@@ -1,4 +1,4 @@
apiVersion: external-secrets.io/v1
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: vault-oidc-config
+1 -1
View File
@@ -16,7 +16,7 @@ spec:
sources:
- chart: vault
repoURL: https://helm.releases.hashicorp.com
targetRevision: 0.34.1
targetRevision: 0.28.1
helm:
valueFiles:
- $values/vault/overrides.yaml
-34
View File
@@ -1,34 +0,0 @@
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: vault
spec:
parentRefs:
- name: homelab
namespace: envoy-gateway-system
sectionName: https-vault
hostnames:
- vault.rubenhensen.nl
rules:
- backendRefs:
- name: vault-active
port: 8200
# No limit on the whole request, as with nginx. Envoy's default of 15s
# cuts off uploads and long-lived connections.
timeouts:
request: 0s
---
# Lets the Gateway serve the certificate cert-manager keeps in this namespace.
apiVersion: gateway.networking.k8s.io/v1
kind: ReferenceGrant
metadata:
name: gateway-tls
spec:
from:
- group: gateway.networking.k8s.io
kind: Gateway
namespace: envoy-gateway-system
to:
- group: ""
kind: Secret
name: letsencrypt-prod
-13
View File
@@ -3,20 +3,7 @@ global:
tlsDisable: true
injector:
enabled: true
# The chart's default anti-affinity forbids two injector pods on one
# node, so on this single node a rolling update can never start the new
# pod while the old one runs. Recreate removes the old pod first, which
# also gets past pods that still carry the old anti-affinity.
affinity: ""
strategy:
type: Recreate
rollingUpdate: null
server:
# Pinned to the running version: the chart would otherwise pull its own
# default on the next pod restart, and with Shamir unsealing a Vault
# upgrade needs someone with the unseal keys at hand.
image:
tag: "1.17.2"
dataStorage:
storageClass: longhorn
standalone:
+2 -4
View File
@@ -1,13 +1,11 @@
apiVersion: external-secrets.io/v1
apiVersion: external-secrets.io/v1beta1
kind: ClusterSecretStore
metadata:
name: vault-backend
spec:
provider:
vault:
# In-cluster, so syncing secrets doesn't depend on Hetzner or the home
# internet connection. Plain HTTP, like the ingress → Vault hop.
server: "http://vault-active.vault.svc:8200"
server: "https://vault.rubenhensen.nl"
path: "kv"
# Version is the Vault KV secret engine version.
# This can be either "v1" or "v2", defaults to "v2"
-3
View File
@@ -11,6 +11,3 @@ spec:
defaultVolumesToFsBackup: true
snapshotVolumes: true
snapshotMoveData: true
resourcePolicy:
kind: configmap
name: skip-emptydir-policy
-16
View File
@@ -1,16 +0,0 @@
# Volume policy for the backup schedules. emptyDir volumes hold nothing
# worth keeping, and backing them up fails when the pod is gone before its
# volume is read, as happens with Velero's own repository maintenance jobs.
apiVersion: v1
kind: ConfigMap
metadata:
name: skip-emptydir-policy
data:
policy.yaml: |
version: v1
volumePolicies:
- conditions:
volumeTypes:
- emptyDir
action:
type: skip
Loaded 100 of 116 files, more files were not shown because too many files have changed in this diff. Show more