Skip to content

docs: add GCE and GKE documentation for running NPI benchmarks#126

Draft
kislaykishore wants to merge 16 commits into
mainfrom
npi-instructions
Draft

docs: add GCE and GKE documentation for running NPI benchmarks#126
kislaykishore wants to merge 16 commits into
mainfrom
npi-instructions

Conversation

@kislaykishore

Copy link
Copy Markdown
Collaborator

No description provided.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces documentation for running Network Performance Improvement (NPI) benchmarks on GCE and GKE. The guides cover building Docker images, setting up prerequisites, and executing benchmarks via a Python script on GCE or Kubernetes Pods on GKE. Feedback was provided to enhance the security of the GKE instructions by recommending the principle of least privilege for IAM roles and removing unnecessary privileged execution modes in the Pod configurations.

Comment thread npi/gke_npi.md Outdated
# Grant Storage Object Admin (or a more restricted role) on your bucket
gcloud storage buckets add-iam-policy-binding gs://YOUR_BUCKET_NAME \
--member "serviceAccount:benchmark-gsa@YOUR_PROJECT_ID.iam.gserviceaccount.com" \
--role "roles/storage.objectAdmin"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-medium medium

The roles/storage.objectAdmin role is overly permissive as it allows management of the bucket itself (e.g., deleting the bucket or changing its IAM policy). For benchmarking, roles/storage.objectUser is a more secure alternative that provides full access to objects (read, write, delete) without bucket-level administrative permissions, adhering to the principle of least privilege.

Suggested change
--role "roles/storage.objectAdmin"
--role "roles/storage.objectUser"

Comment thread npi/gke_npi.md Outdated
Comment on lines +106 to +108
securityContext:
privileged: true
volumeMounts:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-medium medium

The privileged: true setting is likely unnecessary and poses a security risk. Since the GKE GCS Fuse CSI driver handles the mounting process and the benchmark container simply accesses the data through a pre-mounted volume (--mount-path=/data), the container does not need elevated privileges. Removing this allows the Pod to run under more restrictive security policies (e.g., the GKE baseline or restricted Pod Security Standards).

Suggested change
securityContext:
privileged: true
volumeMounts:
volumeMounts:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant