What happened?
Since v2.3.0, crossplane render uses crossplane's engine to render the compositions. By default this is done by starting up crossplane as its own container in a temporary network, and overwriting the docker-network annotation on all functions to join it.
This new default behavior has two problems we have encountered:
-
This doesnt support starting/stopping functions yourself so that you can run multiple renders without starting/stopping the functions on each run.
Since the temporary crossplane-render network and crossplane-container is created on each render-run you'd need to connect the containers to this new network, for every render.
-
Running crossplane render in a devcontainer / docker-in-docker / podman-in-podman
If you run crossplane-render inside a container, you need to ensure that containers started by crossplane-render run in the same network as the container you are in (or in a connected network).
Previously you could control this with the docker-network annotation, either with -a or as annotation in the functions-file, but since the crossplane-container always starts up in a temporary network, there's no connectivity to the crossplane-container. If function-containers already run, i'm unsure if the annotation overwriting has any effect.
Circumventing this would require a bit of hacking.
How can we reproduce it?
Run crossplane-render in ci (DinD) or devcontainer.
What environment did it happen in?
- Crossplane CLI version: v2.3.1
- Platform (e.g., linux/amd64): linux/amd64
What happened?
Since v2.3.0, crossplane render uses crossplane's engine to render the compositions. By default this is done by starting up crossplane as its own container in a temporary network, and overwriting the docker-network annotation on all functions to join it.
This new default behavior has two problems we have encountered:
This doesnt support starting/stopping functions yourself so that you can run multiple renders without starting/stopping the functions on each run.
Since the temporary crossplane-render network and crossplane-container is created on each render-run you'd need to connect the containers to this new network, for every render.
Running crossplane render in a devcontainer / docker-in-docker / podman-in-podman
If you run crossplane-render inside a container, you need to ensure that containers started by crossplane-render run in the same network as the container you are in (or in a connected network).
Previously you could control this with the docker-network annotation, either with -a or as annotation in the functions-file, but since the crossplane-container always starts up in a temporary network, there's no connectivity to the crossplane-container. If function-containers already run, i'm unsure if the annotation overwriting has any effect.
Circumventing this would require a bit of hacking.
How can we reproduce it?
Run crossplane-render in ci (DinD) or devcontainer.
What environment did it happen in?