Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

breaking(CSI-314): remove legacy volume support #435

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open
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
44 changes: 2 additions & 42 deletions .github/workflows/sanity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,69 +39,29 @@ jobs:
tags: sanity:latest
load: true

legacy_sanity:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-tests') }}
needs: build
runs-on: self-hosted
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- run: docker-compose -f tests/csi-sanity/docker-compose-nosnapshotcaps.yaml up $COMPOSE_DEFAULTS
env:
SANITY_FUNCTION: legacy_sanity

directory_volume_and_snapshots:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-tests') }}
needs: legacy_sanity
runs-on: self-hosted
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- run: docker-compose -f tests/csi-sanity/docker-compose-snapshotcaps.yaml up $COMPOSE_DEFAULTS
env:
SANITY_FUNCTION: directory_volume_and_snapshots

directory_volume_and_snapshots_nfs:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-tests') }}
needs: directory_volume_and_snapshots
runs-on: self-hosted
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- run: docker-compose -f tests/csi-sanity/docker-compose-nfs-snapshotcaps.yaml up $COMPOSE_DEFAULTS
env:
SANITY_FUNCTION: directory_volume_and_snapshots_nfs

snaphot_volumes_with_2nd_level_shapshots:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-tests') }}
needs: directory_volume_and_snapshots_nfs
runs-on: self-hosted
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- run: docker-compose -f tests/csi-sanity/docker-compose-snapshotcaps.yaml up $COMPOSE_DEFAULTS
env:
SANITY_FUNCTION: snaphot_volumes_with_2nd_level_shapshots

snaphot_volumes_with_2nd_level_shapshots_nfs:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-tests') }}
needs: snaphot_volumes_with_2nd_level_shapshots
needs: directory_volume_and_snapshots_nfs
runs-on: self-hosted
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- run: docker-compose -f tests/csi-sanity/docker-compose-nfs-snapshotcaps.yaml up $COMPOSE_DEFAULTS
env:
SANITY_FUNCTION: snaphot_volumes_with_2nd_level_shapshots_nfs

filesystem_volumes:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-tests') }}
needs: snaphot_volumes_with_2nd_level_shapshots_nfs
runs-on: self-hosted
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- run: docker-compose -f tests/csi-sanity/docker-compose-snapshotcaps.yaml up $COMPOSE_DEFAULTS
env:
SANITY_FUNCTION: filesystem_volumes

filesystem_volumes_nfs:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-tests') }}
needs: filesystem_volumes
needs: snaphot_volumes_with_2nd_level_shapshots_nfs
runs-on: self-hosted
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ make build
| node.affinity | object | `{}` | optional affinity for node components only |
| logLevel | int | `5` | Log level of CSI plugin |
| useJsonLogging | bool | `false` | Use JSON structured logging instead of human-readable logging format (for exporting logs to structured log parser) |
| legacyVolumeSecretName | string | `""` | for migration of pre-CSI 0.7.0 volumes only, default API secret. Must reside in same namespace as the plugin |
| priorityClassName | string | `""` | Optional CSI Plugin priorityClassName |
| selinuxSupport | string | `"off"` | Support SELinux labeling for Persistent Volumes, may be either `off`, `mixed`, `enforced` (default off) In `enforced` mode, CSI node components will only start on nodes having a label `selinuxNodeLabel` below In `mixed` mode, separate CSI node components will be installed on SELinux-enabled and regular hosts In `off` mode, only non-SELinux-enabled node components will be run on hosts without label. WARNING: if SELinux is not enabled, volume provisioning and publishing might fail! NOTE: SELinux support is enabled automatically on clusters recognized as RedHat OpenShift Container Platform |
| selinuxNodeLabel | string | `"csi.weka.io/selinux_enabled"` | This label must be set to `"true"` on SELinux-enabled Kubernetes nodes, e.g., to run the node server in secure mode on SELinux-enabled node, the node must have label `csi.weka.io/selinux_enabled="true"` |
Expand Down
81 changes: 40 additions & 41 deletions charts/csi-wekafsplugin/README.md

Large diffs are not rendered by default.

12 changes: 2 additions & 10 deletions charts/csi-wekafsplugin/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,9 @@ Official Weka CSI Plugin documentation can be found here: https://docs.weka.io/a
Examples on how to configure a storage class and start using the driver are here:
https://github.com/weka/csi-wekafs/tree/master/examples

-------------------------------------------------- NOTICE --------------------------------------------------
| THIS VERSION INTRODUCES SUPPORT FOR ADDITIONAL VOLUME TYPES, AS WELL AS SNAPSHOT AND VOLUME CLONING CAPS |
| TO BETTER UNDERSTAND DIFFERENT TYPES OF VOLUMES AND THEIR IMPLICATIONS, REFER TO THE DOCUMENTATION ABOVE |
| ALSO, IT IS RECOMMENDED TO CAREFULLY GO OVER NEW CONFIGURATION PARAMETERS AND ITS MEANINGS, AS BEHAVIOR |
| OF THE PLUGIN AND ITS REPORTED CAPABILITIES LARGELY DEPEND ON THE CONFIGURATION AND WEKA CLUSTER VERSION |
------------------------------------------------------------------------------------------------------------

-------------------------------------------------- WARNING -------------------------------------------------
| SUPPORT OF LEGACY VOLUMES WITHOUT API BINDING WILL BE REMOVED IN NEXT MAJOR RELEASE OF WEKA CSI PLUGIN. |
| NEW FEATURES RELY ON API CONNECTIVITY TO WEKA CLUSTER AND WILL NOT BE SUPPORTED ON API-UNBOUND VOLUMES. |
| PLEASE MAKE SURE TO MIGRATE ALL EXISTING VOLUMES TO API-BASED SCHEME PRIOR TO NEXT VERSION UPGRADE. |
| SUPPORT OF LEGACY VOLUMES (DIRECTORY BACKED WITHOUT API BINDING) WAS REMOVED IN THIS RELEASE. |
------------------------------------------------------------------------------------------------------------

{{- if or .Values.pluginConfig.mountProtocol.useNfs .Values.pluginConfig.mountProtocol.allowNfsFailback }}
Expand All @@ -36,7 +28,7 @@ https://github.com/weka/csi-wekafs/tree/master/examples
| NFS TRANSPORT DOES NOT PROVIDE MAXIMUM PERFORMANCE AND IS NOT RECOMMENDED FOR PRODUCTION USE. |
| HOWEVER, IN CERTAIN CASES WHEN WEKA CLIENT INSTALLATION IS NOT POSSIBLE, NFS MOUNTS WILL BE USED. |
| IF WEKA CLIENT IS INSTALLED ON NODES AFTER CSI PLUGIN INSTALLATION, RESTART IS REQUIRED FOR THE |
| CORRESPONDENT CSI PLUGIN COMPONENTS RUNNING ON THE NODE TO SWITCH BACK TO WEKAFS PROTOCOL MOUNTING. |
| CORRESPONDING CSI PLUGIN COMPONENTS RUNNING ON THE NODE TO SWITCH TO WEKAFS PROTOCOL MOUNTING. |
{{- end }}
| MAKE SURE THAT AT LEAST ONE INTERFACE GROUP IS CONFIGURED ON WEKA CLUSTER, OTHERWISE PROVISION WILL FAIL |
| REFER TO THE DOCUMENTATION ABOVE FOR MORE INFORMATION ON NFS INTERFACE GROUP CONFIGURATION. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ spec:
- "--allowautofsexpansion"
{{- end }}
{{- if .Values.pluginConfig.allowedOperations.snapshotDirectoryVolumes }}
- "--allowsnapshotsoflegacyvolumes"
- "--allowsnapshotsofdirectoryvolumes"
{{- end }}
{{- if .Values.pluginConfig.allowedOperations.snapshotVolumesWithoutQuotaEnforcement }}
- "--alwaysallowsnapshotvolumes"
Expand Down Expand Up @@ -166,11 +166,6 @@ spec:
name: csi-data-dir
- mountPath: /dev
name: dev-dir
{{- if .Values.legacyVolumeSecretName }}
- mountPath: /legacy-volume-access
name: legacy-volume-access
readOnly: true
{{- end }}
- name: csi-attacher
image: {{ required "csi attacher sidercar image." .Values.images.attachersidecar }}
securityContext:
Expand Down Expand Up @@ -357,8 +352,3 @@ spec:
path: /dev
type: Directory
name: dev-dir
{{- if .Values.legacyVolumeSecretName }}
- name: legacy-volume-access
secret:
secretName: {{ .Values.legacyVolumeSecretName }}
{{- end }}
10 changes: 0 additions & 10 deletions charts/csi-wekafsplugin/templates/nodeserver-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,6 @@ spec:
- mountPath: /etc/nodeinfo
name: nodeinfo
readOnly: true
{{- if .Values.legacyVolumeSecretName }}
- mountPath: /legacy-volume-access
name: legacy-volume-access
readOnly: true
{{- end }}
{{- if or (.Capabilities.APIVersions.Has "security.openshift.io/v1/SecurityContextConstraints") (eq .Values.selinuxSupport "enforced") }}
- mountPath: /etc/selinux/config
name: selinux-config
Expand Down Expand Up @@ -265,8 +260,3 @@ spec:
{{- end }}
- name: nodeinfo
emptyDir: {}
{{- if .Values.legacyVolumeSecretName }}
- name: legacy-volume-access
secret:
secretName: {{ .Values.legacyVolumeSecretName }}
{{- end }}
3 changes: 0 additions & 3 deletions charts/csi-wekafsplugin/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,6 @@
"kubeletPath": {
"type": "string"
},
"legacyVolumeSecretName": {
"type": "string"
},
"logLevel": {
"type": "integer"
},
Expand Down
6 changes: 2 additions & 4 deletions charts/csi-wekafsplugin/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ node:
logLevel: 5
# -- Use JSON structured logging instead of human-readable logging format (for exporting logs to structured log parser)
useJsonLogging: false
# -- for migration of pre-CSI 0.7.0 volumes only, default API secret. Must reside in same namespace as the plugin
legacyVolumeSecretName: ""
# -- Optional CSI Plugin priorityClassName
priorityClassName: ""
# -- Support SELinux labeling for Persistent Volumes, may be either `off`, `mixed`, `enforced` (default off)
Expand Down Expand Up @@ -153,8 +151,8 @@ pluginConfig:
# e.g. in case a required volume capacity exceeds the size of filesystem.
# Note: the filesystem is not expanded automatically when a new directory-backed volume is provisioned
autoExpandFilesystems: true
# -- Create snapshots of legacy (dir/v1) volumes. By default disabled.
# Note: when enabled, for every legacy volume snapshot, a full filesystem snapshot will be created (wasteful)
# -- Create snapshots of directory-backed (dir/v1) volumes. By default disabled.
# Note: when enabled, every snapshot of a directory-backed volume creates a full filesystem snapshot (wasteful)
snapshotDirectoryVolumes: false
# -- Allow creation of snapshot-backed volumes even on unsupported Weka cluster versions, off by default
# Note: On versions of Weka < v4.2 snapshot-backed volume capacity cannot be enforced
Expand Down
4 changes: 2 additions & 2 deletions cmd/wekafsplugin/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ var (
seedSnapshotPrefix = flag.String("seedsnapshotprefix", "csisnp-seed-", "Prefix for empty (seed) snapshot to create on newly provisioned filesystem")
allowAutoFsExpansion = flag.Bool("allowautofsexpansion", false, "Allow expansion of filesystems used as CSI volumes")
allowAutoFsCreation = flag.Bool("allowautofscreation", false, "Allow provisioning of CSI volumes as new Weka filesystems")
allowSnapshotsOfLegacyVolumes = flag.Bool("allowsnapshotsoflegacyvolumes", false, "Allow provisioning of CSI volumes or snapshots from legacy volumes")
allowSnapshotsOfDirectoryVolumes = flag.Bool("allowsnapshotsofdirectoryvolumes", false, "Allow provisioning of CSI volumes or snapshots from legacy volumes")
suppressSnapshotsCapability = flag.Bool("suppresssnapshotcapability", false, "Do not expose CREATE_DELETE_SNAPSHOT, for testing purposes only")
suppressVolumeCloneCapability = flag.Bool("suppressrvolumeclonecapability", false, "Do not expose CLONE_VOLUME, for testing purposes only")
enableMetrics = flag.Bool("enablemetrics", false, "Enable Prometheus metrics endpoint")
Expand Down Expand Up @@ -208,7 +208,7 @@ func handle() {
*debugPath,
*allowAutoFsCreation,
*allowAutoFsExpansion,
*allowSnapshotsOfLegacyVolumes,
*allowSnapshotsOfDirectoryVolumes,
*suppressSnapshotsCapability,
*suppressVolumeCloneCapability,
*allowInsecureHttps,
Expand Down
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ require (
github.com/google/uuid v1.6.0
github.com/hashicorp/go-version v1.7.0
github.com/kubernetes-csi/csi-lib-utils v0.20.0
github.com/pkg/xattr v0.4.10
github.com/prometheus/client_golang v1.20.5
github.com/rs/zerolog v1.33.0
github.com/showa-93/go-mask v0.6.2
Expand Down
3 changes: 0 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcY
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/xattr v0.4.10 h1:Qe0mtiNFHQZ296vRgUjRCoPHPqH7VdTOrZx3g0T+pGA=
github.com/pkg/xattr v0.4.10/go.mod h1:di8WF84zAKk8jzR1UBTEWh9AUlIZZ7M/JNt8e9B6ktU=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y=
Expand Down Expand Up @@ -91,7 +89,6 @@ golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0=
golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k=
golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ=
golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20220408201424-a24fb2fb8a0f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
Expand Down
Loading
Loading