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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ csi-powermax
!csi-powermax/
semver.mk
vendor/
scinib

# files created by IDEs
.vscode
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#
ARG GOIMAGE
ARG BASEIMAGE
ARG VERSION="2.16.2"
ARG VERSION="2.17.0"

# Stage to build the driver
FROM $GOIMAGE as builder
Expand All @@ -35,7 +35,7 @@ LABEL vendor="Dell Technologies" \
name="csi-powermax" \
summary="CSI Driver for Dell EMC PowerMax" \
description="CSI Driver for provisioning persistent storage from Dell EMC PowerMax" \
release="1.16.0" \
release="1.17.0" \
version=$VERSION \
license="Apache-2.0"
COPY ./licenses /licenses
35 changes: 35 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Copyright © 2020-2026 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.
#
ARG BASEIMAGE

# Development image - copy pre-built binary
FROM $BASEIMAGE AS final
ARG VERSION="dev"

# Copy the pre-built binary from local build
COPY csi-powermax /csi-powermax
COPY csi-powermax.sh /csi-powermax.sh

ENTRYPOINT ["/csi-powermax.sh"]
RUN chmod +x /csi-powermax.sh

LABEL vendor="Dell Technologies" \
maintainer="Dell Technologies" \
name="csi-powermax" \
summary="CSI Driver for Dell EMC PowerMax" \
description="CSI Driver for provisioning persistent storage from Dell EMC PowerMax" \
release="dev" \
version=$VERSION \
license="Apache-2.0"

COPY ./licenses /licenses
27 changes: 27 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ include images.mk

all: build

.PHONY: all build clean unit-test bdd-test integration-test gosec go-code-tester mocks dev-images help

# This will be overridden during image build.
IMAGE_VERSION ?= 0.0.0
LDFLAGS = "-X main.ManifestSemver=$(IMAGE_VERSION)"
Expand Down Expand Up @@ -64,3 +66,28 @@ go-code-tester:

mocks:
go generate ./...

# Build images for development with dev tag and outside container build
dev-images: build
@echo "Building development images with dev tag..."
$(eval include csm-common.mk)
@echo "Building: $(IMAGE_REGISTRY)/$(IMAGE_NAME):dev"
$(BUILDER) build --pull -f Dockerfile.dev -t "$(IMAGE_REGISTRY)/$(IMAGE_NAME):dev" \
--build-arg BASEIMAGE=$(CSM_BASEIMAGE) \
--build-arg VERSION="dev" .

# Show help for available targets
help:
@echo "Available targets:"
@echo " build - Build the Go binary"
@echo " images - Build container images with timestamp tag"
@echo " dev-images - Build container images with 'dev' tag for development (builds binary first, then copies to image)"
@echo " images-no-cache- Build container images with --no-cache"
@echo " push - Push container images to registry"
@echo " unit-test - Run unit tests"
@echo " bdd-test - Run BDD tests"
@echo " integration-test - Run integration tests"
@echo " gosec - Run security scan"
@echo " clean - Clean build artifacts"
@echo " mocks - Generate mocks"
@echo " help - Show this help message"
2 changes: 1 addition & 1 deletion core/semver/semver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ func TestErrorExit(t *testing.T) {
return
}
// call the test again with INVOKE_ERROR_EXIT=1 so the errorExit function is invoked and we can check the return code
cmd := exec.Command(os.Args[0], "-test.run=TestErrorExit") // #nosec
cmd := exec.Command(os.Args[0], "-test.run=TestErrorExit") // #nosec G204,G702
cmd.Env = append(os.Environ(), "INVOKE_ERROR_EXIT=1")

stderr, err := cmd.StderrPipe()
Expand Down
1 change: 1 addition & 0 deletions csireverseproxy/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ revproxy.exe
certs/*
!certs/.gitkeep
c.out
csireverseproxy
4 changes: 2 additions & 2 deletions csireverseproxy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
############################
ARG GOIMAGE
ARG BASEIMAGE
ARG VERSION="2.15.0"
ARG VERSION="2.16.0"

FROM $GOIMAGE as builder

Expand Down Expand Up @@ -55,7 +55,7 @@ LABEL vendor="Dell Technologies" \
name="csipowermax-reverseproxy" \
summary="CSI PowerMax Reverse Proxy" \
description="CSI PowerMax Reverse Proxy which helps manage connections with Unisphere for PowerMax" \
release="1.16.0" \
release="1.17.0" \
version=$VERSION \
license="Apache-2.0"
COPY licenses /licenses
Expand Down
66 changes: 66 additions & 0 deletions csireverseproxy/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Copyright © 2020-2026 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.
#
############################
# STEP 1 build executable binary
############################
ARG GOIMAGE
ARG BASEIMAGE
ARG GOPROXY

FROM $GOIMAGE as builder

# Install git + SSL ca certificates.
# Git is required for fetching the dependencies.
# Ca-certificates is required to call HTTPS endpoints.
RUN apt-get update && apt-get -y install tzdata && update-ca-certificates

# Create revproxy
ENV USER=revproxy
ENV UID=10001

# See https://stackoverflow.com/a/55757473/12429735
RUN adduser \
--disabled-password \
--gecos "" \
--home "/nonexistent" \
--shell "/sbin/nologin" \
--no-create-home \
--uid "${UID}" \
"${USER}"

############################
# STEP 2 build a small image
############################
FROM $BASEIMAGE as final
LABEL vendor="Dell Technologies" \
maintainer="Dell Technologies" \
name="csipowermax-reverseproxy" \
summary="CSI PowerMax Reverse Proxy" \
description="CSI PowerMax Reverse Proxy which helps manage connections with Unisphere for PowerMax" \
release="1.13.0" \
version="2.12.0" \
license="Apache-2.0"
COPY licenses /licenses
COPY csireverseproxy /app/revproxy
# Import from builder.
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /etc/passwd /etc/passwd
COPY --from=builder /etc/group /etc/group

# Use an unprivileged user.
USER revproxy:revproxy

WORKDIR /app
CMD ["/app/revproxy"]

EXPOSE 2222
2 changes: 1 addition & 1 deletion csireverseproxy/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ clean:
go clean

build: vendor
CGO_ENABLED=0 go build -mod=vendor
GOOS=linux CGO_ENABLED=0 go build -mod=vendor

unit-test:
go test -v -coverprofile c1.out ./...
39 changes: 17 additions & 22 deletions csireverseproxy/go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module github.com/dell/csi-powermax/csireverseproxy/v2

go 1.25.0
go 1.26.0

require (
github.com/dell/csmlog v1.0.0
github.com/dell/gopowermax/v2 v2.12.2
github.com/fsnotify/fsnotify v1.9.0
github.com/dell/csmlog v1.1.0
github.com/dell/gopowermax/v2 v2.13.0
github.com/fsnotify/fsnotify v1.10.1
github.com/gorilla/mux v1.8.1
github.com/kubernetes-csi/csi-lib-utils v0.23.0
github.com/mitchellh/mapstructure v1.5.0
Expand All @@ -15,9 +15,9 @@ require (
github.com/stretchr/testify v1.11.1
go.uber.org/mock v0.6.0
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.34.2
k8s.io/apimachinery v0.34.2
k8s.io/client-go v0.34.2
k8s.io/api v0.36.0
k8s.io/apimachinery v0.36.0
k8s.io/client-go v0.36.0
)

require (
Expand All @@ -40,19 +40,14 @@ require (
github.com/go-openapi/swag/typeutils v0.25.4 // indirect
github.com/go-openapi/swag/yamlutils v0.25.4 // indirect
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/google/gnostic-models v0.7.1 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/onsi/ginkgo/v2 v2.25.3 // indirect
github.com/onsi/gomega v1.39.0 // indirect
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/rogpeppe/go-internal v1.14.1 // indirect
github.com/sagikazarmark/locafero v0.12.0 // indirect
github.com/spf13/afero v1.15.0 // indirect
github.com/spf13/cast v1.10.0 // indirect
Expand All @@ -62,22 +57,22 @@ require (
go.uber.org/automaxprocs v1.6.0 // indirect
go.yaml.in/yaml/v2 v2.4.3 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/net v0.48.0 // indirect
golang.org/x/net v0.52.0 // indirect
golang.org/x/oauth2 v0.34.0 // indirect
golang.org/x/sys v0.39.0 // indirect
golang.org/x/term v0.38.0 // indirect
golang.org/x/text v0.32.0 // indirect
golang.org/x/sys v0.43.0 // indirect
golang.org/x/term v0.41.0 // indirect
golang.org/x/text v0.35.0 // indirect
golang.org/x/time v0.14.0 // indirect
google.golang.org/grpc v1.79.1 // indirect
google.golang.org/protobuf v1.36.10 // indirect
google.golang.org/grpc v1.80.0 // indirect
google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af // indirect
gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/kube-openapi v0.0.0-20251125145642-4e65d59e963e // indirect
k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 // indirect
k8s.io/klog/v2 v2.140.0 // indirect
k8s.io/kube-openapi v0.0.0-20260317180543-43fb72c5454a // indirect
k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2 // indirect
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
sigs.k8s.io/randfill v1.0.0 // indirect
sigs.k8s.io/structured-merge-diff/v6 v6.3.1 // indirect
sigs.k8s.io/structured-merge-diff/v6 v6.3.2 // indirect
sigs.k8s.io/yaml v1.6.0 // indirect
)
Loading
Loading