Skip to content

support custom registry image with create cluster #229

Open

Description

@landism

The --registry arg to ctlptl create cluster will ensure that ctlptl creates a registry for the cluster it creates.
ctlptl create registry has support for specifying a custom image. If a user creates a registry using that, and then tries to create a cluster using that registry, ctlptl will delete and recreate the registry with the default image (the test, desired.Image (hardcoded to empty string)).

I tried a bit to work around this by first creating the cluster, then deleting the registry, recreating it with a custom image name, and adding it to the docker network, but didn't manage to get it to work. Even if I could get it to work, that rather defeats the point of using ctlptl in the first place.

The two (compatible) main options I see are:

  • add a --registry-image arg to ctlptl create cluster. This would presumably best solve the common case.
  • add some way to tell ctlptl create cluster to skip registry creation and just connect to an existing registry. This would presumably leave a better escape hatch for any similar problem (for example).

Activity

  1. landism commented on Jun 6, 2022

    @landism
    MemberAuthor

    For Chesterton's Fence purposes, Milas confirmed that this was simply an unconsidered use case.

  2. glennpratt commented on Jun 23, 2025

    @glennpratt

    I believe this is the same issue, but also defining these in a file causes the same issue. For me, that means the second approach would be the correct one.

    This registry container will not have my environment variables. If I remove the registry: ctlptl-registry line, it will, but then it doesn't appear images from that registry work within the kind cluster.

    apiVersion: ctlptl.dev/v1alpha1
    kind: Registry
    name: ctlptl-registry
    port: 5005
    image: docker.io/library/registry:3
    env:
      - OTEL_TRACES_EXPORTER=none
      - REGISTRY_STORAGE={}
      - REGISTRY_STORAGE_S3_REGION=us-lax-1
      - REGISTRY_STORAGE_S3_SECURE=true
      # other items redacted
    ---
    apiVersion: ctlptl.dev/v1alpha1
    kind: Cluster
    product: kind
    registry: ctlptl-registry
    kindV1Alpha4Cluster:
      name: tilt
      nodes:
        - role: control-plane
          image: kindest/node:v1.31.0
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