Skip to content

Draft KubernetesProvider implementing the ContainerProvider contract #1153

Closed

Description

@rohitrsh

OpenReconcile has a small draft KubernetesProvider that implements the documented ContainerProvider surface:

  • start_container(image) -> base_url
  • wait_for_ready(base_url, timeout_s)
  • stop_container()

Docs still list Kubernetes as planned / a non-instantiable placeholder. We are not proposing Pool/BatchSandbox CRs (OpenSandbox already occupies that). One provider instance starts one Pod + Service, matching how LocalDockerProvider treats one container.

Sketch (not a pin of your internals): https://github.com/openreconcile/community — we can send a PR against src/openenv/core if this shape is still wanted.

Related: #441 (JetBrains orchestrator discussion). Happy to stay out-of-tree if you already have a design.

No affiliation claimed.

Activity

  1. k21993 commented on Sep 18, 2026

    @k21993
    Contributor

    @rohitrsh are you still planning to open the PR for this? I am interested in the same area, so I would rather ask than duplicate your work. Happy to review yours if it is coming, or to pick it up if you would rather not carry it.

    A few design points look worth settling before anyone writes code, since they change the shape of the provider:

    • Connectivity. In-cluster Service DNS when the trainer runs in the same cluster, port-forward to loopback for a laptop, or Ingress. ModalProvider and ACASandboxProvider both enforce https/wss on the returned base_url, and there is no in-cluster exemption today, so plain http between pods needs an explicit decision rather than a silent bypass.
    • One Pod plus a Service per provider instance, matching how LocalDockerProvider owns one container, or a Deployment.
    • Which knobs belong on the constructor: namespace, resource requests and limits, runtimeClassName for gVisor, imagePullSecrets, and labels that make leaked pods collectable.
    • The kubernetes client as an optional extra alongside modal, aca and daytona, or shelling out to kubectl the way LocalDockerProvider shells out to docker.

    @burtenshaw is a Kubernetes provider still wanted in core? KubernetesProvider is a placeholder in providers.py that cannot be instantiated, while src/openenv/core/README.md and the getting started guide both describe it as planned, so it would help to know whether the intent still stands before someone builds it.

  2. burtenshaw commented on Sep 18, 2026

    @burtenshaw
    Collaborator

    Thanks for taking this on @k21993 !

    @burtenshaw is a Kubernetes provider still wanted in core?

    Yes. Just a matter of resources. We're not using K8S for training, so we haven't prioritized it.

    Connectivity

    bypass for incluster http is ok

    One Pod plus a Service per provider instance

    this

    Which knobs belong on the constructor: namespace, resource requests and limits, runtimeClassName for gVisor, imagePullSecrets, and labels that make leaked pods collectable.

    start off with only the functional set, and go from there. it's ok to go heavy on kwargs.

    The kubernetes client as an optional extra alongside modal, aca and daytona

    yes. optional.

  3. rohitrsh commented on Sep 21, 2026

    @rohitrsh
    ContributorAuthor

    Yes, still opening the PR , thanks @k21993 for checking, and @burtenshaw for the decisions.

    Building exactly to what you specified: one Pod + Service per provider instance, in-cluster HTTP, optional openenv[kubernetes], functional constructor with kwargs for the rest.

    Anything not specified I'll take from existing providers rather than invent LocalDockerProvider for /health readiness and cleanup, ModalProvider for the lazy SDK import and mocked tests.

    Will draft against src/openenv/core this week or early next week, linked here and to #441. @k21993 happy to have you review.

  4. k21993 commented on Sep 22, 2026

    @k21993
    Contributor

    Thanks for confirming. That scope matches the decisions above. Happy to review the draft; please tag me when it is ready. I will pay particular attention to failure cleanup, idempotent shutdown, Kubernetes naming and ownership labels, readiness timeouts, and the in-cluster URL and security behavior.

  5. rohitrsh commented on Sep 26, 2026

    @rohitrsh
    ContributorAuthor

    Hey @k21993, Draft is up: #1254 please review when you have a chance. It follows the decisions above.

  6. burtenshaw commented on Oct 26, 2026

    @burtenshaw
    Collaborator

    For #1254, which Kubernetes version and live Pod/Service lifecycle smoke test should gate acceptance?

  7. rohitrsh commented on Oct 26, 2026

    @rohitrsh
    ContributorAuthor

    Hey @burtenshaw , The gate is the Kind smoke already run on dacf113: kubernetes client >=29 (35.0.0 on that run), one Pod and one Service, in-cluster /health, then stop until both are gone. No pinned cluster version.

  8. burtenshaw commented on Oct 27, 2026

    @burtenshaw
    Collaborator

    Ok. I think we can close this issue. Feel free to add more examples in a follow up PR?

  9. rohitrsh commented on Oct 28, 2026

    @rohitrsh
    ContributorAuthor

    Hey @burtenshaw, I'll add one Kubernetes example in a follow-up PR and link it from the docs.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions