Skip to content

Commit

Permalink
feat: raw block device
Browse files Browse the repository at this point in the history
Publish raw block devices.
Now you can play with app which uses raw block devices.

Signed-off-by: Serge Logvinov <[email protected]>
  • Loading branch information
sergelogvinov committed Jan 4, 2024
1 parent fd8d14f commit 1be660b
Show file tree
Hide file tree
Showing 11 changed files with 230 additions and 120 deletions.
1 change: 1 addition & 0 deletions cmd/controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ func main() {
flag.Parse()

klog.V(2).Infof("Driver version %v, GitVersion %s", csi.DriverVersion, version)
klog.V(2).Info("Driver CSI Spec version: ", csi.DriverSpecVersion)

if *showVersion {
klog.Infof("Driver version %v, GitVersion %s", csi.DriverVersion, version)
Expand Down
2 changes: 2 additions & 0 deletions cmd/node/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,11 @@ func main() {
flag.Parse()

klog.V(2).Infof("Driver version %v, GitVersion %s", csi.DriverVersion, version)
klog.V(2).Info("Driver CSI Spec version: ", csi.DriverSpecVersion)

if *showVersion {
klog.Infof("Driver version %v, GitVersion %s", csi.DriverVersion, version)
klog.Info("Driver CSI Spec version: ", csi.DriverSpecVersion)
os.Exit(0)
}

Expand Down
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ services:
source: ./
target: /src
csi-attacher:
image: registry.k8s.io/sig-storage/csi-attacher:v4.4.0
image: registry.k8s.io/sig-storage/csi-attacher:v4.4.3
network_mode: "service:base"
command:
- "--v=5"
Expand All @@ -40,7 +40,7 @@ services:
source: ./hack
target: /etc/kubernetes
csi-resizer:
image: registry.k8s.io/sig-storage/csi-resizer:v1.9.0
image: registry.k8s.io/sig-storage/csi-resizer:v1.9.3
network_mode: "service:base"
command:
- "--v=5"
Expand All @@ -56,7 +56,7 @@ services:
source: ./hack
target: /etc/kubernetes
csi-provisioner:
image: registry.k8s.io/sig-storage/csi-provisioner:v3.6.0
image: registry.k8s.io/sig-storage/csi-provisioner:v3.6.3
network_mode: "service:base"
command:
- "--v=5"
Expand All @@ -81,7 +81,7 @@ services:
source: ./hack
target: /etc/kubernetes
# csi-node-driver-registrar:
# image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.7.0
# image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.9.3
# network_mode: "service:base"
# command:
# - "--v=5"
Expand Down
56 changes: 56 additions & 0 deletions docs/deploy/test-statefulset-raw.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: test
namespace: default
labels:
app: alpine
spec:
podManagementPolicy: Parallel # default is OrderedReady
serviceName: test
replicas: 1
template:
metadata:
labels:
app: alpine
spec:
terminationGracePeriodSeconds: 3
tolerations:
- effect: NoSchedule
key: node-role.kubernetes.io/control-plane
nodeSelector:
# kubernetes.io/hostname: kube-21
# topology.kubernetes.io/zone: hvm-1
containers:
- name: alpine
image: alpine
command: ["sleep","1d"]
securityContext:
privileged: true
capabilities:
drop:
- ALL
add:
- SYS_ADMIN
- CHOWN
- DAC_OVERRIDE
seccompProfile:
type: RuntimeDefault
volumeDevices:
- name: storage
devicePath: /dev/xvda
updateStrategy:
type: RollingUpdate
selector:
matchLabels:
app: alpine
volumeClaimTemplates:
- metadata:
name: storage
spec:
accessModes: ["ReadWriteOnce"]
volumeMode: Block
resources:
requests:
storage: 1Gi
storageClassName: proxmox-zfs
47 changes: 23 additions & 24 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,37 @@ module github.com/sergelogvinov/proxmox-csi-plugin
go 1.21

require (
github.com/Telmate/proxmox-api-go v0.0.0-20231221094250-f5ef0e701d88
github.com/container-storage-interface/spec v1.8.0
github.com/Telmate/proxmox-api-go v0.0.0-20240102094143-0b0c911a0a51
github.com/container-storage-interface/spec v1.9.0
github.com/golang/protobuf v1.5.3
github.com/jarcoal/httpmock v1.3.1
github.com/kubernetes-csi/csi-lib-utils v0.16.0
github.com/sergelogvinov/proxmox-cloud-controller-manager v0.2.0
github.com/kubernetes-csi/csi-lib-utils v0.17.0
github.com/sergelogvinov/proxmox-cloud-controller-manager v0.3.0
github.com/siderolabs/go-blockdevice v0.4.7
github.com/stretchr/testify v1.8.4
google.golang.org/grpc v1.59.0
k8s.io/api v0.28.5
k8s.io/apimachinery v0.28.5
k8s.io/client-go v0.28.5
google.golang.org/grpc v1.60.1
k8s.io/api v0.29.0
k8s.io/apimachinery v0.29.0
k8s.io/client-go v0.29.0
k8s.io/cloud-provider-openstack v1.28.1
k8s.io/klog/v2 v2.110.1
k8s.io/mount-utils v0.28.5
k8s.io/utils v0.0.0-20231127182322-b307cd553661
k8s.io/mount-utils v0.29.0
k8s.io/utils v0.0.0-20240102154912-e7106e64919e
)

require (
github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.10.2 // indirect
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
github.com/go-logr/logr v1.3.0 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/emicklei/go-restful/v3 v3.11.1 // indirect
github.com/evanphx/json-patch v5.7.0+incompatible // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-openapi/jsonpointer v0.20.2 // indirect
github.com/go-openapi/jsonreference v0.20.4 // indirect
github.com/go-openapi/swag v0.22.7 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.4.0 // indirect
github.com/google/uuid v1.5.0 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
Expand All @@ -48,21 +47,21 @@ require (
github.com/siderolabs/go-cmd v0.1.1 // indirect
github.com/siderolabs/go-retry v0.3.2 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/stretchr/objx v0.5.1 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/oauth2 v0.15.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/term v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.4.0 // indirect
golang.org/x/time v0.5.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect
google.golang.org/protobuf v1.31.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917 // indirect
google.golang.org/protobuf v1.32.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect
k8s.io/kube-openapi v0.0.0-20240103160808-8a9faedaf1cd // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
)
Loading

0 comments on commit 1be660b

Please sign in to comment.