Skip to content

Commit 8af07f1

Browse files
committed
add swfs + csi-driver + pvc changes
1 parent 9cfa10b commit 8af07f1

13 files changed

+525
-42
lines changed

kubevirt/examples/disks/debian12-cloud-rwo.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ metadata:
99
cdi.kubevirt.io/storage.bind.immediate.requested: "true"
1010
cdi.kubevirt.io/storage.import.endpoint: "https://cloud.debian.org/images/cloud/bookworm/daily/latest/debian-12-generic-amd64-daily.qcow2"
1111
spec:
12-
storageClassName: local-path
12+
storageClassName: seaweedfs-storage
1313
accessModes:
1414
- ReadWriteOnce
1515
resources:

kubevirt/examples/disks/deian12-iso-rwo.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ metadata:
99
cdi.kubevirt.io/storage.bind.immediate.requested: "true"
1010
cdi.kubevirt.io/storage.import.endpoint: "https://cdimage.debian.org/debian-cd/current/amd64/iso-dvd/debian-12.6.0-amd64-DVD-1.iso"
1111
spec:
12-
storageClassName: local-path
12+
storageClassName: seaweedfs-storage
1313
accessModes:
1414
- ReadWriteOnce
1515
resources:

kubevirt/examples/disks/jammy-cloud-rwo.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ metadata:
99
cdi.kubevirt.io/storage.bind.immediate.requested: "true"
1010
cdi.kubevirt.io/storage.import.endpoint: "https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img"
1111
spec:
12-
storageClassName: local-path
12+
storageClassName: seaweedfs-storage
1313
accessModes:
1414
- ReadWriteOnce
1515
resources:

kubevirt/examples/disks/lunar-cloud-rwo.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ metadata:
99
cdi.kubevirt.io/storage.bind.immediate.requested: "true"
1010
cdi.kubevirt.io/storage.import.endpoint: "https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img"
1111
spec:
12-
storageClassName: local-path
12+
storageClassName: seaweedfs-storage
1313
accessModes:
1414
- ReadWriteOnce
1515
resources:

kubevirt/examples/disks/virtio-drivers.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ metadata:
99
cdi.kubevirt.io/storage.bind.immediate.requested: "true"
1010
cdi.kubevirt.io/storage.import.endpoint: "https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.240-1/virtio-win-0.1.240.iso"
1111
spec:
12-
storageClassName: local-path
12+
storageClassName: seaweedfs-storage
1313
accessModes:
1414
- ReadWriteOnce
1515
resources:

kubevirt/examples/disks/windows-10-ro.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ metadata:
99
cdi.kubevirt.io/storage.bind.immediate.requested: "true"
1010
cdi.kubevirt.io/storage.import.endpoint: "https://f004.backblazeb2.com/file/buildstar-public-share/windows10.iso"
1111
spec:
12-
storageClassName: local-path
12+
storageClassName: seaweedfs-storage
1313
accessModes:
1414
- ReadWriteOnce
1515
resources:

kubevirt/examples/disks/windows-autoconfig.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ metadata:
99
cdi.kubevirt.io/storage.bind.immediate.requested: "true"
1010
cdi.kubevirt.io/storage.import.endpoint: "https://f004.backblazeb2.com/file/buildstar-public-share/config.iso"
1111
spec:
12-
storageClassName: local-path
12+
storageClassName: seaweedfs-storage
1313
accessModes:
1414
- ReadWriteOnce
1515
resources:

kubevirt/kubevirt-cdi-argo-app.yaml

+17-15
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# KubeVirt extends Kubernetes by adding additional virtualization resource types
2-
# (especially the VM type) through Kubernetes's Custom Resource Definitions API.
3-
# By using this mechanism, the Kubernetes API can be used to manage these VM resources
1+
# KubeVirt extends Kubernetes by adding additional virtualization resource types
2+
# (especially the VM type) through Kubernetes's Custom Resource Definitions API.
3+
# By using this mechanism, the Kubernetes API can be used to manage these VM resources
44
# alongside all other resources Kubernetes provides.
55
# https://github.com/kubevirt/kubevirt
66
---
@@ -9,6 +9,8 @@ kind: Application
99
metadata:
1010
name: kubevirt-cdi
1111
namespace: argocd
12+
annotations:
13+
argocd.argoproj.io/sync-wave: "4"
1214
spec:
1315
destination:
1416
name: ''
@@ -19,20 +21,20 @@ spec:
1921
repoURL: 'https://cloudymax.github.io/kubevirt-community-stack/'
2022
targetRevision: 0.1.5
2123
chart: kubevirt-cdi
22-
helm:
24+
helm:
2325
values: |
2426
replicaCount: 1
25-
27+
2628
image:
2729
repository: quay.io/kubevirt/cdi-operator
2830
pullPolicy: IfNotPresent
2931
tag: ""
30-
32+
3133
serviceAccount:
3234
create: true
3335
annotations: {}
3436
name: "kubevirt-cdi-service-account"
35-
37+
3638
securityContext:
3739
capabilities:
3840
drop:
@@ -41,36 +43,36 @@ spec:
4143
allowPrivilegeEscalation: false
4244
seccompProfile:
4345
type: RuntimeDefault
44-
46+
4547
service:
4648
type: ClusterIP
4749
port: 8080
4850
name: metrics
4951
protocol: TCP
50-
52+
5153
uploadProxy:
5254
type: ClusterIP
5355
port: 443
5456
targetPort: 8443
5557
protocol: TCP
56-
58+
5759
ingress:
5860
enabled: false
59-
61+
6062
resources:
6163
requests:
6264
cpu: 10m
6365
memory: 150Mi
64-
66+
6567
nodeSelector:
6668
kubernetes.io/os: linux
67-
69+
6870
tolerations:
6971
- key: CriticalAddonsOnly
7072
operator: Exists
71-
73+
7274
affinity: {}
73-
75+
7476
cdi:
7577
featureGates:
7678
- HonorWaitForFirstConsumer

kubevirt/kubevirt-operator-argo-app.yaml

+22-20
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# KubeVirt extends Kubernetes by adding additional virtualization resource types
2-
# (especially the VM type) through Kubernetes's Custom Resource Definitions API.
3-
# By using this mechanism, the Kubernetes API can be used to manage these VM resources
1+
# KubeVirt extends Kubernetes by adding additional virtualization resource types
2+
# (especially the VM type) through Kubernetes's Custom Resource Definitions API.
3+
# By using this mechanism, the Kubernetes API can be used to manage these VM resources
44
# alongside all other resources Kubernetes provides.
55
# https://github.com/kubevirt/kubevirt
66
---
@@ -9,6 +9,8 @@ kind: Application
99
metadata:
1010
name: kubevirt-operator
1111
namespace: argocd
12+
annotations:
13+
argocd.argoproj.io/sync-wave: "4"
1214
spec:
1315
project: kubevirt
1416
destination:
@@ -19,43 +21,43 @@ spec:
1921
targetRevision: 0.2.7
2022
chart: kubevirt
2123
helm:
22-
values: |
24+
values: |
2325
replicaCount: 1
24-
26+
2527
image:
2628
repository: quay.io/kubevirt/virt-operator
2729
pullPolicy: IfNotPresent
2830
tag: "v1.2.0"
29-
31+
3032
imagePullSecrets: []
3133
nameOverride: ""
3234
fullnameOverride: ""
33-
35+
3436
serviceAccount:
3537
create: true
3638
annotations: {}
3739
name: "kubevirt-operator"
38-
40+
3941
podAnnotations: {}
40-
42+
4143
podSecurityContext: {}
42-
44+
4345
securityContext:
4446
privileged: true
45-
47+
4648
resources: {}
47-
49+
4850
nodeSelector: {}
4951
tolerations:
5052
- key: CriticalAddonsOnly
5153
operator: Exists
52-
54+
5355
monitorNamespace: "prometheus"
54-
prometheus:
56+
prometheus:
5557
enabled: true
5658
serviceName: "prom-stack-kube-prometheus-prometheus"
5759
serviceNamesapce: "prometheus"
58-
60+
5961
affinity:
6062
podAntiAffinity:
6163
preferredDuringSchedulingIgnoredDuringExecution:
@@ -68,11 +70,11 @@ spec:
6870
- virt-operator
6971
topologyKey: kubernetes.io/hostname
7072
weight: 1
71-
73+
7274
priorityclass:
7375
create: true
7476
value: 1000000000
75-
77+
7678
permittedHostDevices:
7779
pciHostDevices:
7880
- pciVendorSelector: "10de:2782"
@@ -84,12 +86,12 @@ spec:
8486
mediatedDevices:
8587
- mdevNameSelector: "GRID M60-2Q"
8688
resourceName: "nvidia.com/GRID_M60-2Q"
87-
89+
8890
mediatedDevicesTypes:
8991
- nvidia-18
90-
92+
9193
useEmulation: false
92-
94+
9395
featureGates:
9496
- ExpandDisks
9597
- CPUManager

kubevirt/s3_csi_driver.yaml

+140
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
---
2+
apiVersion: argoproj.io/v1alpha1
3+
kind: Application
4+
metadata:
5+
name: kubevirt-swfs-csi-driver
6+
namespace: kubevirt
7+
annotations:
8+
argocd.argoproj.io/sync-wave: "3"
9+
spec:
10+
destination:
11+
name: ''
12+
namespace: kubevirt
13+
server: 'https://kubernetes.default.svc'
14+
source:
15+
path: ''
16+
repoURL: 'https://cloudymax.github.io/kubevirt-community-stack/'
17+
targetRevision: 0.1.5
18+
chart: kubevirt-cdi
19+
helm:
20+
valuesObject: |
21+
seaweedfsFiler: "http://seaweedfs-volume:8888"
22+
storageClassName: seaweedfs-storage
23+
isDefaultStorageClass: false
24+
tlsSecret: ""
25+
logVerbosity: 4
26+
cacheCapacityMB: 0
27+
28+
#concurrentWriters: 32
29+
30+
imagePullPolicy: "IfNotPresent"
31+
32+
#imagePullSecrets:
33+
#- name: mycredentials
34+
35+
csiProvisioner:
36+
image: registry.k8s.io/sig-storage/csi-provisioner:v3.5.0
37+
resources: {}
38+
livenessProbe:
39+
failureThreshold:
40+
initialDelaySeconds: 10
41+
timeoutSeconds: 3
42+
periodSeconds: 60
43+
44+
csiResizer:
45+
image: registry.k8s.io/sig-storage/csi-resizer:v1.8.0
46+
resources: {}
47+
livenessProbe:
48+
failureThreshold:
49+
initialDelaySeconds: 10
50+
timeoutSeconds: 3
51+
periodSeconds: 60
52+
53+
csiAttacher:
54+
# generally we don't need attacher, cause we do nothing to attach volume to node
55+
# we will keep this for a historical reason
56+
# you need to delete seaweedfs CSIDriver crd manually before upgrading with attacher disabled
57+
# also you need to delete all seaweedfs VolumeAttachment crd manually after upgrade
58+
enabled: true
59+
image: registry.k8s.io/sig-storage/csi-attacher:v4.3.0
60+
resources: {}
61+
livenessProbe:
62+
failureThreshold:
63+
initialDelaySeconds: 10
64+
timeoutSeconds: 3
65+
periodSeconds: 60
66+
67+
csiSnapshotter:
68+
# we do not support snapshots yet
69+
enabled: false
70+
71+
csiNodeDriverRegistrar:
72+
image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.8.0
73+
resources: {}
74+
livenessProbe:
75+
failureThreshold:
76+
initialDelaySeconds: 10
77+
timeoutSeconds: 3
78+
periodSeconds: 60
79+
80+
csiLivenessProbe:
81+
image: registry.k8s.io/sig-storage/livenessprobe:v2.10.0
82+
resources: {}
83+
84+
seaweedfsCsiPlugin:
85+
image: chrislusf/seaweedfs-csi-driver:v1.2.5
86+
securityContext:
87+
privileged: true
88+
capabilities:
89+
add: ["SYS_ADMIN"]
90+
allowPrivilegeEscalation: true
91+
92+
driverName: seaweedfs-csi-driver
93+
94+
controller:
95+
replicas: 1
96+
affinity: {}
97+
tolerations:
98+
resources: {}
99+
livenessProbe:
100+
failureThreshold:
101+
initialDelaySeconds: 10
102+
timeoutSeconds: 3
103+
periodSeconds: 60
104+
105+
# DataLocality (inspired by Longhorn) allows instructing the storage-driver which volume-locations will be used or preferred in Pods to read & write.
106+
# e.g. Allows Pods to write preferrably to its local dataCenter volume-servers
107+
# Requires Volume-Servers to be correctly labelled and matching Topology-Info to be passed into seaweedfs-csi-driver node
108+
# Example-Value: "write_preferlocaldc"
109+
dataLocality: "none"
110+
111+
node:
112+
# Deploy node daemonset
113+
enabled: true
114+
# When seaweedfs-csi-driver-node pod on node is recreated, all pods on same node using seaweed-csi PV will stop working.
115+
# For safe update set updateStrategy.type: OnDelete and manually move pods who use seaweed-csi PV, then delete seaweedfs-csi-driver-node damonset pod
116+
updateStrategy:
117+
type: RollingUpdate
118+
rollingUpdate:
119+
maxUnavailable: 25%
120+
affinity: {}
121+
tolerations:
122+
livenessProbe:
123+
failureThreshold:
124+
initialDelaySeconds: 10
125+
timeoutSeconds: 3
126+
periodSeconds: 60
127+
128+
# Auto-Inject Topology-Info from Kubernetes node-labels using KubeMod (https://github.com/kubemod/kubemod)
129+
# Necessary because DownwardAPI doesnt support passing node-labels (see: https://github.com/kubernetes/kubernetes/issues/40610)
130+
# Requires KubeMod to be installed
131+
injectTopologyInfoFromNodeLabel:
132+
enabled: false
133+
labels:
134+
dataCenter: "topology.kubernetes.io/zone"
135+
136+
## Change if not using standard kubernetes deployments, like k0s
137+
volumes:
138+
registration_dir: /var/lib/kubelet/plugins_registry
139+
plugins_dir: /var/lib/kubelet/plugins
140+
pods_mount_dir: /var/lib/kubelet/pods

0 commit comments

Comments
 (0)