Skip to content

Add --namespace flag support to workloads - #1196

Open
ankitkinra wants to merge 1 commit into
AI-Hypercomputer:mainfrom
ankitkinra:namespace-support
Open

Add --namespace flag support to workloads#1196
ankitkinra wants to merge 1 commit into
AI-Hypercomputer:mainfrom
ankitkinra:namespace-support

Conversation

@ankitkinra

Copy link
Copy Markdown
Contributor

Allows specifying a target Kubernetes namespace for workload commands (create, list, delete, wait). This avoids hardcoding the 'default' namespace and enables running workloads in custom namespaces. Also updates setup_k8s_service_accounts to create service accounts and role bindings in the specified namespace.

@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

Comment thread recipes/Cluster_delete.md Outdated
[XPK] Get the name of the workloads in the cluster.
[XPK] Task: `List Jobs with filter-by-status=EVERYTHING` is implemented by the following command not running since it is a dry run.
kubectl get workloads --ignore-not-found -o=json
kubectl get workloads -n --ignore-not-found -o=json

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This command change is incorrectly rendered for all golden use cases. You would need to adjust the way you're filtering empty args.namespace.

Comment thread recipes/Workload_create_sub-slicing.md Outdated
gcloud container clusters list --project=golden-project --filter=name=golden-cluster --format="value(location)"
[XPK] Follow your workload here: https://console.cloud.google.com/kubernetes/service/us-central1/golden-cluster/default/golden-workload/details?project=golden-project
[XPK] Follow your worker 0, slice 0 logs here: Adjust the pod name ([prefix]-slice-job-[slice_number]-[worker_number]) after clicking the url if you want other worker logs. https://console.cloud.google.com/logs/query;query=resource.type%3D%22k8s_container%22%0Aresource.labels.project_id%3D%22golden-project%22%0Aresource.labels.location%3D%22us-central1%22%0Aresource.labels.cluster_name%3D%22golden-cluster%22%0Aresource.labels.namespace_name%3D%22default%22%0Aresource.labels.pod_name%3A%22golden-workload-slice-job-0-0-%22%0Aseverity%3E%3DDEFAULT;storageScope=project;duration=P1D?project=golden-project
[XPK] Follow your worker 0, slice 0 logs here: Adjust the pod name ([prefix]-slice-job-[slice_number]-[worker_number]) after clicking the url if you want other worker logs. https://console.cloud.google.com/logs/query;query=resource.type%3D%22k8s_container%22%0Aresource.labels.project_id%3D%22golden-project%22%0Aresource.labels.location%3D%22us-central1%22%0Aresource.labels.cluster_name%3D%22golden-cluster%22%0Aresource.labels.pod_name%3A%22golden-workload-slice-job-0-0-%22%0Aseverity%3E%3DDEFAULT;storageScope=project;duration=P1D?project=golden-project

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why have you removed namespace parameter from this url?

Allows specifying a target Kubernetes namespace for workload commands (create, list, delete, wait).
This avoids hardcoding the 'default' namespace and enables running workloads in custom namespaces.

Also updates setup_k8s_service_accounts to create service accounts and role bindings in the specified namespace.
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.

2 participants