Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

render: label the Docker containers and networks render creates

Abierto
#401 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

@jcogilvie ya está trabajando en esto.

Desde el 1/10/2026.

  • #407 de @jcogilvie — abierto

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
docker, go
Área
cli, devops

Línea de trabajo

Start by tracing RuntimeDocker.createContainer, the Docker engine's render container creation, and createRenderNetwork. Read the existing cleanup-policy handling and follow how render sessions and networks are created and removed; done means every render-owned container and network carries consistent identifying labels without changing existing cleanup behavior.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement
What problem are you facing?

There's no reliable way to tell which Docker containers and networks were created by crossplane render, so
anything it leaves behind can't be found and cleaned up afterwards.

Today the containers render creates carry only the image's own io.crossplane.xpkg:* label, unnamed
Function containers get random Docker names (suspicious_newton, distracted_mestorf, …), and the
crossplane internal render engine container and the crossplane-render-* network carry no labels at all.
Matching by image or name prefix is guesswork, and can catch containers the user started on purpose.

This matters because leftovers happen:

  • Some interruptions can never be cleaned up in-process: kill -9, a crash, an OOM kill, a CI job timeout.
    Even with signal handling (#400), these leave resources behind.
  • Containers deliberately kept with runtime-docker-cleanup: Orphan or runtime-docker-name (for warm
    reuse across invocations) build up over time and can't be told apart from accidental leaks.
  • Tools built on the render library — for example
    crossplane-diff, which renders many times per run —
    have the same problem and currently have to track container names themselves.
How could Crossplane help solve your problem?

Add labels to every container and network render creates (in RuntimeDocker.createContainer, the docker
engine's render container, and createRenderNetwork). For example:

Label Value Purpose
render.crossplane.io/managed-by crossplane Identifies render-owned resources
render.crossplane.io/session per-invocation ID Scopes cleanup to one run
render.crossplane.io/cleanup the effective cleanup policy (Remove, Stop, Orphan) Lets a sweep skip containers the user deliberately kept
render.crossplane.io/created-by-pid (optional) PID Helps detect leftovers from dead sessions

That enables:

  • A plain docker ps -a --filter label=render.crossplane.io/managed-by=crossplane for users.
  • Optionally, a small subcommand (e.g. crossplane render cleanup [--all]) that removes leftovers from dead
    sessions, skipping containers kept with Orphan/runtime-docker-name unless --all is given.
  • Safer network cleanup: before removing a network, render could force-remove containers from its own
    session that are still attached, without touching unrelated containers on a user-supplied
    --crossplane-docker-network (see #398).
  • Library consumers could clean up by label and session ID instead of tracking container names themselves.

Adding labels is purely additive and doesn't change behaviour for existing users.

Lenguaje dominante
Go
Estrellas
20
Forks
33
Merge medio
3 d 10 h
PR fusionados (30 d)
24

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de crossplane/cli

Todos los issues de crossplane/cli

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.