Skip to content

Commit

Permalink
"rlease 1.5.0"
Browse files Browse the repository at this point in the history
  • Loading branch information
jooseppi-luna committed Jun 28, 2021
1 parent 1cd186b commit 5c1b969
Show file tree
Hide file tree
Showing 38 changed files with 2,256 additions and 486 deletions.
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ test/integration/stderr
semver.mk
goscaleio/
gofsutil/
.idea/*
.vscode/

.idea
.vscode
*.log
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ LABEL vendor="Dell Inc." \
name="csi-powerflex" \
summary="CSI Driver for Dell EMC PowerFlex" \
description="CSI Driver for provisioning persistent storage from Dell EMC PowerFlex" \
version="1.4.0" \
version="1.5.0" \
license="Apache-2.0"
COPY ./licenses /licenses
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
## Description
CSI Driver for PowerFlex is a Container Storage Interface ([CSI](https://github.com/container-storage-interface/spec)) driver that provides support for provisioning persistent storage using Dell EMC PowerFlex storage array.

It supports CSI specification version 1.2.
It supports CSI specification version 1.3.

This project may be compiled as a stand-alone binary using Golang that, when run, provides a valid CSI endpoint. It also can be used as a precompiled container image.

Expand Down
20 changes: 0 additions & 20 deletions config.json

This file was deleted.

13 changes: 13 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
- username: "admin"
password: "password"
systemID: "ID1"
endpoint: "https://127.0.0.1"
skipCertificateValidation: true
isDefault: true
mdm: "10.0.0.1,10.0.0.2"
- username: "admin"
password: "Password123"
systemID: "ID2"
endpoint: "https://127.0.0.2"
skipCertificateValidation: true
mdm: "10.0.0.3,10.0.0.4"
100 changes: 59 additions & 41 deletions dell-csi-helm-installer/verify-csi-vxflexos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,66 +11,63 @@
#
# verify-csi-vxflexos method
function verify-csi-vxflexos() {
verify_k8s_versions "1.18" "1.20"
verify_openshift_versions "4.5" "4.6"
verify_k8s_versions "1.19" "1.21"
verify_openshift_versions "4.6" "4.7"
verify_namespace "${NS}"
verify_required_secrets "${RELEASE}-config"
verify_mdm_secret "${RELEASE}-config"
verify_sdc_installation
verify_alpha_snap_resources
verify_snap_requirements
verify_helm_3
verify_configmap "driver-config"
}

# verify each ip format
# verify each ip format
function check_ip() {
IP=${1}
REGEX="\b([0-9]{1,3}\.){3}[0-9]{1,3}\b"
ADDR=`echo $IP | grep -oE ${REGEX}`
RC=$?
if [[ "$RC" -eq "0" ]]; then
log smart_step "IP ADDR $ADDR format is ok"
else
log error "SDC MDM validation failed. IP address $ip format is not ok"
fi
IP=${1}
REGEX="\b([0-9]{1,3}\.){3}[0-9]{1,3}\b"
ADDR=$(echo $IP | grep -oE ${REGEX})
RC=$?
if [[ "$RC" -eq "0" ]]; then
log smart_step "IP ADDR $ADDR format is ok"
else
log error "SDC MDM validation failed. IP address $ip format is not ok"
fi
}

# make MDM secret key with values from each array
# fail if MDM format is not valid
function verify_mdm_secret() {

log smart_step "Get SDC config and make MDM string for multi array support"
SECRET=${1}
VAL=`kubectl get secret ${SECRET} -n ${NS} -o go-template='{{ .data.config }}'`
if [ "${VAL}" == "" ]; then
log error "secret ${SECRET} in namespace ${NS} not found"
else
JSON=`kubectl get secret ${SECRET} -n ${NS} -o go-template='{{ .data.config }}' | base64 --decode`
DATA=`echo ${JSON} | awk -F"\"" '{for (i=0; i<NF; i++) {if ( $i == "mdm" ) { print $(i+2) }}}'`
MDM=`echo ${DATA} | xargs | sed "s/ /\&/g"`
if [ "${MDM}" != "" ]; then
ENC=`echo ${MDM} | base64 | tr -d "\n"`
KRC=`kubectl patch secret ${SECRET} -n ${NS} -p "{\"data\": { \"MDM\": \"${ENC}\"}}"`
VAL=`kubectl get secret ${SECRET} -n ${NS} -o go-template='{{ .data.MDM }}' | base64 --decode`
log smart_step "SDC MDM value created : ${VAL}"
else
log error "SDC MDM string could not be determined, add mdm to config.json"
exit 2
fi
fi

for i in $(echo ${MDM} | tr "&" "\n")
do
# check mdm for each array
for p in $(echo $i | tr "," "\n")
do
check_ip $p
done
done
log smart_step "Get SDC config and make MDM string for multi array support"
SECRET=${1}
VAL=$(kubectl get secret ${SECRET} -n ${NS} -o go-template='{{ .data.config }}')
if [ "${VAL}" == "" ]; then
log error "secret ${SECRET} in namespace ${NS} not found"
else
JSON=$(kubectl get secret ${SECRET} -n ${NS} -o go-template='{{ .data.config }}' | base64 --decode)
DATA=$(echo "${JSON}" | grep mdm | awk -F "\"" '{ print $(NF-1)}')
MDM=$(echo ${DATA} | sed "s/ /\&/g")
if [ "${MDM}" != "" ]; then
ENC=$(echo ${MDM} | base64 | tr -d "\n")
KRC=$(kubectl patch secret ${SECRET} -n ${NS} -p "{\"data\": { \"MDM\": \"${ENC}\"}}")
VAL=$(kubectl get secret ${SECRET} -n ${NS} -o go-template='{{ .data.MDM }}' | base64 --decode)
log smart_step "SDC MDM value created : ${VAL}"
else
log error "SDC MDM string could not be determined, add mdm to config.json"
exit 2
fi
fi

for i in $(echo ${MDM} | tr "&" "\n"); do
# check mdm for each array
for p in $(echo $i | tr "," "\n"); do
check_ip $p
done
done
}


# Check if the SDC is installed and the kernel module loaded
function verify_sdc_installation() {
if [ ${NODE_VERIFY} -eq 0 ]; then
Expand All @@ -94,3 +91,24 @@ function verify_sdc_installation() {
done
check_error error
}

# verify configmap exists
function verify_configmap() {
log step "Verifying that configmap exists"

error=0
for N in "${@}"; do
# Make sure the configmap, driver-config exists
run_command kubectl describe configmap -n vxflexos "${N}" >/dev/null 2>&1
if [ $? -ne 0 ]; then
error=1
found_error "Configmap with logging config does not exist: ${N}"
fi
done

check_error error
}




19 changes: 12 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,33 @@ module github.com/dell/csi-vxflexos

//replace github.com/dell/dell-csi-extensions/podmon => ./dell-csi-extensions/podmon

go 1.15
//replace github.com/dell/dell-csi-extensions/volumeGroupSnapshot => ./dell-csi-extensions/volumeGroupSnapshot

go 1.16

require (
github.com/akutz/memconn v0.1.0
github.com/container-storage-interface/spec v1.2.0
github.com/container-storage-interface/spec v1.3.0
github.com/cucumber/godog v0.10.0
github.com/dell/dell-csi-extensions/podmon v0.1.0
github.com/dell/gocsi v1.2.3
github.com/dell/dell-csi-extensions/volumeGroupSnapshot v0.1.0
github.com/dell/gocsi v1.3.0
github.com/dell/gofsutil v1.4.0
github.com/dell/goscaleio v1.3.0
github.com/dell/goscaleio v1.4.0
github.com/fsnotify/fsnotify v1.4.7
github.com/golang/protobuf v1.4.3
github.com/google/gofuzz v1.2.0 // indirect
github.com/googleapis/gnostic v0.4.0 // indirect
github.com/gorilla/context v1.1.1 // indirect
github.com/gorilla/mux v1.6.2
github.com/kubernetes-csi/csi-lib-utils v0.7.0
github.com/sirupsen/logrus v1.4.2
github.com/stretchr/testify v1.6.1
golang.org/x/net v0.0.0-20200822124328-c89045814202
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
github.com/spf13/viper v1.7.1
github.com/stretchr/testify v1.7.0
golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb
google.golang.org/grpc v1.29.0
k8s.io/client-go v0.18.6
k8s.io/utils v0.0.0-20200912215256-4140de9c8800 // indirect
sigs.k8s.io/yaml v1.2.0

)
Loading

0 comments on commit 5c1b969

Please sign in to comment.