Conversation
This was referenced Mar 19, 2026
Member
Author
43b8290 to
8b0459f
Compare
5a67f57 to
1c8df93
Compare
7cfae36 to
5b80342
Compare
4a8394b to
1964392
Compare
Base automatically changed from
03-18-ian_adding_customizable_idle_on_complete
to
main
March 19, 2026 20:51
1964392 to
cbff910
Compare
…robe, Helm fixes
- Replace 2s poll loop with Kubernetes Watch for Job and Pod status,
with 30s safety-net fallback poll for watch disconnects
- Bound container log reads to 1 MiB (LimitBytes + io.LimitReader)
- Sort env vars for deterministic Pod specs
- Gate Events API calls behind pod failure signals (Pending/Failed only)
- Add exec liveness probe to Helm Deployment (kill -0 1)
- Fix ConfigMap and ServiceAccount template whitespace (use {{- trimming)
- Add watch verb to RBAC for jobs and pods
- Add tests for handleJobState, watch lifecycle, and pod watch events
Co-Authored-By: Oz <oz-agent@warp.dev>
ianhodge
commented
Mar 19, 2026
| # Install ca-certificates for HTTPS connections | ||
| RUN apk --no-cache add ca-certificates | ||
| # Install ca-certificates for HTTPS connections and create a non-root runtime user | ||
| RUN apk --no-cache add ca-certificates \ |
Member
Author
There was a problem hiding this comment.
These changes are needed for the helm chart
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
This PR adds a Kubernetes execution backend to
oz-agent-workerand includes the deployment and hardening work needed to make that backend practical to run in a customer Kubernetes environment.At a high level, the worker can now execute tasks by creating Kubernetes
Jobs instead of running them via Docker or the direct backend. The PR also adds a namespace-scoped Helm chart, updates the docs for customer deployment, and tightens the production path with CI coverage, safer chart defaults, and runtime/container hardening.What changed
Kubernetes backend
internal/worker/kubernetes.gobackend.kubernetes.*ininternal/config/config.goandmain.goJob/ Pod in a target namespacepreflight_imageHelm chart
charts/oz-agent-workerDeploymentServiceAccountRole/RoleBindingConfigMapSecretbackend.kubernetes.service_accountimage.tagso installs pin a worker image rather than defaulting tolatestkubernetesBackend.preflightImageso restricted clusters can override the startup preflight imageCI / packaging / docs
go.modgo test ./....gitignoreso the top-level binary is ignored without accidentally ignoringcharts/oz-agent-worker/**Dockerfileto run the worker as a non-root user on a pinned Alpine base imageREADME.mdwith:Operational notes
JobreplicaCount=1for a givenworker.workerId; scale by creating multiple releases with distinct worker IDs instead of scaling a single release horizontallypreflight_image/kubernetesBackend.preflightImageto an allowlisted imageValidation
gofmt -won modified Go filesgo test ./...go build ./...helm lint charts/oz-agent-worker --set worker.workerId=my-worker --set image.tag=v1.2.3helm template oz-agent-worker charts/oz-agent-worker --namespace agents --set worker.workerId=my-worker --set image.tag=v1.2.3helm lint+helm templateagain with richer override values to exercise optional chart branches including secret creation, annotations, node selectors, tolerations, resources, setup/teardown hooks, environment entries, andkubernetesBackend.preflightImagedocker buildto verify the hardened runtime image still builds successfullyReviewer notes
The highest-risk / highest-value areas to review are:
internal/worker/kubernetes.gofor job lifecycle, startup preflight behavior, and failure detectionmain.go+internal/config/config.gofor config merge / validation behaviorcharts/oz-agent-worker/*for install ergonomics and namespaced deployment assumptionsREADME.mdfor customer-facing deployment guidance and caveatsArtifacts
Co-Authored-By: Oz oz-agent@warp.dev