From 8cd8953f3273a7b1aac883f2b9b6547bd983a040 Mon Sep 17 00:00:00 2001 From: Anurag Mittal Date: Mon, 13 Jan 2025 09:19:11 +0100 Subject: [PATCH] COSI-XX: updated-namepsace-to-match-controller --- .github/scripts/capture_k8s_logs.sh | 2 +- .github/scripts/cleanup_cosi_resources.sh | 6 +++--- .github/scripts/e2e_tests_brownfield_use_case.sh | 2 +- .github/scripts/e2e_tests_metrics.sh | 2 +- .github/scripts/setup_cosi_resources.sh | 4 ++-- .github/scripts/verify_helm_install.sh | 2 +- .github/workflows/helm-validation.yml | 10 +++++----- cosi-examples/brownfield/bucket.yaml | 2 +- cosi-examples/brownfield/bucketaccess.yaml | 2 +- cosi-examples/brownfield/bucketaccessclass.yaml | 2 +- cosi-examples/brownfield/bucketclaim.yaml | 2 +- cosi-examples/brownfield/bucketclass.yaml | 2 +- .../remote-debugging-golang-on-kubernetes.md | 6 +++--- docs/installation/install-helm.md | 4 ++-- helm/scality-cosi-driver/values.yaml | 2 +- kustomize/base/kustomization.yaml | 2 +- kustomize/overlays/dev/kustomization.yaml | 2 +- 17 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/scripts/capture_k8s_logs.sh b/.github/scripts/capture_k8s_logs.sh index 61c39396..87b9e5df 100755 --- a/.github/scripts/capture_k8s_logs.sh +++ b/.github/scripts/capture_k8s_logs.sh @@ -6,7 +6,7 @@ mkdir -p logs/kind_cluster_logs LOG_FILE_PATH=".github/e2e_tests/artifacts/logs/kind_cluster_logs" mkdir -p "$(dirname "$LOG_FILE_PATH")" # Ensure the log directory exists # Define namespaces to capture logs from -namespaces=("default" "scality-object-storage") +namespaces=("default" "container-object-storage-system") # Loop through specified namespaces, pods, and containers for namespace in "${namespaces[@]}"; do diff --git a/.github/scripts/cleanup_cosi_resources.sh b/.github/scripts/cleanup_cosi_resources.sh index 4df57598..bd8f9f7f 100755 --- a/.github/scripts/cleanup_cosi_resources.sh +++ b/.github/scripts/cleanup_cosi_resources.sh @@ -19,11 +19,11 @@ log_and_run() { log_and_run echo "Removing COSI driver manifests and namespace..." log_and_run kubectl delete -k . || { echo "COSI driver manifests not found." | tee -a "$LOG_FILE"; } -log_and_run kubectl delete namespace scality-object-storage || { echo "Namespace scality-object-storage not found." | tee -a "$LOG_FILE"; } +log_and_run kubectl delete namespace container-object-storage-system || { echo "Namespace container-object-storage-system not found." | tee -a "$LOG_FILE"; } log_and_run echo "Verifying namespace deletion..." -if kubectl get namespace scality-object-storage &>/dev/null; then - echo "Warning: Namespace scality-object-storage was not deleted." | tee -a "$LOG_FILE" +if kubectl get namespace container-object-storage-system &>/dev/null; then + echo "Warning: Namespace container-object-storage-system was not deleted." | tee -a "$LOG_FILE" exit 1 fi diff --git a/.github/scripts/e2e_tests_brownfield_use_case.sh b/.github/scripts/e2e_tests_brownfield_use_case.sh index bc4eefca..3d972224 100755 --- a/.github/scripts/e2e_tests_brownfield_use_case.sh +++ b/.github/scripts/e2e_tests_brownfield_use_case.sh @@ -9,7 +9,7 @@ SECRET_NAME="brownfield-bucket-secret" IAM_ENDPOINT="http://$HOST_IP:8600" S3_ENDPOINT="http://$HOST_IP:8000" BUCKET_NAME="brownfield-bucket" -NAMESPACE="scality-object-storage" +NAMESPACE="container-object-storage-system" REGION="us-west-1" # Error handling function diff --git a/.github/scripts/e2e_tests_metrics.sh b/.github/scripts/e2e_tests_metrics.sh index 46fbf639..32857715 100755 --- a/.github/scripts/e2e_tests_metrics.sh +++ b/.github/scripts/e2e_tests_metrics.sh @@ -4,7 +4,7 @@ set -e LOG_FILE=".github/e2e_tests/artifacts/logs/e2e_tests/metrics_service.log" mkdir -p "$(dirname "$LOG_FILE")" -NAMESPACE="scality-object-storage" +NAMESPACE="container-object-storage-system" SERVICE="scality-cosi-driver-metrics" LOCAL_PORT=8080 TARGET_PORT=8080 diff --git a/.github/scripts/setup_cosi_resources.sh b/.github/scripts/setup_cosi_resources.sh index 90c7e8a5..cae71cb9 100755 --- a/.github/scripts/setup_cosi_resources.sh +++ b/.github/scripts/setup_cosi_resources.sh @@ -54,10 +54,10 @@ fi # Step 6: Verify COSI driver Pod Status log_and_run echo "Verifying COSI driver Pod status..." -if ! kubectl wait --namespace scality-object-storage --for=condition=ready pod --selector=app.kubernetes.io/name=scality-cosi-driver --timeout=30s; then +if ! kubectl wait --namespace container-object-storage-system --for=condition=ready pod --selector=app.kubernetes.io/name=scality-cosi-driver --timeout=30s; then echo "Error: COSI driver Pod did not reach ready state." | tee -a "$LOG_FILE" exit 1 fi -log_and_run kubectl get pods -n scality-object-storage +log_and_run kubectl get pods -n container-object-storage-system log_and_run echo "COSI setup completed successfully." diff --git a/.github/scripts/verify_helm_install.sh b/.github/scripts/verify_helm_install.sh index d9698164..3179daeb 100755 --- a/.github/scripts/verify_helm_install.sh +++ b/.github/scripts/verify_helm_install.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -NAMESPACE="scality-object-storage" +NAMESPACE="container-object-storage-system" echo "Verifying Helm installation..." diff --git a/.github/workflows/helm-validation.yml b/.github/workflows/helm-validation.yml index 37e57171..06a3dfd6 100644 --- a/.github/workflows/helm-validation.yml +++ b/.github/workflows/helm-validation.yml @@ -60,14 +60,14 @@ jobs: - name: Install Scality COSI Helm Chart run: | helm install scality-cosi-driver ./helm/scality-cosi-driver \ - --namespace scality-object-storage \ + --namespace container-object-storage-system \ --create-namespace \ --set image.tag=latest \ --set traces.otel_stdout=true - - name: Print all resources in scality-object-storage namespace + - name: Print all resources in container-object-storage-system namespace run: | - kubectl get all -n scality-object-storage + kubectl get all -n container-object-storage-system - name: Verify Helm Installation run: | @@ -94,6 +94,6 @@ jobs: - name: Cleanup Helm Release and Namespace run: | - helm uninstall scality-cosi-driver -n scality-object-storage - kubectl delete namespace scality-object-storage + helm uninstall scality-cosi-driver -n container-object-storage-system + kubectl delete namespace container-object-storage-system if: always() diff --git a/cosi-examples/brownfield/bucket.yaml b/cosi-examples/brownfield/bucket.yaml index 76969896..065d9cfb 100644 --- a/cosi-examples/brownfield/bucket.yaml +++ b/cosi-examples/brownfield/bucket.yaml @@ -2,7 +2,7 @@ apiVersion: objectstorage.k8s.io/v1alpha1 kind: Bucket metadata: name: brownfield-bucket # should be same as bucket name - namespace: scality-object-storage + namespace: container-object-storage-system spec: bucketClaim: {} bucketClassName: brownfield-bucket-class diff --git a/cosi-examples/brownfield/bucketaccess.yaml b/cosi-examples/brownfield/bucketaccess.yaml index e0d7796c..fad52782 100644 --- a/cosi-examples/brownfield/bucketaccess.yaml +++ b/cosi-examples/brownfield/bucketaccess.yaml @@ -2,7 +2,7 @@ apiVersion: objectstorage.k8s.io/v1alpha1 kind: BucketAccess metadata: name: brownfield-bucket-access - namespace: scality-object-storage + namespace: container-object-storage-system spec: bucketAccessClassName: brownfield-bucket-access-class bucketClaimName: brownfield-bucket-claim diff --git a/cosi-examples/brownfield/bucketaccessclass.yaml b/cosi-examples/brownfield/bucketaccessclass.yaml index 05137647..795a9305 100644 --- a/cosi-examples/brownfield/bucketaccessclass.yaml +++ b/cosi-examples/brownfield/bucketaccessclass.yaml @@ -2,7 +2,7 @@ kind: BucketAccessClass apiVersion: objectstorage.k8s.io/v1alpha1 metadata: name: brownfield-bucket-access-class - namespace: scality-object-storage + namespace: container-object-storage-system driverName: cosi.scality.com authenticationType: KEY parameters: diff --git a/cosi-examples/brownfield/bucketclaim.yaml b/cosi-examples/brownfield/bucketclaim.yaml index 482bfdde..42968254 100644 --- a/cosi-examples/brownfield/bucketclaim.yaml +++ b/cosi-examples/brownfield/bucketclaim.yaml @@ -2,7 +2,7 @@ apiVersion: objectstorage.k8s.io/v1alpha1 kind: BucketClaim metadata: name: brownfield-bucket-claim - namespace: scality-object-storage + namespace: container-object-storage-system spec: bucketClassName: brownfield-bucket-class existingBucketName: brownfield-bucket # name of Bucket object diff --git a/cosi-examples/brownfield/bucketclass.yaml b/cosi-examples/brownfield/bucketclass.yaml index 622863eb..2daaa1cc 100644 --- a/cosi-examples/brownfield/bucketclass.yaml +++ b/cosi-examples/brownfield/bucketclass.yaml @@ -2,7 +2,7 @@ apiVersion: objectstorage.k8s.io/v1alpha1 kind: BucketClass metadata: name: brownfield-bucket-class - namespace: scality-object-storage + namespace: container-object-storage-system driverName: cosi.scality.com deletionPolicy: Delete parameters: diff --git a/docs/development/remote-debugging-golang-on-kubernetes.md b/docs/development/remote-debugging-golang-on-kubernetes.md index dd3c6adf..5824994a 100644 --- a/docs/development/remote-debugging-golang-on-kubernetes.md +++ b/docs/development/remote-debugging-golang-on-kubernetes.md @@ -44,7 +44,7 @@ kubectl apply -k kustomize/overlays/debug Wait until the pod is ready to ensure the deployment succeeded: ```bash -kubectl wait --namespace scality-object-storage --for=condition=ready pod --selector=app.kubernetes.io/name=scality-cosi-driver --timeout=120s +kubectl wait --namespace container-object-storage-system --for=condition=ready pod --selector=app.kubernetes.io/name=scality-cosi-driver --timeout=120s ``` --- @@ -54,13 +54,13 @@ kubectl wait --namespace scality-object-storage --for=condition=ready pod --sele Identify the pod name for the COSI driver: ```bash -kubectl get pods -n scality-object-storage +kubectl get pods -n container-object-storage-system ``` Forward port `2345` from the Kubernetes pod to your local machine to connect VS Code to the Delve debugger: ```bash -kubectl port-forward -n scality-object-storage pod/ 2345:2345 +kubectl port-forward -n container-object-storage-system pod/ 2345:2345 ``` Replace `` with the actual name of the pod. diff --git a/docs/installation/install-helm.md b/docs/installation/install-helm.md index b96aaef6..a4e4a6b5 100644 --- a/docs/installation/install-helm.md +++ b/docs/installation/install-helm.md @@ -36,7 +36,7 @@ This guide provides step-by-step instructions for installing the Scality COSI Dr ```bash git clone https://github.com/scality/cosi-driver.git cd cosi-driver - helm install scality-cosi-driver ./helm/scality-cosi-driver --namespace scality-object-storage --create-namespace --set image.tag=0.1.0 + helm install scality-cosi-driver ./helm/scality-cosi-driver --namespace container-object-storage-system --create-namespace --set image.tag=0.1.0 ``` ### Package locally and install @@ -45,7 +45,7 @@ This guide provides step-by-step instructions for installing the Scality COSI Dr git clone https://github.com/scality/cosi-driver.git cd cosi-driver helm package ./helm/scality-cosi-driver --version 0.1.0 - helm install scality-cosi-driver ./scality-cosi-driver-0.1.0.tgz --namespace scality-object-storage --create-namespace --set image.tag=0.1.0 + helm install scality-cosi-driver ./scality-cosi-driver-0.1.0.tgz --namespace container-object-storage-system --create-namespace --set image.tag=0.1.0 ``` ### Install from OCI Registry with Helm diff --git a/helm/scality-cosi-driver/values.yaml b/helm/scality-cosi-driver/values.yaml index 77003c32..96e9d2d8 100644 --- a/helm/scality-cosi-driver/values.yaml +++ b/helm/scality-cosi-driver/values.yaml @@ -18,7 +18,7 @@ logLevels: sidecar: "2" -namespace: scality-object-storage +namespace: container-object-storage-system fullnameOverride: scality-cosi-driver diff --git a/kustomize/base/kustomization.yaml b/kustomize/base/kustomization.yaml index f88823eb..3ce493ba 100644 --- a/kustomize/base/kustomization.yaml +++ b/kustomize/base/kustomization.yaml @@ -1,7 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -namespace: scality-object-storage +namespace: container-object-storage-system resources: - namespace.yaml diff --git a/kustomize/overlays/dev/kustomization.yaml b/kustomize/overlays/dev/kustomization.yaml index c42fa778..03a2db14 100644 --- a/kustomize/overlays/dev/kustomization.yaml +++ b/kustomize/overlays/dev/kustomization.yaml @@ -1,7 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -namespace: scality-object-storage +namespace: container-object-storage-system configMapGenerator: - name: scality-cosi-driver-properties