-
Notifications
You must be signed in to change notification settings - Fork 51
Don't review: simple reader testing + building csi from scratch #1166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,6 +36,8 @@ func main() { | |
| klog.InitFlags(nil) | ||
| flag.Parse() | ||
|
|
||
| klog.Info("*** CUSTOM BUILD: Metadata Prefetch - Manual Test Version ***") | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| // Create cancellable context to pass into exec. | ||
| ctx, cancel := context.WithCancel(context.Background()) | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -56,6 +56,7 @@ func main() { | |
| klog.InitFlags(nil) | ||
| flag.Parse() | ||
|
|
||
| klog.Info("*** CUSTOM BUILD: Sidecar Mounter - Manual Test Version ***") | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| klog.Infof("Running Google Cloud Storage FUSE CSI driver sidecar mounter version %v", version) | ||
|
|
||
| socketPathPattern := *volumeBasePath + "/*/socket" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -74,6 +74,8 @@ func main() { | |
| klog.InitFlags(nil) | ||
| flag.Parse() | ||
|
|
||
| klog.Info("*** CUSTOM BUILD: Webhook - Manual Test Version ***") | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| // Thanks to the PR https://github.com/solo-io/gloo/pull/8549 | ||
| // This line prevents controller-runtime from complaining about log.SetLogger never being called | ||
| log.SetLogger(logr.New(log.NullLogSink{})) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| gcloud beta container --project "gcs-tess" clusters create "rapid-ga-test-cluster-us-west4a" \ | ||
| --zone "us-west4-a" \ | ||
| --no-enable-basic-auth \ | ||
| --cluster-version "1.33.5-gke.2072000" \ | ||
| --release-channel "regular" \ | ||
| --machine-type "c4-standard-192" \ | ||
| --image-type "COS_CONTAINERD" \ | ||
| --disk-type "hyperdisk-balanced" \ | ||
| --disk-size "400" \ | ||
| --metadata disable-legacy-endpoints=true \ | ||
| --service-account "default" \ | ||
| --max-pods-per-node "110" \ | ||
| --num-nodes "8" \ | ||
| --logging=SYSTEM,WORKLOAD \ | ||
| --monitoring=SYSTEM,STORAGE,POD,DEPLOYMENT,STATEFULSET,DAEMONSET,HPA,CADVISOR,KUBELET \ | ||
| --enable-ip-alias \ | ||
| --network "projects/gcs-tess/global/networks/default" \ | ||
| --subnetwork "projects/gcs-tess/regions/us-west4/subnetworks/default" \ | ||
| --cluster-secondary-range-name "geertj-pods" \ | ||
| --no-enable-intra-node-visibility \ | ||
| --default-max-pods-per-node "110" \ | ||
| --enable-ip-access \ | ||
| --security-posture=standard \ | ||
| --workload-vulnerability-scanning=disabled \ | ||
| --addons HorizontalPodAutoscaling,HttpLoadBalancing,GcePersistentDiskCsiDriver \ | ||
| --enable-autoupgrade \ | ||
| --enable-autorepair \ | ||
| --max-surge-upgrade 1 \ | ||
| --max-unavailable-upgrade 0 \ | ||
| --binauthz-evaluation-mode=DISABLED \ | ||
| --enable-shielded-nodes \ | ||
| --shielded-integrity-monitoring \ | ||
| --no-shielded-secure-boot \ | ||
| --node-locations "us-west4-a" \ | ||
| --enable-gvnic \ | ||
| --workload-pool=gcs-tess.svc.id.goog | ||
|
Comment on lines
+1
to
+36
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This script has several issues that affect its usability and correctness:
I suggest refactoring it to use variables for configuration and adding a shebang. #!/bin/bash
set -euo pipefail
# Configuration
PROJECT="gcs-tess"
CLUSTER_NAME="rapid-ga-test-cluster-us-west4a"
ZONE="us-west4-a"
CLUSTER_VERSION="1.33.5-gke.2072000"
RELEASE_CHANNEL="regular"
MACHINE_TYPE="c4-standard-192"
IMAGE_TYPE="COS_CONTAINERD"
DISK_TYPE="hyperdisk-balanced"
DISK_SIZE="400"
NUM_NODES="8"
WORKLOAD_POOL="${PROJECT}.svc.id.goog"
CLUSTER_SECONDARY_RANGE_NAME="geertj-pods"
gcloud beta container --project "${PROJECT}" clusters create "${CLUSTER_NAME}" \
--zone "${ZONE}" \
--no-enable-basic-auth \
--cluster-version "${CLUSTER_VERSION}" \
--release-channel "${RELEASE_CHANNEL}" \
--machine-type "${MACHINE_TYPE}" \
--image-type "${IMAGE_TYPE}" \
--disk-type "${DISK_TYPE}" \
--disk-size "${DISK_SIZE}" \
--metadata disable-legacy-endpoints=true \
--service-account "default" \
--max-pods-per-node "110" \
--num-nodes "${NUM_NODES}" \
--logging=SYSTEM,WORKLOAD \
--monitoring=SYSTEM,STORAGE,POD,DEPLOYMENT,STATEFULSET,DAEMONSET,HPA,CADVISOR,KUBELET \
--enable-ip-alias \
--network "projects/${PROJECT}/global/networks/default" \
--subnetwork "projects/${PROJECT}/regions/us-west4/subnetworks/default" \
--cluster-secondary-range-name "${CLUSTER_SECONDARY_RANGE_NAME}" \
--no-enable-intra-node-visibility \
--default-max-pods-per-node "110" \
--enable-ip-access \
--security-posture=standard \
--workload-vulnerability-scanning=disabled \
--addons HorizontalPodAutoscaling,HttpLoadBalancing,GcePersistentDiskCsiDriver \
--enable-autoupgrade \
--enable-autorepair \
--max-surge-upgrade 1 \
--max-unavailable-upgrade 0 \
--binauthz-evaluation-mode=DISABLED \
--enable-shielded-nodes \
--shielded-integrity-monitoring \
--no-shielded-secure-boot \
--node-locations "${ZONE}" \
--enable-gvnic \
--workload-pool="${WORKLOAD_POOL}"
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,125 @@ | ||||||||||||||||||||||||||
| #!/bin/bash | ||||||||||||||||||||||||||
| # Setup script for testing custom GCS FUSE CSI Driver | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| set -e | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # Parse flags | ||||||||||||||||||||||||||
| SKIP_SETUP=false | ||||||||||||||||||||||||||
| if [[ "$1" == "--skip-setup" ]] || [[ "$1" == "-s" ]]; then | ||||||||||||||||||||||||||
| SKIP_SETUP=true | ||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| PROJECT_ID="gcs-tess" | ||||||||||||||||||||||||||
| PROJECT_NUMBER="222564316065" | ||||||||||||||||||||||||||
| NAMESPACE="gcs-csi-test" | ||||||||||||||||||||||||||
| # BUCKET_NAME="gcs-fuse-warp-test-bucket" | ||||||||||||||||||||||||||
| BUCKET_NAME="princer-zonal-us-west4-a" | ||||||||||||||||||||||||||
| KSA_NAME="gcs-csi-test-sa" | ||||||||||||||||||||||||||
|
Comment on lines
+12
to
+17
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The script contains hardcoded values for project ID, project number, namespace, bucket name, and KSA name. This makes the script difficult to reuse in different environments or for different tests. Consider parameterizing these values using environment variables with defaults or command-line arguments.
Suggested change
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| echo "=== Setting up GCS FUSE CSI Driver Test ===" | ||||||||||||||||||||||||||
| echo "Project: $PROJECT_ID" | ||||||||||||||||||||||||||
| echo "Project Number: $PROJECT_NUMBER" | ||||||||||||||||||||||||||
| echo "Namespace: $NAMESPACE" | ||||||||||||||||||||||||||
| echo "Bucket: $BUCKET_NAME" | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| if [[ "$SKIP_SETUP" == "false" ]]; then | ||||||||||||||||||||||||||
| # Create GCS bucket | ||||||||||||||||||||||||||
| echo -e "\n1. Creating GCS bucket..." | ||||||||||||||||||||||||||
| gsutil mb -p $PROJECT_ID -l us-central1 gs://$BUCKET_NAME || echo "Bucket may already exist" | ||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The command
Suggested change
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # Create namespace | ||||||||||||||||||||||||||
| echo -e "\n2. Creating Kubernetes namespace..." | ||||||||||||||||||||||||||
| kubectl create namespace $NAMESPACE --dry-run=client -o yaml | kubectl apply -f - | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # Create Kubernetes Service Account | ||||||||||||||||||||||||||
| echo -e "\n3. Creating Kubernetes Service Account..." | ||||||||||||||||||||||||||
| cat <<EOF | kubectl apply -f - | ||||||||||||||||||||||||||
| apiVersion: v1 | ||||||||||||||||||||||||||
| kind: ServiceAccount | ||||||||||||||||||||||||||
| metadata: | ||||||||||||||||||||||||||
| name: $KSA_NAME | ||||||||||||||||||||||||||
| namespace: $NAMESPACE | ||||||||||||||||||||||||||
| EOF | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # Grant direct bucket access via Workload Identity principal | ||||||||||||||||||||||||||
| echo -e "\n4. Granting bucket access to Kubernetes service account..." | ||||||||||||||||||||||||||
| PRINCIPAL="principal://iam.googleapis.com/projects/${PROJECT_NUMBER}/locations/global/workloadIdentityPools/${PROJECT_ID}.svc.id.goog/subject/ns/${NAMESPACE}/sa/${KSA_NAME}" | ||||||||||||||||||||||||||
| echo " Principal: $PRINCIPAL" | ||||||||||||||||||||||||||
| gcloud storage buckets add-iam-policy-binding gs://$BUCKET_NAME \ | ||||||||||||||||||||||||||
| --member="$PRINCIPAL" \ | ||||||||||||||||||||||||||
| --role="roles/storage.objectAdmin" | ||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||
| echo -e "\n⏭️ Skipping setup (--skip-setup flag detected)" | ||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # Create test pod | ||||||||||||||||||||||||||
| echo -e "\n5. Creating test pod..." | ||||||||||||||||||||||||||
| cat <<EOF | kubectl apply -f - | ||||||||||||||||||||||||||
| apiVersion: v1 | ||||||||||||||||||||||||||
| kind: Pod | ||||||||||||||||||||||||||
| metadata: | ||||||||||||||||||||||||||
| name: gcs-csi-test-pod | ||||||||||||||||||||||||||
| namespace: $NAMESPACE | ||||||||||||||||||||||||||
| annotations: | ||||||||||||||||||||||||||
| gke-gcsfuse/volumes: "true" | ||||||||||||||||||||||||||
| spec: | ||||||||||||||||||||||||||
| containers: | ||||||||||||||||||||||||||
| - name: test-container | ||||||||||||||||||||||||||
| image: busybox | ||||||||||||||||||||||||||
| command: | ||||||||||||||||||||||||||
| - "/bin/sh" | ||||||||||||||||||||||||||
| - "-c" | ||||||||||||||||||||||||||
| - | | ||||||||||||||||||||||||||
| echo "=== Testing GCS FUSE CSI Driver with Custom Build ===" | ||||||||||||||||||||||||||
| echo "Bucket: $BUCKET_NAME" | ||||||||||||||||||||||||||
| echo "Time: \$(date)" | ||||||||||||||||||||||||||
| echo "" | ||||||||||||||||||||||||||
| echo "Listing /data contents:" | ||||||||||||||||||||||||||
| ls -la /data/ | ||||||||||||||||||||||||||
| echo "" | ||||||||||||||||||||||||||
| echo "Reading back the file:" | ||||||||||||||||||||||||||
| cat /data/1m/test.0.0 > /dev/null | ||||||||||||||||||||||||||
| echo "" | ||||||||||||||||||||||||||
| echo "✓ Test successful! Pod will sleep now..." | ||||||||||||||||||||||||||
| sleep 3600 | ||||||||||||||||||||||||||
| volumeMounts: | ||||||||||||||||||||||||||
| - name: gcs-volume | ||||||||||||||||||||||||||
| mountPath: /data | ||||||||||||||||||||||||||
| resources: | ||||||||||||||||||||||||||
| limits: | ||||||||||||||||||||||||||
| cpu: 100m | ||||||||||||||||||||||||||
| memory: 128Mi | ||||||||||||||||||||||||||
| requests: | ||||||||||||||||||||||||||
| cpu: 50m | ||||||||||||||||||||||||||
| memory: 64Mi | ||||||||||||||||||||||||||
| serviceAccountName: $KSA_NAME | ||||||||||||||||||||||||||
| tolerations: | ||||||||||||||||||||||||||
| - key: sandbox.gke.io/runtime | ||||||||||||||||||||||||||
| operator: Equal | ||||||||||||||||||||||||||
| value: gvisor | ||||||||||||||||||||||||||
| effect: NoSchedule | ||||||||||||||||||||||||||
| volumes: | ||||||||||||||||||||||||||
| - name: gcs-volume | ||||||||||||||||||||||||||
| csi: | ||||||||||||||||||||||||||
| driver: gcsfuse.csi.storage.gke.io | ||||||||||||||||||||||||||
| volumeAttributes: | ||||||||||||||||||||||||||
| bucketName: $BUCKET_NAME | ||||||||||||||||||||||||||
| EOF | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| echo -e "\n=== Setup Complete! ===" | ||||||||||||||||||||||||||
| echo "" | ||||||||||||||||||||||||||
| echo "Monitor pod creation:" | ||||||||||||||||||||||||||
| echo " kubectl get pods -n $NAMESPACE -w" | ||||||||||||||||||||||||||
| echo "" | ||||||||||||||||||||||||||
| echo "View pod logs:" | ||||||||||||||||||||||||||
| echo " kubectl logs -n $NAMESPACE gcs-csi-test-pod -f" | ||||||||||||||||||||||||||
| echo "" | ||||||||||||||||||||||||||
| echo "View sidecar logs (to see CUSTOM BUILD message):" | ||||||||||||||||||||||||||
| echo " kubectl logs -n $NAMESPACE gcs-csi-test-pod -c gke-gcsfuse-sidecar" | ||||||||||||||||||||||||||
| echo "" | ||||||||||||||||||||||||||
| echo "Check CSI driver logs:" | ||||||||||||||||||||||||||
| echo " kubectl logs -n gcs-fuse-csi-driver daemonset/gcsfusecsi-node -c gcs-fuse-csi-driver | grep -i 'CUSTOM BUILD\\|$NAMESPACE\\|$BUCKET_NAME'" | ||||||||||||||||||||||||||
| echo "" | ||||||||||||||||||||||||||
| echo "Cleanup when done:" | ||||||||||||||||||||||||||
| echo " kubectl delete namespace $NAMESPACE" | ||||||||||||||||||||||||||
| echo " gsutil rm -r gs://$BUCKET_NAME" | ||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,70 @@ | ||||||||||||||||||||
| #!/bin/bash | ||||||||||||||||||||
| # Shortcuts for viewing GCS FUSE CSI Driver logs | ||||||||||||||||||||
| # Usage: source shortcuts.sh or add to ~/.bashrc | ||||||||||||||||||||
|
|
||||||||||||||||||||
| # Set default namespace | ||||||||||||||||||||
| alias csi='kubectl config set-context --current --namespace=gcs-fuse-csi-driver' | ||||||||||||||||||||
| alias test='kubectl config set-context --current --namespace=gcs-csi-test' | ||||||||||||||||||||
|
|
||||||||||||||||||||
| # Get current namespace | ||||||||||||||||||||
| alias ns='kubectl config view --minify --output "jsonpath={..namespace}" && echo' | ||||||||||||||||||||
|
|
||||||||||||||||||||
| # Pod listings | ||||||||||||||||||||
| alias pods='kubectl get pods' | ||||||||||||||||||||
| alias podw='kubectl get pods -w' | ||||||||||||||||||||
|
|
||||||||||||||||||||
| # CSI Driver logs | ||||||||||||||||||||
| alias csi-logs='kubectl logs daemonset/gcsfusecsi-node -c gcs-fuse-csi-driver --tail=100' | ||||||||||||||||||||
| alias csi-logs-f='kubectl logs daemonset/gcsfusecsi-node -c gcs-fuse-csi-driver -f' | ||||||||||||||||||||
| alias csi-custom='kubectl logs daemonset/gcsfusecsi-node -c gcs-fuse-csi-driver --tail=200 | grep "CUSTOM BUILD"' | ||||||||||||||||||||
|
|
||||||||||||||||||||
| # Webhook logs | ||||||||||||||||||||
| alias webhook-logs='kubectl logs deployment/gcs-fuse-csi-driver-webhook --tail=100' | ||||||||||||||||||||
| alias webhook-logs-f='kubectl logs deployment/gcs-fuse-csi-driver-webhook -f' | ||||||||||||||||||||
| alias webhook-custom='kubectl logs deployment/gcs-fuse-csi-driver-webhook --tail=200 | grep "CUSTOM BUILD"' | ||||||||||||||||||||
|
|
||||||||||||||||||||
| # Sidecar logs (assumes pod name gcs-csi-test-pod) | ||||||||||||||||||||
| alias sidecar-logs='kubectl logs gcs-csi-test-pod -c gke-gcsfuse-sidecar --tail=100' | ||||||||||||||||||||
| alias sidecar-logs-f='kubectl logs gcs-csi-test-pod -c gke-gcsfuse-sidecar -f' | ||||||||||||||||||||
| alias sidecar-custom='kubectl logs gcs-csi-test-pod -c gke-gcsfuse-sidecar --tail=200 | grep "CUSTOM BUILD"' | ||||||||||||||||||||
|
|
||||||||||||||||||||
| # Test pod logs | ||||||||||||||||||||
| alias test-logs='kubectl logs gcs-csi-test-pod -c test-container' | ||||||||||||||||||||
| alias test-logs-f='kubectl logs gcs-csi-test-pod -c test-container -f' | ||||||||||||||||||||
|
|
||||||||||||||||||||
| # Describe resources | ||||||||||||||||||||
| alias desc-pod='kubectl describe pod' | ||||||||||||||||||||
| alias desc-webhook='kubectl describe deployment gcs-fuse-csi-driver-webhook' | ||||||||||||||||||||
| alias desc-csi='kubectl describe daemonset gcsfusecsi-node' | ||||||||||||||||||||
|
|
||||||||||||||||||||
| # Check all custom builds | ||||||||||||||||||||
| alias check-custom='echo "=== CSI Driver ===" && kubectl logs daemonset/gcsfusecsi-node -c gcs-fuse-csi-driver -n gcs-fuse-csi-driver --tail=100 | grep "CUSTOM BUILD" | head -2 && echo -e "\n=== Webhook ===" && kubectl logs deployment/gcs-fuse-csi-driver-webhook -n gcs-fuse-csi-driver --tail=100 | grep "CUSTOM BUILD" | head -2 && echo -e "\n=== Sidecar ===" && kubectl logs gcs-csi-test-pod -c gke-gcsfuse-sidecar -n gcs-csi-test --tail=100 2>/dev/null | grep "CUSTOM BUILD" | head -2 || echo "No sidecar pod found"' | ||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The
Suggested change
|
||||||||||||||||||||
|
|
||||||||||||||||||||
| # Quick commands | ||||||||||||||||||||
| alias rebuild='cd /home/princer_google_com/dev/gcs-fuse-csi-driver && export PROJECT_ID=gcs-tess REGISTRY=gcr.io/gcs-tess/princer STAGINGVERSION=v999.999.999 BUILD_GCSFUSE_FROM_SOURCE=true && make build-image-and-push-multi-arch REGISTRY=$REGISTRY STAGINGVERSION=$STAGINGVERSION' | ||||||||||||||||||||
| alias reinstall='cd /home/princer_google_com/dev/gcs-fuse-csi-driver && export REGISTRY=gcr.io/gcs-tess/princer STAGINGVERSION=v999.999.999 && make uninstall && make install' | ||||||||||||||||||||
| alias update-csi='cd /home/princer_google_com/dev/gcs-fuse-csi-driver && export REGISTRY=gcr.io/gcs-tess/princer STAGINGVERSION=v999.999.999 && kubectl set image daemonset/gcsfusecsi-node gcs-fuse-csi-driver=$REGISTRY/gcs-fuse-csi-driver:$STAGINGVERSION -n gcs-fuse-csi-driver && kubectl set image deployment/gcs-fuse-csi-driver-webhook gcs-fuse-csi-driver-webhook=$REGISTRY/gcs-fuse-csi-driver-webhook:$STAGINGVERSION -n gcs-fuse-csi-driver' | ||||||||||||||||||||
| alias recreate-pod='cd /home/princer_google_com/dev/gcs-fuse-csi-driver && ./setup-test-pod.sh --skip-setup' | ||||||||||||||||||||
|
Comment on lines
+44
to
+47
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The aliases
Suggested change
|
||||||||||||||||||||
|
|
||||||||||||||||||||
| echo "✅ GCS FUSE CSI shortcuts loaded!" | ||||||||||||||||||||
| echo "" | ||||||||||||||||||||
| echo "Namespace shortcuts:" | ||||||||||||||||||||
| echo " csi - Switch to gcs-fuse-csi-driver namespace" | ||||||||||||||||||||
| echo " test - Switch to gcs-csi-test namespace" | ||||||||||||||||||||
| echo " ns - Show current namespace" | ||||||||||||||||||||
| echo "" | ||||||||||||||||||||
| echo "Log shortcuts:" | ||||||||||||||||||||
| echo " csi-logs, csi-logs-f, csi-custom" | ||||||||||||||||||||
| echo " webhook-logs, webhook-logs-f, webhook-custom" | ||||||||||||||||||||
| echo " sidecar-logs, sidecar-logs-f, sidecar-custom" | ||||||||||||||||||||
| echo " test-logs, test-logs-f" | ||||||||||||||||||||
| echo " check-custom - Check all components for custom build" | ||||||||||||||||||||
| echo "" | ||||||||||||||||||||
| echo "Quick commands:" | ||||||||||||||||||||
| echo " rebuild - Rebuild and push all images" | ||||||||||||||||||||
| echo " reinstall - Uninstall and reinstall CSI driver" | ||||||||||||||||||||
| echo " update-csi - Update existing deployment with new images" | ||||||||||||||||||||
| echo " recreate-pod - Recreate test pod" | ||||||||||||||||||||
| echo "" | ||||||||||||||||||||
| echo "Other:" | ||||||||||||||||||||
| echo " pods, podw, desc-pod, desc-webhook, desc-csi" | ||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| apiVersion: v1 | ||
| kind: Namespace | ||
| metadata: | ||
| name: gcs-csi-test | ||
| --- | ||
| apiVersion: v1 | ||
| kind: ServiceAccount | ||
| metadata: | ||
| name: gcs-csi-test-sa | ||
| namespace: gcs-csi-test | ||
| annotations: | ||
| iam.gke.io/gcp-service-account: <YOUR_GCP_SERVICE_ACCOUNT>@gcs-tess.iam.gserviceaccount.com | ||
| --- | ||
| apiVersion: v1 | ||
| kind: Pod | ||
| metadata: | ||
| name: gcs-csi-test-pod | ||
| namespace: gcs-csi-test | ||
| annotations: | ||
| gke-gcsfuse/volumes: "true" | ||
| spec: | ||
| containers: | ||
| - name: test-container | ||
| image: busybox | ||
| command: | ||
| - "/bin/sh" | ||
| - "-c" | ||
| - | | ||
| echo "Testing GCS FUSE CSI Driver with custom build" | ||
| echo "Writing to /data/test-file.txt" | ||
| echo "Hello from custom CSI driver build at $(date)" > /data/test-file.txt | ||
| echo "Contents of /data:" | ||
| ls -la /data/ | ||
| echo "Reading back the file:" | ||
| cat /data/test-file.txt | ||
| echo "Sleeping to keep pod running..." | ||
| sleep 3600 | ||
| volumeMounts: | ||
| - name: gcs-volume | ||
| mountPath: /data | ||
| resources: | ||
| limits: | ||
| cpu: 100m | ||
| memory: 128Mi | ||
| requests: | ||
| cpu: 50m | ||
| memory: 64Mi | ||
| serviceAccountName: gcs-csi-test-sa | ||
| volumes: | ||
| - name: gcs-volume | ||
| csi: | ||
| driver: gcsfuse.csi.storage.gke.io | ||
| volumeAttributes: | ||
| bucketName: gcs-fuse-warp-test-bucket |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This appears to be a temporary logging statement for debugging or testing purposes. Such logs should be removed before merging to avoid cluttering production logs.