k8s-and-chill/rendered/envs/production/hcloud-csi/daemonset-hcloud-csi-node.yaml
Felix Wolf 25714eeef6 feat: Migrate Forgejo to CNPG PostgreSQL + Hetzner CSI volumes
- Add hcloud-csi prototype (Hetzner Cloud CSI driver)
- Add cloudnative-pg prototype (CNPG operator)
- Add CNPG Cluster CR for Forgejo (2 instances, lean config for 4GB nodes)
- Add 20Gi hcloud-volumes PVC for Forgejo git repos
- Switch Forgejo from SQLite to PostgreSQL (forgejo-cnpg-rw service)
- Switch Forgejo persistence to hcloud-volumes (forgejo-git-storage)
- Fix ClusterRoleBinding subject namespaces for hcloud-csi and CNPG
- Fix CNPG webhook service namespace references

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 16:37:13 +02:00

131 lines
4 KiB
YAML

apiVersion: apps/v1
kind: DaemonSet
metadata:
annotations:
a8r.io/repository: ssh://git@git.tr1ceracop.de:222/gitea_admin/k8s-and-chill.git
labels:
app: hcloud-csi
app.kubernetes.io/component: node
app.kubernetes.io/instance: hcloud-csi
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: hcloud-csi
helm.sh/chart: hcloud-csi-2.12.0
name: hcloud-csi-node
namespace: kube-system
spec:
selector:
matchLabels:
app.kubernetes.io/component: node
app.kubernetes.io/instance: hcloud-csi
app.kubernetes.io/name: hcloud-csi
template:
metadata:
labels:
app.kubernetes.io/component: node
app.kubernetes.io/instance: hcloud-csi
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: hcloud-csi
helm.sh/chart: hcloud-csi-2.12.0
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: instance.hetzner.cloud/is-root-server
operator: NotIn
values:
- "true"
- key: instance.hetzner.cloud/provided-by
operator: NotIn
values:
- robot
containers:
- args:
- --kubelet-registration-path=/var/lib/kubelet/plugins/csi.hetzner.cloud/socket
image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.13.0
imagePullPolicy: IfNotPresent
name: csi-node-driver-registrar
resources:
limits: {}
requests: {}
volumeMounts:
- mountPath: /run/csi
name: plugin-dir
- mountPath: /registration
name: registration-dir
- image: registry.k8s.io/sig-storage/livenessprobe:v2.15.0
imagePullPolicy: IfNotPresent
name: liveness-probe
resources:
limits: {}
requests: {}
volumeMounts:
- mountPath: /run/csi
name: plugin-dir
- command:
- /bin/hcloud-csi-driver-node
env:
- name: CSI_ENDPOINT
value: unix:///run/csi/socket
- name: ENABLE_METRICS
value: "false"
image: docker.io/hetznercloud/hcloud-csi-driver:v2.12.0
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 5
httpGet:
path: /healthz
port: healthz
initialDelaySeconds: 10
periodSeconds: 2
successThreshold: 1
timeoutSeconds: 3
name: hcloud-csi-driver
ports:
- containerPort: 9808
name: healthz
protocol: TCP
resources:
limits: {}
requests: {}
securityContext:
privileged: true
volumeMounts:
- mountPath: /var/lib/kubelet
mountPropagation: Bidirectional
name: kubelet-dir
- mountPath: /run/csi
name: plugin-dir
- mountPath: /dev
name: device-dir
initContainers: null
securityContext:
fsGroup: 1001
tolerations:
- effect: NoExecute
operator: Exists
- effect: NoSchedule
operator: Exists
- key: CriticalAddonsOnly
operator: Exists
volumes:
- hostPath:
path: /var/lib/kubelet
type: Directory
name: kubelet-dir
- hostPath:
path: /var/lib/kubelet/plugins/csi.hetzner.cloud/
type: DirectoryOrCreate
name: plugin-dir
- hostPath:
path: /var/lib/kubelet/plugins_registry/
type: Directory
name: registration-dir
- hostPath:
path: /dev
type: Directory
name: device-dir
updateStrategy:
type: RollingUpdate