Skip to content

Commit

Permalink
Merge pull request #363 from dell/1435-quay-repo
Browse files Browse the repository at this point in the history
Updates for quay.io registry
  • Loading branch information
donatwork authored Oct 25, 2024
2 parents 2c45d65 + 926c699 commit a3e0c25
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 60 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ service/test/

# IDE
.idea
.vscode

# gosec
gosec.log
Expand Down
66 changes: 33 additions & 33 deletions dell-csi-helm-installer/csi-offline-bundle.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Description

The `csi-offline-bundle.sh` script can be used to create a package for the offline installation of Dell CSI storage providers for deployment via Helm.
The `csi-offline-bundle.sh` script can be used to create a package for the offline installation of Dell CSI storage providers for deployment via Helm.

This includes the following drivers:
* [PowerFlex](https://github.com/dell/csi-vxflexos)
Expand Down Expand Up @@ -78,30 +78,30 @@ For example, here is the output of a request to build an offline bundle for the
*
* Pulling and saving container images
dellemc/csi-isilon:v2.10.1
dellemc/csi-metadata-retriever:v1.6.0
dellemc/csipowermax-reverseproxy:v2.6.0
dellemc/csi-powermax:v2.10.1
dellemc/csi-powerstore:v2.10.1
dellemc/csi-unity:v2.10.1
dellemc/csi-vxflexos:v2.10.1
dellemc/csm-authorization-sidecar:v1.9.0
dellemc/csm-metrics-powerflex:v1.5.0
dellemc/csm-metrics-powerscale:v1.2.0
dellemc/csm-topology:v1.5.0
dellemc/dell-csi-replicator:v1.7.0
dellemc/dell-replication-controller:v1.7.0
dellemc/sdc:4.5
docker.io/dellemc/dell-csm-operator:v1.3.0
quay.io/dell/container-storage-module/csi-isilon:v2.12.0
quay.io/dell/container-storage-module/csi-metadata-retriever:v1.9.0
quay.io/dell/container-storage-module/csipowermax-reverseproxy:v2.11.0
quay.io/dell/container-storage-module/csi-powermax:v2.12.0
quay.io/dell/container-storage-module/csi-powerstore:v2.12.0
quay.io/dell/container-storage-module/csi-unity:v2.12.0
quay.io/dell/container-storage-module/csi-vxflexos:v2.12.0
quay.io/dell/container-storage-module/csm-authorization-sidecar:v1.12.0
quay.io/dell/container-storage-module/csm-metrics-powerflex:v1.10.0
quay.io/dell/container-storage-module/csm-metrics-powerscale:v1.7.0
quay.io/dell/container-storage-module/csm-topology:v1.10.0
quay.io/dell/container-storage-module/dell-csi-replicator:v1.10.0
quay.io/dell/container-storage-module/dell-replication-controller:v1.10.0
quay.io/dell/container-storage-modules/sdc:4.5
quay.io/dell/container-storage-modules/dell-csm-operator:v1.7.0
gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0
nginxinc/nginx-unprivileged:1.20
otel/opentelemetry-collector:0.42.0
registry.k8s.io/sig-storage/csi-attacher:v4.3.0
registry.k8s.io/sig-storage/csi-external-health-monitor-controller:v0.9.0
registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.8.0
registry.k8s.io/sig-storage/csi-provisioner:v3.5.0
registry.k8s.io/sig-storage/csi-resizer:v1.8.0
registry.k8s.io/sig-storage/csi-snapshotter:v6.2.2
registry.k8s.io/sig-storage/csi-external-health-monitor-controller:v0.13.0
registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.12.0
registry.k8s.io/sig-storage/csi-provisioner:v5.1.0
registry.k8s.io/sig-storage/csi-resizer:v1.12.0
registry.k8s.io/sig-storage/csi-snapshotter:v8.1.0
*
* Copying necessary files
Expand Down Expand Up @@ -176,32 +176,32 @@ Preparing a offline bundle for installation
*
* Loading docker images
Loaded image: docker.io/dellemc/csi-powerstore:v2.10.1
Loaded image: docker.io/dellemc/csi-isilon:v2.10.1
Loaded image: quay.io/dell/container-storage-modules/csi-powerstore:v2.12.0
Loaded image: quay.io/dell/container-storage-modules/csi-isilon:v2.12.0
...
...
Loaded image: registry.k8s.io/sig-storage/csi-resizer:v1.9.2
Loaded image: registry.k8s.io/sig-storage/csi-snapshotter:v6.3.2
Loaded image: registry.k8s.io/sig-storage/csi-resizer:v1.12.0
Loaded image: registry.k8s.io/sig-storage/csi-snapshotter:v8.1.0
*
* Tagging and pushing images
dellemc/csi-isilon:v2.10.1 -> localregistry:5000/dell-csm-operator/csi-isilon:v2.10.1
dellemc/csi-metadata-retriever:v1.6.0 -> localregistry:5000/dell-csm-operator/csi-metadata-retriever:v1.6.0
quay.io/dell/container-storage-modules/csi-isilon:v2.12.0 -> localregistry:5000/dell-csm-operator/csi-isilon:v2.12.0
quay.io/dell/container-storage-modules/csi-metadata-retriever:v1.9.0 -> localregistry:5000/dell-csm-operator/csi-metadata-retriever:v1.9.0
...
...
registry.k8s.io/sig-storage/csi-resizer:v1.9.2 -> localregistry:5000/dell-csm-operator/csi-resizer:v1.9.2
registry.k8s.io/sig-storage/csi-snapshotter:v6.3.2 -> localregistry:5000/dell-csm-operator/csi-snapshotter:v6.3.2
registry.k8s.io/sig-storage/csi-resizer:v1.12.0 -> localregistry:5000/dell-csm-operator/csi-resizer:v1.12.0
registry.k8s.io/sig-storage/csi-snapshotter:v8.1.0 -> localregistry:5000/dell-csm-operator/csi-snapshotter:v8.1.0
*
* Preparing files within /root/dell-csm-operator-bundle
changing: dellemc/csi-isilon:v2.10.1 -> localregistry:5000/dell-csm-operator/csi-isilon:v2.10.1
changing: dellemc/csi-metadata-retriever:v1.6.0 -> localregistry:5000/dell-csm-operator/csi-metadata-retriever:v1.6.0
changing: quay.io/dell/container-storage-modules/csi-isilon:v2.12.0 -> localregistry:5000/dell-csm-operator/csi-isilon:v2.12.0
changing: quay.io/dell/container-storage-modules/csi-metadata-retriever:v1.9.0 -> localregistry:5000/dell-csm-operator/csi-metadata-retriever:v1.9.0
...
...
changing: registry.k8s.io/sig-storage/csi-resizer:v1.9.2 -> localregistry:5000/dell-csm-operator/csi-resizer:v1.9.2
changing: registry.k8s.io/sig-storage/csi-snapshotter:v6.3.2 -> localregistry:5000/dell-csm-operator/csi-snapshotter:v6.3.2
changing: registry.k8s.io/sig-storage/csi-resizer:v1.12.0 -> localregistry:5000/dell-csm-operator/csi-resizer:v1.12.0
changing: registry.k8s.io/sig-storage/csi-snapshotter:v8.1.0 -> localregistry:5000/dell-csm-operator/csi-snapshotter:v8.1.0
*
* Complete
Expand Down
34 changes: 22 additions & 12 deletions dell-csi-helm-installer/csi-offline-bundle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ usage() {
echo " Supply the registry name/path which will hold the images"
echo " For example: my.registry.com:5000/dell/csi"
echo "-h Displays this information"
echo "-v Pass the helm chart version "
echo "-v Pass the helm chart version"
echo "-n Use the nightly tag for all CSI images on quay.io/dell"
echo
echo "Exactly one of '-c' or '-p' needs to be specified"
echo
Expand All @@ -36,7 +37,7 @@ status() {
echo
echo "*"
echo "* $@"
echo
echo
}

# run_command
Expand Down Expand Up @@ -88,7 +89,7 @@ build_image_manifest() {
done

# Forming this only for drivers supporting standalone helm charts
if [ ! -z ${DRIVERREPO} ]; then
if [ ! -z ${DRIVERREPO} ]; then
echo "${DRIVERREPO}/${DRIVERNAME}\:${DRIVERVERSIONVALUESYAML}"
echo "${DRIVERREPO}/${DRIVERNAME}:${DRIVERVERSIONVALUESYAML}" >> "${IMAGEMANIFEST}.tmp"
fi
Expand All @@ -109,15 +110,20 @@ archive_images() {
# the images, pull first in case some are not local
while read line; do
echo " $line"
run_command "${DOCKER}" pull "${line}"
if [[ "$NIGHTLY" = "true" ]] && [[ "$line" =~ quay.io/dell/container-storage-modules ]]; then
dockerImage=$(echo $line | sed 's/:[^:]*$/:nightly/')
run_command "${DOCKER}" pull "${dockerImage}" && run_command "${DOCKER}" tag "${dockerImage}" "${line}"
else
run_command "${DOCKER}" pull "${line}"
fi

IMAGEFILE=$(echo "${line}" | sed 's|[/:]|-|g')
# if we already have the image exported, skip it
if [ ! -f "${IMAGEFILEDIR}/${IMAGEFILE}.tar" ]; then
run_command "${DOCKER}" save -o "${IMAGEFILEDIR}/${IMAGEFILE}.tar" "${line}"
fi
done < "${IMAGEMANIFEST}"

}
}

# restore_images
# load the images from an archive into the local registry
Expand Down Expand Up @@ -146,7 +152,7 @@ copy_files() {
else
cp -R "${f}" "${DISTDIR}"
fi

if [ $? -ne 0 ]; then
echo "Unable to copy ${f} to the distribution directory"
exit 1
Expand Down Expand Up @@ -226,12 +232,13 @@ set_mode() {
CREATE="false"
PREPARE="false"
REGISTRY=""
NIGHTLY="false"
DRIVER="csi-powerstore"
HELMCHARTVERSION="csi-powerstore-2.12.0"

while getopts "cprv:h" opt; do
while getopts "cprnv:h" opt; do
case $opt in

c)
CREATE="true"
;;
Expand All @@ -249,6 +256,9 @@ while getopts "cprv:h" opt; do
usage
exit 0
;;
n)
NIGHTLY="true"
;;
\?)
echo "Invalid option: -$OPTARG" >&2
exit 1
Expand All @@ -265,12 +275,12 @@ done
SCRIPTDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
REPODIR="$( dirname "${SCRIPTDIR}" )"
if [ ! -d "$REPODIR/helm-charts" ]; then

if [ ! -d "$SCRIPTDIR/helm-charts" ]; then
git clone --quiet -c advice.detachedHead=false -b $HELMCHARTVERSION https://github.com/dell/helm-charts
fi
mv helm-charts $REPODIR
else
else
if [ -d "$SCRIPTDIR/helm-charts" ]; then
rm -rf $SCRIPTDIR/helm-charts
fi
Expand Down Expand Up @@ -359,7 +369,7 @@ if [ "${REGISTRY: -1}" != "/" ]; then
fi

# figure out if we should use docker or podman, preferring docker
DOCKER=$(which docker 2>/dev/null || which podman 2>/dev/null)
DOCKER=$(which docker 2>/dev/null || which podman 2>/dev/null)
if [ "${DOCKER}" == "" ]; then
echo "Unable to find either docker or podman in $PATH"
exit 1
Expand Down
28 changes: 13 additions & 15 deletions tests/sanity/helm/sanity-csi-powerstore/values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#
#
# Copyright © 2020-2024 Dell Inc. or its subsidiaries. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -23,26 +21,26 @@
driverName: "csi-powerstore.dellemc.com"
# "version" is used to verify the values file matches driver version
# Not recommend to change
version: v2.9.0
version: v2.12.0

# "images" defines every container images used for the driver and its sidecars.
# To use your own images, or a private registry, change the values here.
images:
# "driver" defines the container image, used for the driver container.
driver: dellemc/csi-powerstore:v2.9.0
driver: quay.io/dell/container-storage-modules/csi-powerstore:v2.12.0
# CSI sidecars
attacher: registry.k8s.io/sig-storage/csi-attacher:v4.4.2
provisioner: registry.k8s.io/sig-storage/csi-provisioner:v3.6.2
snapshotter: registry.k8s.io/sig-storage/csi-snapshotter:v6.3.2
resizer: registry.k8s.io/sig-storage/csi-resizer:v1.9.2
registrar: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.9.1
healthmonitor: registry.k8s.io/sig-storage/csi-external-health-monitor-controller:v0.10.0
attacher: registry.k8s.io/sig-storage/csi-attacher:v4.7.0
provisioner: registry.k8s.io/sig-storage/csi-provisioner:v5.1.0
snapshotter: registry.k8s.io/sig-storage/csi-snapshotter:v8.1.0
resizer: registry.k8s.io/sig-storage/csi-resizer:v1.12.0
registrar: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.12.0
healthmonitor: registry.k8s.io/sig-storage/csi-external-health-monitor-controller:v0.13.0

# CSM sidecars
replication: dellemc/dell-csi-replicator:v1.7.0
vgsnapshotter: dellemc/csi-volumegroup-snapshotter:v1.4.0
podmon: dellemc/podmon:v1.8.0
metadataretriever: dellemc/csi-metadata-retriever:v1.6.0
replication: quay.io/dell/container-storage-modules/dell-csi-replicator:v1.10.0
vgsnapshotter: quay.io/dell/container-storage-modules/csi-volumegroup-snapshotter:v1.7.0
podmon: quay.io/dell/container-storage-modules/podmon:v1.11.0
metadataretriever: quay.io/dell/container-storage-modules/csi-metadata-retriever:v1.9.0

# Specify kubelet config dir path.
# Ensure that the config.yaml file is present at this path.
Expand Down Expand Up @@ -347,4 +345,4 @@ podmon:
- "--leaderelection=false"
- "--driver-config-params=/powerstore-config-params/driver-config-params.yaml"
- "--driverPodLabelValue=dell-storage"
- "--ignoreVolumelessPods=false"
- "--ignoreVolumelessPods=false"

0 comments on commit a3e0c25

Please sign in to comment.