From fa5465ad6f8e6587e4f6cb404d012be0b3ef9c48 Mon Sep 17 00:00:00 2001 From: Anurag Mittal <1321012+anurag4DSB@users.noreply.github.com> Date: Fri, 19 Jun 2026 11:27:18 +0200 Subject: [PATCH] COSI-99: quote COSI controller install URL for cross-shell compatibility The documented `kubectl create -k github.com/...?ref=v0.2.2` command fails in zsh (the macOS default) and tcsh/csh because the unquoted `?` is treated as a filename glob (`no matches found`). Quote the URL and add kustomize's `//` repo-root separator so it works in every shell. Applied everywhere the command appears: the quickstart in README.md and docs/installation/install-helm.md, and the three CI call sites (setup/cleanup scripts and the helm-validation workflow) so docs and CI stay aligned and the quoted form is exercised on every run. --- .github/scripts/cleanup_cosi_resources.sh | 2 +- .github/scripts/setup_cosi_resources.sh | 2 +- .github/workflows/helm-validation.yml | 2 +- README.md | 2 +- docs/installation/install-helm.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/scripts/cleanup_cosi_resources.sh b/.github/scripts/cleanup_cosi_resources.sh index 4ff5868..a3bb860 100755 --- a/.github/scripts/cleanup_cosi_resources.sh +++ b/.github/scripts/cleanup_cosi_resources.sh @@ -63,7 +63,7 @@ log_and_run echo "Deleting s3-secret-for-cosi secret..." log_and_run kubectl delete secret s3-secret-for-cosi --namespace=default || { echo "Secret s3-secret-for-cosi not found." | tee -a "$LOG_FILE"; } log_and_run echo "Deleting COSI CRD..." -log_and_run kubectl delete -k github.com/kubernetes-sigs/container-object-storage-interface?ref=v0.2.2 || { echo "COSI API CRDs or controller not found." | tee -a "$LOG_FILE"; } +log_and_run kubectl delete -k "github.com/kubernetes-sigs/container-object-storage-interface//?ref=v0.2.2" || { echo "COSI API CRDs or controller not found." | tee -a "$LOG_FILE"; } log_and_run echo "Verifying COSI CRDs deletion..." if kubectl get crd | grep 'container-object-storage-interface' &>/dev/null; then diff --git a/.github/scripts/setup_cosi_resources.sh b/.github/scripts/setup_cosi_resources.sh index 95c2f58..89691c1 100755 --- a/.github/scripts/setup_cosi_resources.sh +++ b/.github/scripts/setup_cosi_resources.sh @@ -26,7 +26,7 @@ log_and_run() { # Step 1: Install COSI CRDs log_and_run echo "Installing COSI CRD..." -log_and_run kubectl create -k github.com/kubernetes-sigs/container-object-storage-interface?ref=v0.2.2 +log_and_run kubectl create -k "github.com/kubernetes-sigs/container-object-storage-interface//?ref=v0.2.2" log_and_run kubectl get pods --namespace container-object-storage-system # Step 2: Verify COSI Controller Pod Status diff --git a/.github/workflows/helm-validation.yml b/.github/workflows/helm-validation.yml index 60855cf..4994dc6 100644 --- a/.github/workflows/helm-validation.yml +++ b/.github/workflows/helm-validation.yml @@ -77,7 +77,7 @@ jobs: set -e -o pipefail ( echo "=== Setup COSI Controller, CRDs and Driver ===" - kubectl create -k github.com/kubernetes-sigs/container-object-storage-interface?ref=v0.2.2 + kubectl create -k "github.com/kubernetes-sigs/container-object-storage-interface//?ref=v0.2.2" make container kind load docker-image ghcr.io/scality/cosi-driver:latest --name helm-test-cluster ) & diff --git a/README.md b/README.md index 393ae09..a03dfce 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ To quickly deploy and test the Scality COSI Driver: 2. Create namespace `container-object-storage-system` and install the COSI controller deployment and COSI CRDs. The Scality COSI Driver supports only COSI **v1alpha1** — the command below pins upstream to tag `v0.2.2` (the last v1alpha1 release). Do not install from upstream `main`, which now ships v1alpha2 and is incompatible with this driver. ```bash - kubectl create -k github.com/kubernetes-sigs/container-object-storage-interface?ref=v0.2.2 + kubectl create -k "github.com/kubernetes-sigs/container-object-storage-interface//?ref=v0.2.2" ``` 3. Deploy the driver: Namespace `container-object-storage-system` will be created in step 2. diff --git a/docs/installation/install-helm.md b/docs/installation/install-helm.md index 8a2ea31..592bba5 100644 --- a/docs/installation/install-helm.md +++ b/docs/installation/install-helm.md @@ -24,7 +24,7 @@ Its recommended to deploy COSI controller first which creates the `container-obj The Scality COSI Driver supports only COSI **v1alpha1**. The command below pins the upstream controller and CRDs to tag `v0.2.2` (the last v1alpha1 release) — do not install from upstream `main`, which now ships v1alpha2 and is incompatible with this driver. ```bash -kubectl create -k github.com/kubernetes-sigs/container-object-storage-interface?ref=v0.2.2 +kubectl create -k "github.com/kubernetes-sigs/container-object-storage-interface//?ref=v0.2.2" ```