Skip to content

Commit

Permalink
Use common CSM baseimage (#416)
Browse files Browse the repository at this point in the history
* Use CSM baseimage

* Fixing lint issues

* Fixing lint issues

* Fixing lint issues

* Fixing lint issues
  • Loading branch information
EvgenyUglov authored Jan 23, 2025
1 parent 8adf9b5 commit c408dd3
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 68 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# Reusable workflow to perform go version update on Golang based projects
name: Go Version Update

on:
on: # yamllint disable-line rule:truthy
workflow_dispatch:
repository_dispatch:
types: [go-update-workflow]
Expand Down
24 changes: 0 additions & 24 deletions buildubimicro.sh

This file was deleted.

22 changes: 5 additions & 17 deletions docker.mk
Original file line number Diff line number Diff line change
Expand Up @@ -36,39 +36,27 @@ endif
# set the GOVERSION
export GOVERSION="1.21"

# Add 'build-base-image' as a dependency if UBI Micro is used as the base image.
# This is required to load all the depedent packages into UBI Miro image.
ifeq ($(DOCKER_FILE), docker-files/Dockerfile.ubi.micro)
DEPENDENCIES=build-base-image
endif

# figure out if podman or docker should be used (use podman if found)
ifneq (, $(shell which podman 2>/dev/null))
BUILDER=podman
else
BUILDER=docker
endif

docker: $(DEPENDENCIES)
docker: download-csm-common
@echo "MAJOR $(MAJOR) MINOR $(MINOR) PATCH $(PATCH) RELNOTE $(RELNOTE) SEMVER $(SEMVER)"
@echo "$(DOCKER_FILE)"
$(BUILDER) build -f $(DOCKER_FILE) -t "$(DOCKER_REGISTRY)/$(DOCKER_IMAGE_NAME):v$(MAJOR).$(MINOR).$(PATCH)$(RELNOTE)" --build-arg GOIMAGE=$(DEFAULT_GOIMAGE) --build-arg BASEIMAGE=$(BASEIMAGE) .
$(BUILDER) build -f $(DOCKER_FILE) -t "$(DOCKER_REGISTRY)/$(DOCKER_IMAGE_NAME):v$(MAJOR).$(MINOR).$(PATCH)$(RELNOTE)" --build-arg GOIMAGE=$(DEFAULT_GOIMAGE) --build-arg BASEIMAGE=$(CSM_BASEIMAGE) .

docker-no-cache: $(DEPENDENCIES)
docker-no-cache: download-csm-common
@echo "MAJOR $(MAJOR) MINOR $(MINOR) PATCH $(PATCH) RELNOTE $(RELNOTE) SEMVER $(SEMVER)"
@echo "$(DOCKER_FILE) --no-cache"
$(BUILDER) build --no-cache -f $(DOCKER_FILE) -t "$(DOCKER_REGISTRY)/$(DOCKER_IMAGE_NAME):v$(MAJOR).$(MINOR).$(PATCH)$(RELNOTE)" --build-arg GOIMAGE=$(DEFAULT_GOIMAGE) --build-arg BASEIMAGE=$(BASEIMAGE) .
$(BUILDER) build --no-cache -f $(DOCKER_FILE) -t "$(DOCKER_REGISTRY)/$(DOCKER_IMAGE_NAME):v$(MAJOR).$(MINOR).$(PATCH)$(RELNOTE)" --build-arg GOIMAGE=$(DEFAULT_GOIMAGE) --build-arg BASEIMAGE=$(CSM_BASEIMAGE) .

push:
echo "MAJOR $(MAJOR) MINOR $(MINOR) PATCH $(PATCH) RELNOTE $(RELNOTE) SEMVER $(SEMVER)"
$(BUILDER) push "$(DOCKER_REGISTRY)/$(DOCKER_IMAGE_NAME):v$(MAJOR).$(MINOR).$(PATCH)$(RELNOTE)"

build-base-image: download-csm-common
$(eval include csm-common.mk)
@echo "Building base image from $(DEFAULT_BASEIMAGE) and loading dependencies..."
./buildubimicro.sh $(DEFAULT_BASEIMAGE)
@echo "Base image build: SUCCESS"
$(eval BASEIMAGE=localhost/csipowerstore-ubimicro:latest)

download-csm-common:
curl -O -L https://raw.githubusercontent.com/dell/csm/main/config/csm-common.mk
$(eval include csm-common.mk)
20 changes: 10 additions & 10 deletions samples/secret/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
# kubectl create secret generic powerstore-config -n csi-powerstore --from-file=config=secret.yaml
#
arrays:
# endpoint: full URL path to the PowerStore API
# Allowed Values: https://*.*.*.*/api/rest or https://abc.com/api/rest
# Default Value: None
# endpoint: full URL path to the PowerStore API
# Allowed Values: https://*.*.*.*/api/rest or https://abc.com/api/rest
# Default Value: None
- endpoint: "https://10.0.0.1/api/rest"

# globalID: unique id of the PowerStore array
Expand Down Expand Up @@ -84,10 +84,10 @@ arrays:
# Default value: "0777"
# nfsAcls: "0777"

# To add more PowerStore arrays, uncomment the following lines and provide the required values
#- endpoint: "https://11.0.0.1/api/rest"
# globalID: "unique"
# username: "user"
# password: "password"
# skipCertificateValidation: true
# blockProtocol: "FC"
# To add more PowerStore arrays, uncomment the following lines and provide the required values
# - endpoint: "https://11.0.0.1/api/rest"
# globalID: "unique"
# username: "user"
# password: "password"
# skipCertificateValidation: true
# blockProtocol: "FC"
2 changes: 1 addition & 1 deletion samples/volumesnapshotclass/snapclass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshotClass
metadata:
name: powerstore-snapshot
driver: "csi-powerstore.dellemc.com" #driver name from values.yaml
driver: "csi-powerstore.dellemc.com" # driver name from values.yaml
deletionPolicy: Delete
4 changes: 2 additions & 2 deletions tests/e2e/driver/resources/sc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ kind: StorageClass
metadata:
name: powerstore-metro
parameters:
arrayID: "unique" # PowerStore Global ID
arrayID: "unique" # PowerStore Global ID
replication.storage.dell.com/isReplicationEnabled: "true"
replication.storage.dell.com/mode: METRO
replication.storage.dell.com/remoteSystem: "system-ID" # Remote PowerStore system name
replication.storage.dell.com/remoteSystem: "system-ID" # Remote PowerStore system name
provisioner: csi-powerstore.dellemc.com
reclaimPolicy: Delete
volumeBindingMode: Immediate
6 changes: 3 additions & 3 deletions tests/e2e/k8s/e2e-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ execCommand: "while true ; do sleep 2 ; done"

# config for externalAccess e2e test suite
externalAccess:
endPoint: "https://10.0.0.1/api/rest" # array's endpoint
endPoint: "https://10.0.0.1/api/rest" # array's endpoint
userName: "user"
password: "password"
externalAccessIP: "10.0.0.1/25" # IP configured in values.yaml file while installing the driver
externalAccessIP: "10.0.0.1/25" # IP configured in values.yaml file while installing the driver
NASServer: "nas-server"
testStatefulset: true # if wanted to test ExternalAccess with Deployment as well as with Statefulset resource
testStatefulset: true # if wanted to test ExternalAccess with Deployment as well as with Statefulset resource
20 changes: 10 additions & 10 deletions tests/sanity/helm/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
# kubectl create secret generic powerstore-config -n csi-powerstore --from-file=config=secret.yaml
#
arrays:
# endpoint: full URL path to the PowerStore API
# Allowed Values: https://*.*.*.*/api/rest or https://abc.com/api/rest
# Default Value: None
# endpoint: full URL path to the PowerStore API
# Allowed Values: https://*.*.*.*/api/rest or https://abc.com/api/rest
# Default Value: None
- endpoint: "https://10.0.0.1/api/rest"

# globalID: unique id of the PowerStore array
Expand Down Expand Up @@ -84,10 +84,10 @@ arrays:
# Default value: "0777"
# nfsAcls: "0777"

# To add more PowerStore arrays, uncomment the following lines and provide the required values
#- endpoint: "https://11.0.0.1/api/rest"
# globalID: "unique"
# username: "user"
# password: "password"
# skipCertificateValidation: true
# blockProtocol: "FC"
# To add more PowerStore arrays, uncomment the following lines and provide the required values
# - endpoint: "https://11.0.0.1/api/rest"
# globalID: "unique"
# username: "user"
# password: "password"
# skipCertificateValidation: true
# blockProtocol: "FC"

0 comments on commit c408dd3

Please sign in to comment.