Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions flux/apps/kube-system/multus/app/talos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
resources:
requests:
cpu: "100m"
memory: "100Mi"
memory: "256Mi"
limits:
cpu: "200m"
memory: "256Mi"
memory: "1024Mi"

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion flux/apps/storage/local-path-provisioner/ks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: local-path-provisioner
namespace: flux-system
spec:
path: ./flux/apps/storage/local-path-provisioner/app/overlays/${NETWORK}
path: ./flux/apps/storage/local-path-provisioner/app
prune: false
targetNamespace: storage
sourceRef:
Expand Down

This file was deleted.

124 changes: 124 additions & 0 deletions flux/apps/storage/piraeus-operator/cluster/cluster.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
apiVersion: piraeus.io/v1
kind: LinstorCluster
metadata:
name: linstor-cluster
spec:
controller:
enabled: true

csiController:
enabled: true

csiNode:
enabled: true

nfsServer:
enabled: false

highAvailabilityController:
enabled: true
---
apiVersion: piraeus.io/v1
kind: LinstorSatelliteConfiguration
metadata:
name: talos-override
spec:
podTemplate:
metadata:
annotations:
k8s.v1.cni.cncf.io/networks: storage/linstor
workload.default.ovn.kubernetes.io/logical_switch: linstor
spec:
initContainers:
- name: drbd-shutdown-guard
$patch: delete
- name: drbd-module-loader
$patch: delete
containers:
- name: linstor-satellite
securityContext:
privileged: true
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: LS_CONTROLLERS
value: http://linstor-controller:3370
- name: replication-nic-reconciler
image: linstor-satellite
securityContext:
privileged: true
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: LS_CONTROLLERS
value: http://linstor-controller:3370
command:
- /bin/sh
- -ceu
- |
LOG=/var/log/replication-setup.log

retry() { max="$1"; shift; n=0; until "$@"; do n=$((n+1)); [ "$n" -ge "$max" ] && return 1; sleep 2; done; }

net1_ip() {
ip -4 -o addr show dev net1 2>/dev/null | awk '{print $4}' | cut -d/ -f1 | head -n1
}

echo "[$(date -Iseconds)] reconciler start" >>"$LOG"

while true; do
REPL_IP="$(net1_ip || true)"
[ -n "${REPL_IP:-}" ] || { sleep 2; continue; }

retry 60 linstor node list >/dev/null 2>&1 || { sleep 5; continue; }
retry 60 linstor node show "$NODE_NAME" >/dev/null 2>&1 || { sleep 5; continue; }

if linstor -m node interface list "$NODE_NAME" 2>/dev/null \
| grep -q "\"name\"[[:space:]]*:[[:space:]]*\"replication\""; then
if ! linstor node interface modify "$NODE_NAME" replication --ip "$REPL_IP" >/dev/null 2>&1; then
linstor node interface delete "$NODE_NAME" replication >/dev/null 2>&1 || true
linstor node interface create "$NODE_NAME" replication "$REPL_IP" >/dev/null 2>&1 || true
fi
else
linstor node interface create "$NODE_NAME" replication "$REPL_IP" >/dev/null 2>&1 || true
fi

sleep 15
done
volumeMounts:
- name: shared-data
mountPath: /var/log
volumes:
- name: shared-data
emptyDir: {}
- name: run-systemd-system
$patch: delete
- name: run-drbd-shutdown-guard
$patch: delete
- name: systemd-bus-socket
$patch: delete
- name: lib-modules
$patch: delete
- name: usr-src
$patch: delete
- name: etc-lvm-backup
hostPath:
path: /var/etc/lvm/backup
type: DirectoryOrCreate
- name: etc-lvm-archive
hostPath:
path: /var/etc/lvm/archive
type: DirectoryOrCreate
---
apiVersion: piraeus.io/v1
kind: LinstorSatelliteConfiguration
metadata:
name: use-replication-network
spec:
properties:
- name: PrefNic
value: replication
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../base
- linstor-cluster.yml
- network.yml
- cluster.yml
- storage-class.yml

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

29 changes: 29 additions & 0 deletions flux/apps/storage/piraeus-operator/cluster/storage-class.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
apiVersion: storage.k8s.io/v1
kind: StorageClass
provisioner: linstor.csi.linbit.com
metadata:
name: lvm-thin-r1
annotations:
storageclass.kubernetes.io/is-default-class: "true"
allowVolumeExpansion: true
volumeBindingMode: WaitForFirstConsumer
reclaimPolicy: Delete
parameters:
csi.storage.k8s.io/fstype: ext4
linstor.csi.linbit.com/autoPlace: "1"
linstor.csi.linbit.com/storagePool: lvm-thin
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
provisioner: linstor.csi.linbit.com
metadata:
name: lvm-thin-r2
annotations:
storageclass.kubernetes.io/is-default-class: "false"
allowVolumeExpansion: true
volumeBindingMode: WaitForFirstConsumer
reclaimPolicy: Delete
parameters:
csi.storage.k8s.io/fstype: ext4
linstor.csi.linbit.com/autoPlace: "2"
linstor.csi.linbit.com/storagePool: lvm-thin
Loading