besom icon indicating copy to clipboard operation
besom copied to clipboard

Add Kubernetes provider overlays

Open pawelprazak opened this issue 1 year ago • 9 comments

We are missing hand-crafted 'overlays' in Kubernetes provider:

  • [x] CustomResource, CustomResourcePatch - frequently used k8s API (top priority) ~ 2 days
  • [x] ConfigFile, ConfigGroup, Invokes, TransformationAction - yaml tools (2nd priority) ~ 3 days
  • [ ] helm abstractions (nice to have) ~ 3 days
  • [ ] kustomize abstractions (nice to have) ~ 2 days

Upstream: https://github.com/pulumi/pulumi-kubernetes/blob/master/provider/pkg/gen/overlays.go https://github.com/pulumi/pulumi-kubernetes/tree/master/provider/pkg/gen/nodejs-templates

pawelprazak avatar Feb 06 '24 09:02 pawelprazak

IIUC once pulumi/#1871 is done we won't have to add a hand-written overlay (at least some)

pawelprazak avatar Feb 10 '24 15:02 pawelprazak

the simplest solution would be to add codegen/resources/overlays and re-use ProviderConfig and reuse the existing codegen

pawelprazak avatar Feb 15 '24 13:02 pawelprazak

Those new changes look relevant: https://github.com/pulumi/pulumi/pull/15490/files#diff-5eea65419cabefe8dae546369e07a0cdc8d2ed74b58326724b49fba56637f910

pawelprazak avatar Mar 05 '24 19:03 pawelprazak

As it turns out, upstream Pulumi is adding the resources that were implemented as overlays, as components: https://github.com/pulumi/pulumi-kubernetes/issues/1971

pawelprazak avatar Mar 27 '24 12:03 pawelprazak

The helm and yaml support can be considered done via 4.11.0+ provider support.

pawelprazak avatar Apr 19 '24 18:04 pawelprazak

can we close this now, given this was fixed in upstream and inherited via code generation on our side?

lbialy avatar Apr 21 '24 15:04 lbialy

We're still waiting for full support (as indicated by checkboxes in this issue):

  • CRs - https://github.com/pulumi/pulumi-kubernetes/issues/2787
  • full helm support (v4) - https://github.com/pulumi/pulumi-kubernetes/issues/2847
  • kustomize support (v2) - https://github.com/pulumi/pulumi-kubernetes/issues/2786

More info in the upstream epic: https://github.com/pulumi/pulumi-kubernetes/issues/1971

What we have now is full yaml/v2.

pawelprazak avatar Apr 23 '24 11:04 pawelprazak

glad the work to create component versions of these overlays is proving useful to you all. FWIW, we are considering not going ahead with an MLC for CustomResource. Since the only function of this overlay is to pack arbitrary fields from the SDK into a single field for Pulumi, there's not really an equivalent component we could write. Plus the implementations in each SDK are relatively simple, making this overlay reasonable to write and support.

mjeffryes avatar Apr 26 '24 23:04 mjeffryes