Dev controller and translator

From GoogleCloudPlatform/k8s-bridge · View interactive version

Dev controller and translator is an AI agent skill from the GitHub repository GoogleCloudPlatform/k8s-bridge. Implements or modifies Go operator reconciliation loops in internal/controller/, Slurm REST polling and event deduplication, JobSet translation, ClientMap and JWT token management, and Prometheus metric instruments. Use when changing how Slurm jobs are polled, translated into JobSets, unheld, preemp

How to use this skill

Skill file

Controller, Poller, and JobSet Translator Workflow (`dev-controller-and-translator`)

1. Preconditions & Inputs

Before editing Go controller, translator, or metrics packages, inspect the target package in cmd/ or internal/:


2. Guardrails


3. Step-by-Step Procedure

Component Selection: Open and modify only the package(s) matching your task:

  1. Slurm REST Client Sync & WorkloadMixing Status (internal/controller/slurmclientsync/, internal/controller/workloadmixing/):
  1. Polling, Admission, Reconciliation & Teardown (internal/controller/slurmjob/):
  1. JobSet Translation (internal/controller/slurmjob/translator.go):
  1. Prometheus Metrics (internal/metrics/metrics.go):

4. Verification

  1. Automated verification (default for agents): Run code generation, formatting, static analysis, and the unit/envtest suite:
make manifests generate fmt vet lint test
  1. Host-to-cluster debug mode (only when requested for live cluster debugging): Port-forward svc/slurm-restapi:6820 and run go run ./cmd/main.go --debug --metrics-bind-address=0 (--debug rewrites slurmrestd URLs in SlurmClientReconciler to http://localhost:6820).

5. Handoffs & Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.