Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ship self-contained binary #1764

Open
AndreasBergmeier6176 opened this issue Jan 18, 2024 · 7 comments
Open

Ship self-contained binary #1764

AndreasBergmeier6176 opened this issue Jan 18, 2024 · 7 comments
Labels
effort/large 1+ weeks feature-request New/Enhanced functionality wanted priority/p2 Dependent on community feedback. PR's are welcome :)

Comments

@AndreasBergmeier6176
Copy link

Description of the feature or enhancement:

Setting up Node with all the necessities and keeping it running is quite some complexity for non-Javascript developers.
There should be a self-contained distribution of cdk8s which minimizes this complexity.

Use Case:

We are currently searching for replacements for Helm. cdk seems very near to how we would like to render Manifests from Python. We are however not willing to introduce the mental load of Node into our Development process. Thus we are currently passing on using cdk8s.

Proposed Solution:

From a containment perspective I wonder whether Rust + Deno would be a good way to go.
A less intrusive way could be shipping via Node - https://nodejs.org/api/single-executable-applications.html - but not sure whether this would work here.
Alternatively it might work to package using AppImage?


This is a 🚀 Feature Request

@AndreasBergmeier6176 AndreasBergmeier6176 added feature-request New/Enhanced functionality wanted needs-triage Priority and effort undetermined yet labels Jan 18, 2024
@shinebayar-g
Copy link

how we would like to render Manifests from Python.

Wdym? Using Python doesn't require Node.

@AndreasBergmeier6176
Copy link
Author

Sorry, we were initially under the impression that cdk8s could be used to render manifests to filesystem. Seems like this is not possible.
The general problem still persists, though - you need a correct Node environment to be able to run cdk8s.
Thus shipping a self-contained binary would eliminate the need to setup and maintain local dependencies.

@shinebayar-g
Copy link

shinebayar-g commented Jan 30, 2024

you need a correct Node environment to be able to run cdk8s.

Ah this might be true. IIRC https://github.com/cdk8s-team/cdk8s-cli doesn't even run on Deno. Only worked on NodeJS.
CLI could be self portable for sure.

@iliapolo
Copy link
Member

iliapolo commented Jun 2, 2024

Semi related: #2149.

The thing is that its not sufficient for the cli to be self-container because the framework itself also requires node via jsii. One way to do this is by having a docker image for cdk8s, and a docker image for node, and then aliasing cdk8s and node to docker run ....

Keeping up to date is now a matter of docker pull, instead of node management - but is that really that much easier? In any case, keeping this open to see how folks respond.

@iliapolo iliapolo added effort/large 1+ weeks priority/p2 Dependent on community feedback. PR's are welcome :) and removed needs-triage Priority and effort undetermined yet labels Jun 2, 2024
@QuadmanSWE
Copy link

Came across this while looking for a way to run cdk8s in a container so that it could be used as a plugin for argocd. Does nothing like this exist? What is the slimest possible image one could make that could render yaml from cdk8s code for one of the supported languages?

@shinebayar-g
Copy link

I guess something like

FROM node:alpine
RUN npm i -g cdk8s-cli

is a minimum starting point.

@QuadmanSWE
Copy link

Thanks. Got it to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/large 1+ weeks feature-request New/Enhanced functionality wanted priority/p2 Dependent on community feedback. PR's are welcome :)
Projects
None yet
Development

No branches or pull requests

4 participants