Skip to content

Commit 6b39734

Browse files
committed
VAST Data CSI Plugin - v2.6.0
(from c2835e1399709dfcc9bb01fa1890cce338fb3ec2)
1 parent a524d6f commit 6b39734

File tree

95 files changed

+7246
-1559
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+7246
-1559
lines changed

.github/workflows/prepare_releaser_configuration.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import os
88
import re
99
import sys
10+
import shutil
1011
from pathlib import Path
1112
import fileinput
1213

@@ -19,6 +20,10 @@
1920
ROOT / "charts" / "vastcosi" / "Chart.yaml",
2021
]
2122

23+
IGNORED_CHARTS = [
24+
ROOT / "charts" / "vastcsi-operator"
25+
]
26+
2227
if __name__ == '__main__':
2328
if not re.search('[0-9]+\.[0-9]+\.?[0-9]*', BRANCH):
2429
sys.stderr.write(
@@ -32,6 +37,9 @@
3237
pages_branch = "gh-pages-beta" if is_beta else "gh-pages"
3338
version = f"{VERSION}-beta.{SHA}" if is_beta else VERSION
3439

40+
for chart in IGNORED_CHARTS:
41+
shutil.rmtree(chart, ignore_errors=True)
42+
3543
# Create unique release name based on version and commit sha
3644
for chart in CHARTS:
3745
for line in fileinput.input(chart, inplace=True):

.gitlab-ci.yml

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ stages:
66
- redhat
77

88
# source: packaging/ci.Dockerfile
9-
image: ${AWS_ACCOUNT_ID}.dkr.ecr.eu-west-1.amazonaws.com/dev/vast-csi-base:CI-2024-09-18
9+
image: ${AWS_ACCOUNT_ID}.dkr.ecr.eu-west-1.amazonaws.com/dev/vast-csi-base:CI-2025-03-23
1010

1111
variables:
1212
PLATFORMS: "linux/amd64,linux/arm64" # comma-separated list of platforms to build multi-arch images
1313
RH_REGISTRY: registry.connect.redhat.com/vastdataorg
1414
DOCKER_REGISTRY: ${AWS_ACCOUNT_ID}.dkr.ecr.eu-west-1.amazonaws.com
1515
IMAGE_NAME: ${AWS_ACCOUNT_ID}.dkr.ecr.eu-west-1.amazonaws.com/dev/vast-csi:${CI_PIPELINE_ID}
1616
# source: packaging/base.Dockerfile
17-
BASE_IMAGE_NAME: ${AWS_ACCOUNT_ID}.dkr.ecr.eu-west-1.amazonaws.com/dev/vast-csi-base:2024-09-21
17+
BASE_IMAGE_NAME: ${AWS_ACCOUNT_ID}.dkr.ecr.eu-west-1.amazonaws.com/dev/vast-csi-base:2025-01-19
1818
ORION_BRANCH: comet/master
1919

2020
build_csi_base:
@@ -77,7 +77,7 @@ build_csi_operator:
7777
INSTALL_IMAGE: "prev_version"
7878
VAST_upgrade_to: $INSTALL_IMAGE
7979
VAST_COMET__KWARG: csi_plugin_version=${CI_PIPELINE_ID}
80-
TRIGGER_SOURCE: "vastcsi"
80+
TRIGGER: "lb_csi_sanity [from-upstream]"
8181

8282

8383
test_csi [latest]: &test_csi
@@ -146,10 +146,9 @@ update_dockerhub [beta]:
146146

147147

148148
update_github [prod]: &update_github
149-
image:
150-
name: alpine/git
151-
entrypoint: [""]
152149
stage: deploy
150+
variables:
151+
BETA: "false"
153152
only:
154153
- /^v[\d]\.[\d]+/
155154
before_script: &setup_github_access |
@@ -162,17 +161,31 @@ update_github [prod]: &update_github
162161
script: |
163162
set -x
164163
VERSION=$(cat version.txt)
164+
TARGET_BRANCH=$CI_COMMIT_REF_NAME
165+
if $BETA; then
166+
VERSION=${VERSION}-beta
167+
TARGET_BRANCH=${TARGET_BRANCH}-beta
168+
fi
165169
git remote -v
166170
git remote add github [email protected]:vast-data/vast-csi.git || true
167-
git fetch github $CI_COMMIT_REF_NAME
168-
git checkout -B $CI_COMMIT_REF_NAME FETCH_HEAD
171+
git fetch github $TARGET_BRANCH
172+
git checkout -B $TARGET_BRANCH FETCH_HEAD
169173
git checkout $CI_COMMIT_SHA -- .
170174
git commit -am "VAST Data CSI Plugin - $VERSION
171175
172176
(from $CI_COMMIT_SHA)"
173177
174178
git tag -f $VERSION
175-
git push -f --tags github HEAD:$CI_COMMIT_REF_NAME
179+
git push -f --tags github HEAD:$TARGET_BRANCH
180+
181+
if ! $BETA; then
182+
export CURRENT_DEFAULT_BRANCH=$(gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name')
183+
export NEW_DEFAULT_BRANCH=$TARGET_BRANCH
184+
if ! make compare_versions; then
185+
echo "Updating default branch $CURRENT_DEFAULT_BRANCH -> $NEW_DEFAULT_BRANCH"
186+
gh repo edit --default-branch $NEW_DEFAULT_BRANCH
187+
fi
188+
fi
176189
177190
when: manual
178191
tags:
@@ -181,8 +194,8 @@ update_github [prod]: &update_github
181194

182195
update_github [beta]:
183196
<<: *update_github
184-
only:
185-
- /v[\d]\.[\d]+-beta.*/
197+
variables:
198+
BETA: "true"
186199

187200

188201
mark_stable:
@@ -204,6 +217,7 @@ publish_image_redhat:
204217
set -x
205218
docker login -u ${RH_DOCKER_USER} -p ${RH_DOCKER_PASSWORD} registry.redhat.io
206219
export VERSION=$(cat version.txt)
220+
export VERSION=${VERSION#v} # Remove the 'v' prefix
207221
208222
# Publish CSI Driver image
209223
export PROJECT_ID=5f7595a16fd1fbdbe36c0b50

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
# CHANGELOG
22

3+
## Version 2.6.0
4+
* Block CSI Driver (VCSI-193)
5+
36
## Version 2.5.0
47
* CSI driver operator (VCSI-173)
58
* Allow using VIPPool DNS name instead of the CSI choosing IPs (VCSI-167)
69
* Expose existing data via Static PV (VCSI-150)
710

11+
## Version 2.4.3
12+
* Support for multiple clusters via a single global secret
13+
814
## Version 2.4.2
915
* Support for ARM architecture (VCSI-191)
1016
* Bug Fix - do not expect VMS credentials in a non-ephemeral mounting flow (VCSI-196)

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@ run_csi_sanity: ## Run CSI sanity tests
161161
@$(call check_required_env,IMAGE_TAG)
162162
@$(CURDIR)/packaging/sanity.sh $(IMAGE_TAG)
163163
164+
compare_versions: ## Compare two sem versions
165+
@$(call check_required_env,CURRENT_DEFAULT_BRANCH NEW_DEFAULT_BRANCH)
166+
@$(CURDIR)/scripts/compare_versions.sh $(CURRENT_DEFAULT_BRANCH) $(NEW_DEFAULT_BRANCH)
167+
164168
help: ## Show help
165169
@echo "Please specify a build target. The choices are:"
166170
@awk -F ': ## ' '/^[a-zA-Z0-9_-]+:.* ## .*/ {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)

charts/vastblock/.helmignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/

charts/vastblock/Chart.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: v2
2+
name: vastblock
3+
description: Helm chart for Deployment of VAST Container Storage Interface (CSI)
4+
type: application
5+
version: "0.1.0" # will be updated by the release ci
6+
keywords:
7+
- vast
8+
- csi
9+
- block
10+
- driver
11+
- vastdata
12+
- csi-driver
13+
icon: "https://uploads.vastdata.com/2020/04/vast-white-1.svg"
14+
home: "https://support.vastdata.com/s/topic/0TOV400000018tBOAQ/vast-csi-driver"

charts/vastblock/README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Install CSI driver with Helm 3
2+
3+
## Prerequisites
4+
- [install Helm](https://helm.sh/docs/intro/quickstart/#install-helm)
5+
6+
7+
### install production version of the driver:
8+
```console
9+
helm repo add vast https://vast-data.github.io/vast-csi
10+
helm install csi-driver vast/vastblock -f values.yaml -n vast-block --create-namespace
11+
```
12+
13+
### install beta version of the driver:
14+
```console
15+
helm repo add vast https://raw.githubusercontent.com/vast-data/vast-csi/gh-pages-beta
16+
helm install csi-driver vast/vastblock -f values.yaml -n vast-block --create-namespace
17+
```
18+
19+
> **NOTE:** Optionally modify values.yaml or set overrides via Helm command line
20+
21+
22+
### install a specific version
23+
```console
24+
helm install csi-driver vast/vastblock -f values.yaml -n vast-block --create-namespace --version 2.3.0
25+
```
26+
27+
### Upgrade driver
28+
```console
29+
helm upgrade csi-driver vast/vastblock -f values.yaml -n vast-block
30+
```
31+
32+
### Upgrade helm repository
33+
```console
34+
helm repo update vast
35+
```
36+
37+
### Uninstall driver
38+
```console
39+
helm uninstall csi-driver -n vast-block
40+
```
41+
42+
### search for all available chart versions
43+
```console
44+
helm search repo -l vast
45+
```
46+
47+
### troubleshooting
48+
- Add `--wait -v=5 --debug` in `helm install` command to get detailed error
49+
- Use `kubectl describe` to acquire more info

charts/vastblock/templates/NOTES.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Thank you for installing {{ .Chart.Name }}.
2+
3+
Your release is named {{ .Release.Name }}.
4+
The release is installed in namespace {{ .Release.Namespace }}
5+
6+
To learn more about the release, try:
7+
8+
$ helm status -n {{ .Release.Namespace}} {{ .Release.Name }}
9+
$ helm get all -n {{ .Release.Namespace}} {{ .Release.Name }}
10+
11+
Examples on how to configure a storage class and start using the driver are here:
12+
{{ .Chart.Home }}
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
{{- if .Values.rbac }}
2+
---
3+
apiVersion: rbac.authorization.k8s.io/v1
4+
kind: ClusterRole
5+
metadata:
6+
name: {{ .Release.Name }}-vast-provisioner-role
7+
labels:
8+
{{- include "vastcsi.labels" . | nindent 4 }}
9+
rules:
10+
- apiGroups: [""]
11+
resources: ["secrets"]
12+
verbs: ["get", "list"]
13+
- apiGroups: [""]
14+
resources: ["persistentvolumes"]
15+
verbs: ["get", "list", "watch", "create", "delete"]
16+
- apiGroups: [""]
17+
resources: ["persistentvolumeclaims"]
18+
verbs: ["get", "list", "watch", "update"]
19+
- apiGroups: ["storage.k8s.io"]
20+
resources: ["storageclasses"]
21+
verbs: ["get", "list", "watch"]
22+
- apiGroups: ["storage.k8s.io"]
23+
resources: ["csinodes"]
24+
verbs: ["get", "list", "watch"]
25+
- apiGroups: [""]
26+
resources: ["events"]
27+
verbs: ["list", "watch", "create", "update", "patch"]
28+
- apiGroups: ["snapshot.storage.k8s.io"]
29+
resources: ["volumesnapshots"]
30+
verbs: ["get", "list"]
31+
- apiGroups: ["snapshot.storage.k8s.io"]
32+
resources: ["volumesnapshotcontents"]
33+
verbs: ["get", "list", "watch", "update", "patch"]
34+
- apiGroups: [""]
35+
resources: ["nodes"]
36+
verbs: ["get", "list", "watch"]
37+
- apiGroups: ["snapshot.storage.k8s.io"]
38+
resources: ["volumesnapshotclasses"]
39+
verbs: ["get", "list", "watch"]
40+
- apiGroups: ["snapshot.storage.k8s.io"]
41+
resources: ["volumesnapshotcontents/status"]
42+
verbs: ["update", "patch"]
43+
---
44+
apiVersion: rbac.authorization.k8s.io/v1
45+
kind: ClusterRole
46+
metadata:
47+
name: {{ .Release.Name }}-vast-attacher-role
48+
labels:
49+
{{- include "vastcsi.labels" . | nindent 4 }}
50+
rules:
51+
- apiGroups: [""]
52+
resources: ["persistentvolumes"]
53+
verbs: ["get", "list", "watch", "update", "patch"]
54+
- apiGroups: ["storage.k8s.io"]
55+
resources: ["csinodes"]
56+
verbs: ["get", "list", "watch"]
57+
- apiGroups: ["storage.k8s.io"]
58+
resources: ["volumeattachments"]
59+
verbs: ["get", "list", "watch", "update", "patch"]
60+
- apiGroups: ["storage.k8s.io"]
61+
resources: ["volumeattachments/status"]
62+
verbs: ["patch"]
63+
---
64+
apiVersion: rbac.authorization.k8s.io/v1
65+
kind: ClusterRole
66+
metadata:
67+
name: {{ .Release.Name }}-external-resizer-runner
68+
labels:
69+
{{- include "vastcsi.labels" . | nindent 4 }}
70+
rules:
71+
- apiGroups: [""]
72+
resources: ["persistentvolumes"]
73+
verbs: ["get", "list", "watch", "patch"]
74+
- apiGroups: [""]
75+
resources: ["persistentvolumeclaims"]
76+
verbs: ["get", "list", "watch"]
77+
- apiGroups: [""]
78+
resources: ["pods"]
79+
verbs: ["get", "list", "watch"]
80+
- apiGroups: [""]
81+
resources: ["persistentvolumeclaims/status"]
82+
verbs: ["patch"]
83+
- apiGroups: [""]
84+
resources: ["events"]
85+
verbs: ["list", "watch", "create", "update", "patch"]
86+
---
87+
{{- end -}}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{{- if .Values.rbac }}
2+
---
3+
apiVersion: rbac.authorization.k8s.io/v1
4+
kind: ClusterRoleBinding
5+
metadata:
6+
name: {{ .Release.Name }}-vast-provisioner-binding
7+
labels:
8+
{{- include "vastcsi.labels" . | nindent 4 }}
9+
subjects:
10+
- kind: ServiceAccount
11+
name: {{ .Release.Name }}-vast-controller-sa
12+
namespace: {{ include "vastcsi.namespace" . }}
13+
roleRef:
14+
kind: ClusterRole
15+
name: {{ .Release.Name }}-vast-provisioner-role
16+
apiGroup: rbac.authorization.k8s.io
17+
---
18+
apiVersion: rbac.authorization.k8s.io/v1
19+
kind: ClusterRoleBinding
20+
metadata:
21+
name: {{ .Release.Name }}-vast-attacher-binding
22+
labels:
23+
{{- include "vastcsi.labels" . | nindent 4 }}
24+
subjects:
25+
- kind: ServiceAccount
26+
name: {{ .Release.Name }}-vast-controller-sa
27+
namespace: {{ include "vastcsi.namespace" . }}
28+
roleRef:
29+
kind: ClusterRole
30+
name: {{ .Release.Name }}-vast-attacher-role
31+
apiGroup: rbac.authorization.k8s.io
32+
---
33+
apiVersion: rbac.authorization.k8s.io/v1
34+
kind: ClusterRoleBinding
35+
metadata:
36+
name: {{ .Release.Name }}-resizer-role
37+
labels:
38+
{{- include "vastcsi.labels" . | nindent 4 }}
39+
subjects:
40+
- kind: ServiceAccount
41+
name: {{ .Release.Name }}-vast-controller-sa
42+
namespace: {{ include "vastcsi.namespace" . }}
43+
roleRef:
44+
kind: ClusterRole
45+
name: {{ .Release.Name }}-external-resizer-runner
46+
apiGroup: rbac.authorization.k8s.io
47+
---
48+
{{- end -}}

0 commit comments

Comments
 (0)