cdk8s-team / cdk8s

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

cdk8s as a cdktf kubernetes provider #2053

Open benkeil opened 1 month ago

benkeil commented 1 month ago

note from the team: Even though this is a p2, if you are interested in contributing this, please consult with the team beforehand as this is a large endeavour to take on.


Description of the feature or enhancement:

I really love the project, but very often you need data that comes from somewhere else. E.g. I want to use secrets stored in Vault. It's super comfortable in cdktf with all the providers, but a pain in cdk8s. There is the CdktfResolver but it's super slow, is annoying to use (encapsulate everything in a TerraformOutput) and he can't handle sensitive data.

On the other hand, writing custom builders and Constructs in cdktf is a pain, because of the naming of classes. Instead using a generic PodSpec there are many different implementations, e.g. DeploymentV1SpecTemplateSpec. So if you want to create your custom PodSpecBuilder you need to implement it many times (for Deployments, StatefulSet, ...).

Could cdk8s not just a much better CDKTF Kubernetes Provider? It has the nice classes of cdk8s and cdk8s-plus and the provider ecosystem of cdktf/terraform.

Use Case:

Proposed Solution:

Other:


This is a :rocket: Feature Request

shinebayar-g commented 1 month ago

Have you looked at https://github.com/cdktf/cdktf-cdk8s? It takes cdk8s class and deploys using terraform provider.

benkeil commented 1 month ago

Looks not maintained (maybe there is no need) but also don’t find a maven package

iliapolo commented 5 days ago

Marking this as a p2 feature request. @benkeil another avenue to pursue perhaps is opening a discussion in https://github.com/cdktf/cdktf-provider-kubernetes to migrate the provider to use cdk8s instead of their own custom classes, possibly merging with https://github.com/cdktf/cdktf-cdk8s, as they are both maintained by terraform.