From f969dcf4ca216816775e3b09cd7504722d6c4cef Mon Sep 17 00:00:00 2001 From: Lance Walters Date: Sat, 21 Nov 2026 16:24:09 -0500 Subject: [PATCH] storage: add linode-local StorageClass + provisioner (local-path-linode) Adds an independent local-path-provisioner pinned to the linode worker with its own ConfigMap (local-path-config-linode), helper pod, and StorageClass local-path-linode. The existing siriussec provisioner, its ConfigMap, the local-path StorageClass (still the cluster default) and every existing PVC/PV are untouched. --- infrastructure/storage/kustomization.yaml | 1 + infrastructure/storage/local-path-linode.yaml | 122 ++++++++++++++++++ 2 files changed, 123 insertions(+) create mode 100644 infrastructure/storage/local-path-linode.yaml diff --git a/infrastructure/storage/kustomization.yaml b/infrastructure/storage/kustomization.yaml index e317fb0..6a6e563 100644 --- a/infrastructure/storage/kustomization.yaml +++ b/infrastructure/storage/kustomization.yaml @@ -2,3 +2,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - local-path-storage.yaml + - local-path-linode.yaml diff --git a/infrastructure/storage/local-path-linode.yaml b/infrastructure/storage/local-path-linode.yaml new file mode 100644 index 0000000..f432cbd --- /dev/null +++ b/infrastructure/storage/local-path-linode.yaml @@ -0,0 +1,122 @@ +# Second local-path provisioner, pinned to the `linode` worker. +# +# The original `local-path` StorageClass keeps its single-replica provisioner on +# siriussec (and its helper pod pinned there), so a PVC consumed by a pod on +# linode would have its directory created on the ThinkPad's disk. This file adds +# an independent provisioner + StorageClass whose volumes live on linode's own +# disk. `local-path` remains the cluster default; nothing here touches it. +# +# Volumes land under /opt/local-path-provisioner/pvc-__ on linode. +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: local-path-config-linode + namespace: local-path-storage +data: + config.json: |- + { + "nodePathMap":[ + { + "node":"DEFAULT_PATH_FOR_NON_LISTED_NODES", + "paths":["/opt/local-path-provisioner"] + }, + { + "node":"linode", + "paths":["/opt/local-path-provisioner"] + } + ] + } + setup: |- + #!/bin/sh + set -eu + mkdir -m 0777 -p "$VOL_DIR" + teardown: |- + #!/bin/sh + set -eu + rm -rf "$VOL_DIR" + helperPod.yaml: |- + apiVersion: v1 + kind: Pod + metadata: + name: helper-pod + spec: + priorityClassName: system-node-critical + nodeSelector: + kubernetes.io/hostname: linode + tolerations: + - key: node.kubernetes.io/disk-pressure + operator: Exists + effect: NoSchedule + - key: dedicated + operator: Equal + value: network + effect: PreferNoSchedule + containers: + - name: helper-pod + image: busybox + imagePullPolicy: IfNotPresent +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: local-path-provisioner-linode + namespace: local-path-storage +spec: + replicas: 1 + selector: + matchLabels: + app: local-path-provisioner-linode + template: + metadata: + labels: + app: local-path-provisioner-linode + spec: + serviceAccountName: local-path-provisioner-service-account + nodeSelector: + kubernetes.io/hostname: linode + tolerations: + - key: dedicated + operator: Equal + value: network + effect: PreferNoSchedule + containers: + - name: local-path-provisioner + image: rancher/local-path-provisioner:v0.0.31 + imagePullPolicy: IfNotPresent + command: + - local-path-provisioner + - --debug + - start + - --config + - /etc/config/config.json + - --provisioner-name + - rancher.io/local-path-linode + - --configmap-name + - local-path-config-linode + volumeMounts: + - name: config-volume + mountPath: /etc/config/ + env: + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: CONFIG_MOUNT_PATH + value: /etc/config/ + - name: KUBERNETES_SERVICE_HOST + value: "10.10.0.2" + - name: KUBERNETES_SERVICE_PORT + value: "6443" + volumes: + - name: config-volume + configMap: + name: local-path-config-linode +--- +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + name: local-path-linode +provisioner: rancher.io/local-path-linode +volumeBindingMode: WaitForFirstConsumer +reclaimPolicy: Delete