Skip to content

Commit

Permalink
Merge pull request openshift#60 from gnufied/rebase-3-rc-1
Browse files Browse the repository at this point in the history
STOR-1014: Rebase to v3.0.0-rc1
  • Loading branch information
openshift-merge-robot authored Feb 28, 2023
2 parents 5b5d298 + ba7b573 commit e4408a3
Show file tree
Hide file tree
Showing 891 changed files with 60,587 additions and 48,735 deletions.
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!-- This form is for bug reports and feature requests! -->

**Is this a BUG REPORT or FEATURE REQUEST?**:

> Uncomment only one, leave it on its own line:
>
> /kind bug
> /kind feature

**What happened**:

**What you expected to happen**:

**How to reproduce it (as minimally and precisely as possible)**:


**Anything else we need to know?**:

**Environment**:
- csi-vsphere version:
- vsphere-cloud-controller-manager version:
- Kubernetes version:
- vSphere version:
- OS (e.g. from /etc/os-release):
- Kernel (e.g. `uname -a`):
- Install tools:
- Others:
22 changes: 22 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!-- Thanks for sending a pull request! -->

**What this PR does / why we need it**:

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Testing done**:
A PR must be marked "[WIP]", if no test result is provided. A WIP PR won't be reviewed, nor merged.
The requester can determine a sufficient test, e.g. build for a cosmetic change, E2E test in a predeployed setup, etc.
For new features, new tests should be done, in addition to regression tests.
If jtest is used to trigger precheckin tests, paste the result after jtest completes and remove [WIP] in the PR subject.
The review cycle will start, only after "[WIP]" is removed from the PR subject.

**Special notes for your reviewer**:

**Release note**:
<!-- Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access)
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`.
-->
```release-note
```
119 changes: 119 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
stages:
- unit-test
- build
- deploy-dev
- e2e-tests-dev
- deploy-staging
- tests-staging

run-unit-tests:
stage: unit-test
# This resource group is configured with process_mode=oldest_first to make sure the pipelines are run serially.
resource_group: production
# A copy of golang image in dockerhub.
image: $CNS_IMAGE_GOLANG
script:
- make test

build-images:
stage: build
# This resource group is configured with process_mode=oldest_first to make sure the pipelines are run serially.
resource_group: production
# A copy of docker image in dockerhub.
image: $CNS_IMAGE_DOCKER
services:
# A copy of docker-dind image in dockerhub.
- $CNS_IMAGE_DOCKER_DIND
variables:
DOCKER_HOST: tcp://localhost:2376
DOCKER_TLS_CERTDIR: "/certs"
DOCKER_TLS_VERIFY: 1
DOCKER_CERT_PATH: "$DOCKER_TLS_CERTDIR/client"
before_script:
# Sleep is needed to make sure that the docker engine is up.
- sleep 60
- docker info
- docker login $CNS_DOCKER_REGISTRY -u $REGISTRY_USER -p $REGISTRY_PWD
script:
- sed -i "s#ARG GOLANG_IMAGE=.*#ARG GOLANG_IMAGE=$CNS_IMAGE_GOLANG#g" images/driver/Dockerfile
- sed -i "s#ARG GOLANG_IMAGE=.*#ARG GOLANG_IMAGE=$CNS_IMAGE_GOLANG#g" images/syncer/Dockerfile
- docker build -f images/driver/Dockerfile -t $CNS_CSI_DRIVER_REPO:$CI_COMMIT_SHORT_SHA --build-arg "VERSION=$CI_COMMIT_SHORT_SHA" --build-arg "GOPROXY=https://proxy.golang.org" .
- docker build -f images/syncer/Dockerfile -t $CNS_CSI_SYNCER_REPO:$CI_COMMIT_SHORT_SHA --build-arg "VERSION=$CI_COMMIT_SHORT_SHA" --build-arg "GOPROXY=https://proxy.golang.org" .
- docker push $CNS_CSI_DRIVER_REPO:$CI_COMMIT_SHORT_SHA
- docker push $CNS_CSI_SYNCER_REPO:$CI_COMMIT_SHORT_SHA
- echo "VSPHERE_CSI_CONTROLLER_IMAGE=$CNS_CSI_DRIVER_REPO:$CI_COMMIT_SHORT_SHA" >> build.env
- echo "VSPHERE_SYNCER_IMAGE=$CNS_CSI_SYNCER_REPO:$CI_COMMIT_SHORT_SHA" >> build.env
artifacts:
reports:
dotenv: build.env

deploy-images-dev:
stage: deploy-dev
# This resource group is configured with process_mode=oldest_first to make sure the pipelines are run serially.
resource_group: production
# Image built from cd-infra/images/ci-deploy/Dockerfile from Calatrava project.
image: $CNS_IMAGE_CI_DEPLOY_STAGE
script:
- ./pipeline/deploy.sh
dependencies:
- build-images
artifacts:
reports:
dotenv: build.env

e2e-tests-dev:
stage: e2e-tests-dev
# This resource group is configured with process_mode=oldest_first to make sure the pipelines are run serially.
resource_group: production
image: $CNS_IMAGE_GOLANG
dependencies:
- deploy-images-dev
script:
- ./pipeline/e2e-tests.sh

deploy-images-staging:
stage: deploy-staging
# Image built from cd-infra/images/ci-deploy/Dockerfile from Calatrava project.
image: $CNS_IMAGE_CI_DEPLOY_STAGE
script:
- ./pipeline/deploy-staging.sh
dependencies:
- build-images
only:
- master
artifacts:
reports:
dotenv: build.env

e2e-tests-staging:
stage: tests-staging
# Image built from cd-infra//images/ci-e2e/Dockerfile from Calatrava project.
image: $CNS_IMAGE_E2E
dependencies:
- deploy-images-staging
script:
- ./pipeline/e2e-tests-staging.sh
only:
- master

system-tests-staging:
stage: tests-staging
# Image built from cd-infra//images/ci-e2e/Dockerfile from Calatrava project.
image: $CNS_IMAGE_E2E
dependencies:
- deploy-images-staging
script:
- echo "TODO - Add system tests."
only:
- master

perf-tests-staging:
stage: tests-staging
# Image built from cd-infra//images/ci-e2e/Dockerfile from Calatrava project.
image: $CNS_IMAGE_E2E
dependencies:
- deploy-images-staging
script:
- echo "TODO - Add perf tests."
only:
- master
6 changes: 0 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,3 @@ If you find a bug or a feature request related to vsphere-csi-driver you can cre
2. Fork the vsphere-csi-driver repo, develop and test your code changes.
3. Submit a pull request.
4. The bot will automatically assigns someone to review your PR. Check the full list of bot commands [here](https://prow.k8s.io/command-help).

## Contact

* [Slack](https://kubernetes.slack.com/messages/sig-vmware)
* [Mailing list](https://groups.google.com/forum/#!forum/kubernetes-sig-vmware)
* Please check the [sig-vmware community page](https://github.com/kubernetes/community/blob/master/sig-vmware/README.md) for meeting times and more details.
17 changes: 1 addition & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ GOARCH ?= amd64
LDFLAGS := $(shell cat hack/make/ldflags.txt)
LDFLAGS_CSI := $(LDFLAGS) -X "$(MOD_NAME)/pkg/csi/service.Version=$(VERSION)"
LDFLAGS_SYNCER := $(LDFLAGS) -X "$(MOD_NAME)/pkg/syncer.Version=$(VERSION)"
LDFLAGS_CNSCTL := $(LDFLAGS) -X "main.Version=$(VERSION)"

# The CSI binary.
CSI_BIN_NAME := vsphere-csi
Expand All @@ -113,19 +112,6 @@ $(CSI_BIN_WINDOWS): $(CSI_BIN_SRCS)
CGO_ENABLED=0 GOOS=windows GOARCH=$(GOARCH) go build $(GOFLAGS_VENDOR) -ldflags '$(LDFLAGS_CSI)' -o $(CSI_BIN_WINDOWS) $<
@touch $@

# The cnsctl binary.
CNSCTL_BIN_NAME := cnsctl
CNSCTL_BIN := $(BIN_OUT)/$(CNSCTL_BIN_NAME).$(GOOS)_$(GOARCH)
build-cnsctl: $(CNSCTL_BIN)
ifndef CNSCTL_BIN_SRCS
CNSCTL_BIN_SRCS := $(CNSCTL_BIN_NAME)/main.go go.mod go.sum
CNSCTL_BIN_SRCS += $(addsuffix /*.go,$(shell go list -f '{{ join .Deps "\n" }}' ./$(CNSCTL_BIN_NAME) | grep $(MOD_NAME) | sed 's~$(MOD_NAME)~.~'))
export CNSCTL_BIN_SRCS
endif
$(CNSCTL_BIN): $(CNSCTL_BIN_SRCS)
CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(GOARCH) go build $(GOFLAGS_VENDOR) -ldflags '$(LDFLAGS_CNSCTL)' -o $(abspath $@) $<
@touch $@

# The Syncer binary.
SYNCER_BIN_NAME := syncer
SYNCER_BIN := $(BIN_OUT)/$(SYNCER_BIN_NAME).$(GOOS)_$(GOARCH)
Expand Down Expand Up @@ -160,7 +146,7 @@ $(SYNCER_BIN): $(SYNCER_BIN_SRCS)
@touch $@

# The default build target.
build build-bins: $(CSI_BIN) $(CSI_BIN_WINDOWS) $(SYNCER_BIN) $(CNSCTL_BIN)
build build-bins: $(CSI_BIN) $(CSI_BIN_WINDOWS) $(SYNCER_BIN)
build-with-docker:
hack/make.sh

Expand Down Expand Up @@ -216,7 +202,6 @@ deploy: | $(DOCKER_SOCK)
################################################################################
.PHONY: clean
clean:
@rm -f Dockerfile*
rm -rf $(CSI_BIN) vsphere-csi-*.tar.gz vsphere-csi-*.zip \
$(SYNCER_BIN) vsphere-syncer-*.tar.gz vsphere-syncer-*.zip \
image-*.tar image-*.d $(DIST_OUT)/* $(BIN_OUT)/* .build/windows-driver.tar
Expand Down
26 changes: 22 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,38 @@
<!-- markdownlint-disable MD034 -->
# Container Storage Interface (CSI) driver for vSphere

This repository provides tools and scripts for building and testing the vSphere CSI provider. This driver is in a stable `GA` state and is suitable for production use. Some of the features may be in the `beta` phase. Please refer [feature matrix](https://docs.vmware.com/en/VMware-vSphere-Container-Storage-Plug-in/2.0/vmware-vsphere-csp-getting-started/GUID-E59B13F5-6F49-4619-9877-DF710C365A1E.html) for more details. vSphere CSI driver requires vSphere 6.7 U3 or higher in order to operate.
The vSphere CSI Driver is a Kubernetes plugin that allows persistent storage for containerized workloads running on vSphere infrastructure. It enables dynamic provisioning of storage volumes and provides features like snapshots, cloning, and dynamic expansion of volumes. The vSphere CSI Driver replaces the [in-tree vSphere volume plugin]( https://kubernetes.io/docs/concepts/storage/volumes/#vspherevolume) and offers integration with vSphere with better scale and performance.

The CSI driver, when used on Kubernetes, also requires the use of the out-of-tree vSphere Cloud Provider Interface [CPI](https://github.com/kubernetes/cloud-provider-vsphere).
This driver is in a stable `GA` state and is suitable for production use.

The vSphere CSI Driver is supported on vSphere 6.7U3 and later versions.
If you are using an earlier version of vSphere, you may need to upgrade to a supported version to use the vSphere CSI Driver.
It's also important to note that the vSphere CSI Driver has different versions, and each version may have different requirements or limitations, so it's essential to check the [documentation](https://docs.vmware.com/en/VMware-vSphere-Container-Storage-Plug-in/2.0/vmware-vsphere-csp-getting-started/GUID-D4AAD99E-9128-40CE-B89C-AD451DA8379D.html) for your specific version.

It is recommended to install an out-of-tree Cloud Provider Interface like [vSphere Cloud Provider Interface](https://github.com/kubernetes/cloud-provider-vsphere) in the Kubernetes cluster to keep the Kubernetes cluster fully operational.

## Documentation

Documentation for vSphere CSI Driver is available here:

* <https://docs.vmware.com/en/VMware-vSphere-Container-Storage-Plug-in/2.0/vmware-vsphere-csp-getting-started/GUID-C44D8071-85E7-4933-83EA-6797518C1837.html>
* [vSphere CSI Driver Concepts](https://docs.vmware.com/en/VMware-vSphere-Container-Storage-Plug-in/2.0/vmware-vsphere-csp-getting-started/GUID-74AF02D7-1562-48BD-A9FE-C81A53342AC3.html)
* [vSphere CSI Driver Features](https://docs.vmware.com/en/VMware-vSphere-Container-Storage-Plug-in/2.0/vmware-vsphere-csp-getting-started/GUID-D4AAD99E-9128-40CE-B89C-AD451DA8379D.html#GUID-E59B13F5-6F49-4619-9877-DF710C365A1E)
* [vSphere CSI Driver Deployment Guide](https://docs.vmware.com/en/VMware-vSphere-Container-Storage-Plug-in/2.0/vmware-vsphere-csp-getting-started/GUID-6DBD2645-FFCF-4076-80BE-AD44D7141521.html)
* [vSphere CSI Driver User Guide](https://docs.vmware.com/en/VMware-vSphere-Container-Storage-Plug-in/2.0/vmware-vsphere-csp-getting-started/GUID-6DBD2645-FFCF-4076-80BE-AD44D7141521.html)

## vSphere CSI Driver Releases

* <https://docs.vmware.com/en/VMware-vSphere-Container-Storage-Plug-in/2.0/rn/vmware-vsphere-container-storage-plugin-20-release-notes/index.html>
* [Release 2.7](https://docs.vmware.com/en/VMware-vSphere-Container-Storage-Plug-in/2.7/rn/vmware-vsphere-container-storage-plugin-27-release-notes/index.html)
* [Release 2.6](https://docs.vmware.com/en/VMware-vSphere-Container-Storage-Plug-in/2.6/rn/vmware-vsphere-container-storage-plugin-26-release-notes/index.html)
* [Release 2.5](https://docs.vmware.com/en/VMware-vSphere-Container-Storage-Plug-in/2.5/rn/vmware-vsphere-container-storage-plugin-25-release-notes/index.html)
* [Release 2.4](https://docs.vmware.com/en/VMware-vSphere-Container-Storage-Plug-in/2.4/rn/vmware-vsphere-container-storage-plugin-24-release-notes/index.html)
* [Release 2.3](https://docs.vmware.com/en/VMware-vSphere-Container-Storage-Plug-in/2.3/rn/vmware-vsphere-container-storage-plugin-23-release-notes/index.html)
* [Release 2.2](https://docs.vmware.com/en/VMware-vSphere-Container-Storage-Plug-in/2.2/rn/vmware-vsphere-container-storage-plugin-22-release-notes/index.html)

## Contributing

Please see [CONTRIBUTING.md](CONTRIBUTING.md) for instructions on how to contribute.

## Contact

* [Slack](https://kubernetes.slack.com/messages/provider-vsphere)
Loading

0 comments on commit e4408a3

Please sign in to comment.