cdk8s-team / cdk8s

Define Kubernetes native apps and abstractions using object-oriented programming
https://cdk8s.io
Apache License 2.0
4.3k stars 291 forks source link

Container image containing CLI for each language #2149

Open MalteMagnussen opened 11 months ago

MalteMagnussen commented 11 months ago

Description of the feature or enhancement:

I'd like the cdk8s-team to provide offical images for the cli, for each language ( python, go, typescript, etc, )

I'd like to be able to easily find that image via Google on something like Docker Hub.

Use Case:

I'd like to make a pipeline where I run something like this:

cdk8s import go-app
cdk8s import <insert various crds>
go run *.go  # Synthesize app
kubectl apply dist/

This requires the tools (Go and cdk8s) to be present in the CI environment.

In most CI providers, you can run inside of an image.

So to avoid everyone using cdk8s in automation to have to build their own image, you could provide an official one, and save us a lot of time :)


This is a :rocket: Feature Request

MalteMagnussen commented 11 months ago

Did something like this for cdk8s with Golang

FROM node
RUN npm install -g cdk8s-cli
COPY --from=go /usr/local/go/ /usr/local/go/
ENV PATH="/usr/local/go/bin:${PATH}"
WORKDIR /root
ENTRYPOINT [ "cdk8s" ]

Then I can build it like docker build . --tag cdk8s

And synth my stuff like docker run -v .:/root cdk8s synth

Then people don't need to install a lot of things locally to try out my cdk8s project :) They just need Docker.