Skip to content

Commit

Permalink
refactor: rename storageID to storage
Browse files Browse the repository at this point in the history
BREAKING CHANGE:
Rename in StorageClass key storageID -> storage
  • Loading branch information
sergelogvinov committed May 4, 2023
1 parent 8ed6376 commit 303f430
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 42 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN go mod download

########################################

FROM --platform=${BUILDPLATFORM} golang:1.20.3-alpine3.17 AS builder
FROM --platform=${BUILDPLATFORM} golang:1.20.4-alpine3.17 AS builder
RUN apk update && apk add --no-cache make
ENV GO111MODULE on
WORKDIR /src
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Source:
ReadOnly: false
VolumeAttributes: cache=writethrough
storage.kubernetes.io/csiProvisionerIdentity=1682607985217-8081-csi.proxmox.sinextra.dev
storageID=data
storage=data
```

### Statefulset with persistent storage
Expand Down Expand Up @@ -195,7 +195,7 @@ Source:
ReadOnly: false
VolumeAttributes: cache=writethrough
storage.kubernetes.io/csiProvisionerIdentity=1682607985217-8081-csi.proxmox.sinextra.dev
storageID=data
storage=data
```

### Usage
Expand Down Expand Up @@ -247,7 +247,7 @@ metadata:
name: proxmox-data-xfs
parameters:
csi.storage.k8s.io/fstype: xfs|ext4
storageID: data
storage: data
cache: directsync|none|writeback|writethrough
ssd: "true|false"
provisioner: csi.proxmox.sinextra.dev
Expand All @@ -257,7 +257,7 @@ volumeBindingMode: WaitForFirstConsumer
```
Storage parameters:
* storageID - proxmox storage ID
* storage - proxmox storage ID
* cache - qemu cache param: `directsync`, `none`, `writeback`, `writethrough` see [official documentation](https://pve.proxmox.com/wiki/Performance_Tweaks)
* ssd - true if SSD/NVME disk

Expand Down
6 changes: 3 additions & 3 deletions charts/proxmox-csi-plugin/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ keywords:
- block-storage
- volume
maintainers:
- name: sergelogvinov
url: https://github.com/sergelogvinov
- name: sergelogvinov
url: https://github.com/sergelogvinov

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.0.3
version: 0.0.4

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
6 changes: 3 additions & 3 deletions charts/proxmox-csi-plugin/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# proxmox-csi-plugin

![Version: 0.0.3](https://img.shields.io/badge/Version-0.0.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.0.2](https://img.shields.io/badge/AppVersion-v0.0.2-informational?style=flat-square)
![Version: 0.0.4](https://img.shields.io/badge/Version-0.0.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.0.2](https://img.shields.io/badge/AppVersion-v0.0.2-informational?style=flat-square)

A CSI plugin for Proxmox

Expand Down Expand Up @@ -48,11 +48,11 @@ tolerations:
# See https://pve.proxmox.com/wiki/Storage
storageClass:
- name: proxmox-data-xfs
storageID: data
storage: data
reclaimPolicy: Delete
fstype: xfs
- name: proxmox-data
storageID: data
storage: data
reclaimPolicy: Delete
fstype: ext4
cache: writethrough
Expand Down
4 changes: 2 additions & 2 deletions charts/proxmox-csi-plugin/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ tolerations:
# See https://pve.proxmox.com/wiki/Storage
storageClass:
- name: proxmox-data-xfs
storageID: data
storage: data
reclaimPolicy: Delete
fstype: xfs
- name: proxmox-data
storageID: data
storage: data
reclaimPolicy: Delete
fstype: ext4
cache: writethrough
Expand Down
4 changes: 2 additions & 2 deletions charts/proxmox-csi-plugin/ci/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ tolerations:

storageClass:
- name: proxmox-data-xfs
storageID: data
storage: data
reclaimPolicy: Delete
fstype: xfs
- name: proxmox-data
storageID: data
storage: data
reclaimPolicy: Delete
ssd: true
2 changes: 1 addition & 1 deletion charts/proxmox-csi-plugin/templates/storageclass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ allowVolumeExpansion: true
volumeBindingMode: WaitForFirstConsumer
reclaimPolicy: {{ default "Delete" $storage.reclaimPolicy }}
parameters:
storageID: {{ $storage.storageID }}
csi.storage.k8s.io/fstype: {{ default "ext4" $storage.fstype }}
storage: {{ $storage.storage }}
{{- if $storage.cache }}
cache: {{ $storage.cache }}
{{- end }}
Expand Down
4 changes: 2 additions & 2 deletions charts/proxmox-csi-plugin/values.edge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ tolerations:

storageClass:
- name: proxmox-data-xfs
storageID: data
storage: data
reclaimPolicy: Delete
fstype: xfs
- name: proxmox-data
storageID: data
storage: data
ssd: true
4 changes: 2 additions & 2 deletions charts/proxmox-csi-plugin/values.talos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ tolerations:

storageClass:
- name: proxmox-data-xfs
storageID: data
storage: data
reclaimPolicy: Delete
fstype: xfs
- name: proxmox-data
storageID: data
storage: data
reclaimPolicy: Delete
2 changes: 1 addition & 1 deletion charts/proxmox-csi-plugin/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ config:
# -- Storage class defenition.
storageClass: []
# - name: proxmox-data-xfs
# storageID: data
# storage: data
# reclaimPolicy: Delete
# fstype: ext4|xfs
#
Expand Down
18 changes: 9 additions & 9 deletions docs/deploy/proxmox-csi-plugin-talos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ metadata:
name: proxmox-csi-plugin-controller
namespace: csi-proxmox
labels:
helm.sh/chart: proxmox-csi-plugin-0.0.3
helm.sh/chart: proxmox-csi-plugin-0.0.4
app.kubernetes.io/name: proxmox-csi-plugin
app.kubernetes.io/instance: proxmox-csi-plugin
app.kubernetes.io/version: "v0.0.2"
Expand All @@ -29,7 +29,7 @@ metadata:
name: proxmox-csi-plugin-node
namespace: csi-proxmox
labels:
helm.sh/chart: proxmox-csi-plugin-0.0.3
helm.sh/chart: proxmox-csi-plugin-0.0.4
app.kubernetes.io/name: proxmox-csi-plugin
app.kubernetes.io/instance: proxmox-csi-plugin
app.kubernetes.io/version: "v0.0.2"
Expand All @@ -45,8 +45,8 @@ allowVolumeExpansion: true
volumeBindingMode: WaitForFirstConsumer
reclaimPolicy: Delete
parameters:
storageID: data
csi.storage.k8s.io/fstype: xfs
storage: data
---
# Source: proxmox-csi-plugin/templates/storageclass.yaml
apiVersion: storage.k8s.io/v1
Expand All @@ -58,8 +58,8 @@ allowVolumeExpansion: true
volumeBindingMode: WaitForFirstConsumer
reclaimPolicy: Delete
parameters:
storageID: data
csi.storage.k8s.io/fstype: ext4
storage: data
---
# Source: proxmox-csi-plugin/templates/controller-clusterrole.yaml
apiVersion: rbac.authorization.k8s.io/v1
Expand All @@ -68,7 +68,7 @@ metadata:
name: proxmox-csi-plugin-controller
namespace: csi-proxmox
labels:
helm.sh/chart: proxmox-csi-plugin-0.0.3
helm.sh/chart: proxmox-csi-plugin-0.0.4
app.kubernetes.io/name: proxmox-csi-plugin
app.kubernetes.io/instance: proxmox-csi-plugin
app.kubernetes.io/version: "v0.0.2"
Expand Down Expand Up @@ -111,7 +111,7 @@ metadata:
name: proxmox-csi-plugin-node
namespace: csi-proxmox
labels:
helm.sh/chart: proxmox-csi-plugin-0.0.3
helm.sh/chart: proxmox-csi-plugin-0.0.4
app.kubernetes.io/name: proxmox-csi-plugin
app.kubernetes.io/instance: proxmox-csi-plugin
app.kubernetes.io/version: "v0.0.2"
Expand Down Expand Up @@ -159,7 +159,7 @@ metadata:
name: proxmox-csi-plugin-controller
namespace: csi-proxmox
labels:
helm.sh/chart: proxmox-csi-plugin-0.0.3
helm.sh/chart: proxmox-csi-plugin-0.0.4
app.kubernetes.io/name: proxmox-csi-plugin
app.kubernetes.io/instance: proxmox-csi-plugin
app.kubernetes.io/version: "v0.0.2"
Expand Down Expand Up @@ -201,7 +201,7 @@ metadata:
name: proxmox-csi-plugin-node
namespace: csi-proxmox
labels:
helm.sh/chart: proxmox-csi-plugin-0.0.3
helm.sh/chart: proxmox-csi-plugin-0.0.4
app.kubernetes.io/name: proxmox-csi-plugin
app.kubernetes.io/instance: proxmox-csi-plugin
app.kubernetes.io/version: "v0.0.2"
Expand Down Expand Up @@ -330,7 +330,7 @@ metadata:
name: proxmox-csi-plugin-controller
namespace: csi-proxmox
labels:
helm.sh/chart: proxmox-csi-plugin-0.0.3
helm.sh/chart: proxmox-csi-plugin-0.0.4
app.kubernetes.io/name: proxmox-csi-plugin
app.kubernetes.io/instance: proxmox-csi-plugin
app.kubernetes.io/version: "v0.0.2"
Expand Down
18 changes: 9 additions & 9 deletions docs/deploy/proxmox-csi-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ metadata:
name: proxmox-csi-plugin-controller
namespace: csi-proxmox
labels:
helm.sh/chart: proxmox-csi-plugin-0.0.3
helm.sh/chart: proxmox-csi-plugin-0.0.4
app.kubernetes.io/name: proxmox-csi-plugin
app.kubernetes.io/instance: proxmox-csi-plugin
app.kubernetes.io/version: "v0.0.2"
Expand All @@ -29,7 +29,7 @@ metadata:
name: proxmox-csi-plugin-node
namespace: csi-proxmox
labels:
helm.sh/chart: proxmox-csi-plugin-0.0.3
helm.sh/chart: proxmox-csi-plugin-0.0.4
app.kubernetes.io/name: proxmox-csi-plugin
app.kubernetes.io/instance: proxmox-csi-plugin
app.kubernetes.io/version: "v0.0.2"
Expand All @@ -45,8 +45,8 @@ allowVolumeExpansion: true
volumeBindingMode: WaitForFirstConsumer
reclaimPolicy: Delete
parameters:
storageID: data
csi.storage.k8s.io/fstype: xfs
storage: data
---
# Source: proxmox-csi-plugin/templates/storageclass.yaml
apiVersion: storage.k8s.io/v1
Expand All @@ -58,8 +58,8 @@ allowVolumeExpansion: true
volumeBindingMode: WaitForFirstConsumer
reclaimPolicy: Delete
parameters:
storageID: data
csi.storage.k8s.io/fstype: ext4
storage: data
ssd: "true"
---
# Source: proxmox-csi-plugin/templates/controller-clusterrole.yaml
Expand All @@ -69,7 +69,7 @@ metadata:
name: proxmox-csi-plugin-controller
namespace: csi-proxmox
labels:
helm.sh/chart: proxmox-csi-plugin-0.0.3
helm.sh/chart: proxmox-csi-plugin-0.0.4
app.kubernetes.io/name: proxmox-csi-plugin
app.kubernetes.io/instance: proxmox-csi-plugin
app.kubernetes.io/version: "v0.0.2"
Expand Down Expand Up @@ -112,7 +112,7 @@ metadata:
name: proxmox-csi-plugin-node
namespace: csi-proxmox
labels:
helm.sh/chart: proxmox-csi-plugin-0.0.3
helm.sh/chart: proxmox-csi-plugin-0.0.4
app.kubernetes.io/name: proxmox-csi-plugin
app.kubernetes.io/instance: proxmox-csi-plugin
app.kubernetes.io/version: "v0.0.2"
Expand Down Expand Up @@ -160,7 +160,7 @@ metadata:
name: proxmox-csi-plugin-controller
namespace: csi-proxmox
labels:
helm.sh/chart: proxmox-csi-plugin-0.0.3
helm.sh/chart: proxmox-csi-plugin-0.0.4
app.kubernetes.io/name: proxmox-csi-plugin
app.kubernetes.io/instance: proxmox-csi-plugin
app.kubernetes.io/version: "v0.0.2"
Expand Down Expand Up @@ -202,7 +202,7 @@ metadata:
name: proxmox-csi-plugin-node
namespace: csi-proxmox
labels:
helm.sh/chart: proxmox-csi-plugin-0.0.3
helm.sh/chart: proxmox-csi-plugin-0.0.4
app.kubernetes.io/name: proxmox-csi-plugin
app.kubernetes.io/instance: proxmox-csi-plugin
app.kubernetes.io/version: "v0.0.2"
Expand Down Expand Up @@ -336,7 +336,7 @@ metadata:
name: proxmox-csi-plugin-controller
namespace: csi-proxmox
labels:
helm.sh/chart: proxmox-csi-plugin-0.0.3
helm.sh/chart: proxmox-csi-plugin-0.0.4
app.kubernetes.io/name: proxmox-csi-plugin
app.kubernetes.io/instance: proxmox-csi-plugin
app.kubernetes.io/version: "v0.0.2"
Expand Down
4 changes: 2 additions & 2 deletions pkg/csi/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ func (ts *csiTestSuite) TestCreateVolume() {
},
}
volParam := map[string]string{
"storageID": "local-lvm",
"storage": "local-lvm",
}
volsize := &proto.CapacityRange{
RequiredBytes: 1,
Expand Down Expand Up @@ -306,7 +306,7 @@ func (ts *csiTestSuite) TestCreateVolume() {
CapacityRange: volsize,
AccessibilityRequirements: topology,
},
expectedError: status.Error(codes.InvalidArgument, "Parameters storageID must be provided"),
expectedError: status.Error(codes.InvalidArgument, "Parameters storage must be provided"),
},
{
msg: "RegionZone",
Expand Down
2 changes: 1 addition & 1 deletion pkg/csi/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const (
DriverVersion = "0.0.1"

// StorageIDKey is the ID of the Proxmox storage
StorageIDKey = "storageID"
StorageIDKey = "storage"
// StorageCacheKey is the cache type, can be one of "directsync", "none", "writeback", "writethrough"
StorageCacheKey = "cache"
// StorageSSDKey is it ssd disk
Expand Down

0 comments on commit 303f430

Please sign in to comment.