Skip to content
Merged
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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@
semver.mk
vars.mk
Dockerfile-debug
go-code-tester*
csm-common.mk
*coverage*.txt

# test directories and artifacts
service/c.out
service/test/
vendor
**/test-data*

# IDE
.idea
Expand All @@ -28,3 +32,5 @@ gosecresults.csv
# logs
*.log

vendor/

22 changes: 11 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,33 @@
# some arguments that must be supplied
ARG GOIMAGE
ARG BASEIMAGE
ARG VERSION="2.16.0"

# Stage to build the driver
FROM $GOIMAGE as builder
ARG VERSION

WORKDIR /workspace
COPY . .
RUN mkdir -p /go/src/csi-powerstore
COPY ./ /go/src/csi-powerstore

RUN go generate ./cmd/csi-powerstore
RUN GOOS=linux CGO_ENABLED=0 go build -o csi-powerstore ./cmd/csi-powerstore
WORKDIR /go/src/csi-powerstore
RUN make build IMAGE_VERSION=$VERSION && \
rm -rf /go/src/csi-powerstore/vendor

# Stage to build the driver image
FROM $BASEIMAGE
ARG VERSION
WORKDIR /
LABEL vendor="Dell Technologies" \
maintainer="Dell Technologies" \
name="csi-powerstore" \
summary="CSI Driver for Dell EMC PowerStore" \
description="CSI Driver for provisioning persistent storage from Dell EMC PowerStore" \
release="1.15.0" \
version="2.15.0" \
release="1.16.0" \
version=$VERSION \
license="Apache-2.0"
COPY licenses /licenses

# validate some cli utilities are found
RUN which mkfs.ext4
RUN which mkfs.xfs
RUN echo "export PATH=$PATH:/sbin:/bin" > /etc/profile.d/ubuntu_path.sh
COPY --from=builder /go/src/csi-powerstore/csi-powerstore /csi-powerstore

COPY --from=builder /workspace/csi-powerstore /
ENTRYPOINT ["/csi-powerstore"]
125 changes: 35 additions & 90 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,109 +1,54 @@
# Copyright © 2026 Dell Inc. or its subsidiaries. All Rights Reserved.
#
#
# Copyright © 2020-2025 Dell Inc. or its subsidiaries. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#

# for variables override
-include vars.mk

all: clean build

# Tag parameters
ifndef TAGMSG
TAGMSG="CSI Spec 1.6"
endif
# Dell Technologies, Dell and other trademarks are trademarks of Dell Inc.
# or its subsidiaries. Other trademarks may be trademarks of their respective
# owners.

include images.mk

all: help

# This will be overridden during image build.
IMAGE_VERSION ?= 0.0.0
LDFLAGS = "-X main.ManifestSemver=$(IMAGE_VERSION)"

# Help target, prints usefule information
help:
@echo
@echo "The following targets are commonly used:"
@echo
@echo "build - Builds the code locally"
@echo "check - Runs the suite of code checking tools: lint, format, etc"
@echo "clean - Cleans the local build"
@echo "images - Builds the code within a golang container and then creates the driver image"
@echo "push - Pushes the built container to a target registry"
@echo "unit-test - Runs the unit tests"
@echo "vendor - Downloads a vendor list (local copy) of repositories required to compile the repo."

clean:
rm -f core/core_generated.go
rm -f semver.mk
rm -f semver.mk core/core_generated.go
rm -rf vendor
rm -f csi-powerstore
go clean -cache

generate:
go generate ./cmd/csi-powerstore

build: generate
GOOS=linux CGO_ENABLED=0 go build ./cmd/csi-powerstore

install: generate
GOOS=linux CGO_ENABLED=0 go install ./cmd/csi-powerstore

# Tags the release with the Tag parameters set above
tag:
go run core/semver/semver.go -f mk >semver.mk
make -f docker.mk tag TAGMSG='$(TAGMSG)'

# Generates the docker container (but does not push)
docker:
go run core/semver/semver.go -f mk >semver.mk
make -f docker.mk docker

# Same as `docker` but without cached layers and will pull latest version of base image
docker-no-cache:
go run core/semver/semver.go -f mk >semver.mk
make -f docker.mk docker-no-cache

# Pushes container to the repository
push: docker
make -f docker.mk push

check: gosec
gofmt -w ./.
ifeq (, $(shell which golint))
go install golang.org/x/lint/golint@latest
endif
golint -set_exit_status ./.
go vet ./...
build: generate vendor
GOOS=linux CGO_ENABLED=0 go build -mod=vendor -ldflags $(LDFLAGS) ./cmd/csi-powerstore

mocks:
mockery

unit-test: go-code-tester
GITHUB_OUTPUT=/dev/null \
./go-code-tester 90 "." "" "true" "" "" "./mocks|./v2/core|./tests"
./go-code-tester 90 "." "" "true" "" "" "./mocks|./v2/core|./tests|./replace"

test:
cd ./pkg; go test -race -cover -coverprofile=coverage.out ./...

coverage:
cd ./pkg; go tool cover -html=coverage.out -o coverage.html

gosec:
ifeq (, $(shell which gosec))
go install github.com/securego/gosec/v2/cmd/gosec@latest
$(shell $(GOBIN)/gosec -quiet -log gosec.log -out=gosecresults.csv -fmt=csv ./...)
else
$(shell gosec -quiet -log gosec.log -out=gosecresults.csv -fmt=csv ./...)
endif
@echo "Logs are stored at gosec.log, Outputfile at gosecresults.csv"

go-code-tester:
curl -o go-code-tester -L https://raw.githubusercontent.com/dell/common-github-actions/main/go-code-tester/entrypoint.sh \
&& chmod +x go-code-tester

.PHONY: actions action-help
actions: ## Run all GitHub Action checks that run on a pull request creation
@echo "Running all GitHub Action checks for pull request events..."
@act -l | grep -v ^Stage | grep pull_request | grep -v image_security_scan | awk '{print $$2}' | while read WF; do \
echo "Running workflow: $${WF}"; \
act pull_request --no-cache-server --platform ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest --job "$${WF}"; \
done

action-help: ## Echo instructions to run one specific workflow locally
@echo "GitHub Workflows can be run locally with the following command:"
@echo "act pull_request --no-cache-server --platform ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest --job <jobid>"
@echo ""
@echo "Where '<jobid>' is a Job ID returned by the command:"
@echo "act -l"
@echo ""
@echo "NOTE: if act is not installed, it can be downloaded from https://github.com/nektos/act"
git clone --depth 1 git@github.com:CSM/actions.git temp-repo
cp temp-repo/go-code-tester/entrypoint.sh ./go-code-tester
chmod +x go-code-tester
rm -rf temp-repo
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# :lock: **Important Notice**
Starting with the release of **Container Storage Modules v1.16.0**, this repository will no longer be maintained as an open source project. Future development will continue under a closed source model. This change reflects our commitment to delivering even greater value to our customers by enabling faster innovation and more deeply integrated features with the Dell storage portfolio.<br>
For existing customers using Dell’s Container Storage Modules, you will continue to receive:
* **Ongoing Support & Community Engagement**<br>
You will continue to receive high-quality support through Dell Support and our community channels. Your experience of engaging with the Dell community remains unchanged.
* **Streamlined Deployment & Updates**<br>
Deployment and update processes will remain consistent, ensuring a smooth and familiar experience.
* **Access to Documentation & Resources**<br>
All documentation and related materials will remain publicly accessible, providing transparency and technical guidance.
* **Continued Access to Current Open Source Version**<br>
The current open-source version will remain available under its existing license for those who rely on it.

Moving to a closed source model allows Dell’s development team to accelerate feature delivery and enhance integration across our Enterprise Kubernetes Storage solutions ultimately providing a more seamless and robust experience.<br>
We deeply appreciate the contributions of the open source community and remain committed to supporting our customers through this transition.<br>

For questions or access requests, please contact the maintainers via [Dell Support](https://www.dell.com/support/kbdoc/en-in/000188046/container-storage-interface-csi-drivers-and-container-storage-modules-csm-how-to-get-support).

# CSI Driver for Dell PowerStore

[![Go Report Card](https://goreportcard.com/badge/github.com/dell/csi-powerstore?style=flat-square)](https://goreportcard.com/report/github.com/dell/csi-powerstore)
Expand Down Expand Up @@ -55,4 +72,3 @@ If you want to use NVMe/FC be sure that the NVMeFC zoning of the Host Bus Adapte
## Documentation
For more detailed information on the driver, please refer to [Container Storage Modules documentation](https://dell.github.io/csm-docs/).


Loading
Loading