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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a full kustomize resource #2046

Open
jsravn opened this issue Jun 24, 2022 · 2 comments
Open

Add a full kustomize resource #2046

jsravn opened this issue Jun 24, 2022 · 2 comments
Labels
area/yaml kind/enhancement Improvements or new features mro2 Monica's list of 2st tier overlay related issues

Comments

@jsravn
Copy link

jsravn commented Jun 24, 2022

Hello!

  • Vote on this issue by adding a 馃憤 reaction
  • If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)

Issue details

I'm currently using https://www.pulumi.com/registry/packages/kubernetes/api-docs/kustomize/directory/. However it's quite limited because we can't override values like you normally would on the command line with kustomize set namespace=, etc. or your own kustomization.yaml file referring a remote resource.

Instead of simply taking a directory, it would be a lot more useful if the kustomize resource could take an object which represents a kustomization.yaml itself. Then users can specify all possible options.

So something like:

new kubernetes.kustomize.Kustomization("my-kustomize",
  {
	  resources: ["my-kustomize-project/config/default", "https://example.com/my-remote-kustomize" ],
	  namespace: myNamespace.metadata.name,
	  images: [{
        name: "controller",
        newName: "myimage",
        newTag: "latest",
      }],
      // etc.
  }

So basically, just allow specifying a kustomization.yaml equivalent in-line. This would give full customization over a kustomize project.

Affected area/feature

@jsravn jsravn added kind/enhancement Improvements or new features needs-triage Needs attention from the triage team labels Jun 24, 2022
@jsravn jsravn changed the title kustomization resource should allow configuration add a full kustomizate resource Jun 24, 2022
@lblackstone lblackstone changed the title add a full kustomizate resource Add a full kustomize resource Jun 27, 2022
@lblackstone lblackstone removed the needs-triage Needs attention from the triage team label Jun 27, 2022
@stack72 stack72 added kind/enhancement Improvements or new features and removed kind/enhancement Improvements or new features labels Jun 27, 2022
@danielbichuetti
Copy link

danielbichuetti commented Jul 14, 2022

This is a really useful feature. Without being able to edit the kustomization.yaml, it restricts some fundamental principles of automation. Or maybe a way to use transformations on the kustomization.yaml file.

@mnlumi mnlumi added the mro2 Monica's list of 2st tier overlay related issues label Mar 28, 2023
@EronWright
Copy link
Contributor

EronWright commented Mar 29, 2024

This does seem like a useful feature.

We should keep in mind the design principle of Kustomize (from Eschewed Features), that informed the simplistic design of the Directory resource.

kustomize supports the best practice of storing one鈥檚 entire configuration in a version control system.

Changing kustomize build configuration output as a result of additional arguments or flags to build, or by consulting shell environment variable values in build code, would frustrate that goal.

kustomize insteads offers kustomization file edit commands. Like any shell command, they can accept environment variable arguments.

This sentiment is also echoed here.

I would advocate for a new resource type, e.g. Kustomize as described by the OP, to generate and apply a Kustomization. One could argue that the Pulumi program itself is the source-controlled artifact, and that the Kustomization is derived from that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/yaml kind/enhancement Improvements or new features mro2 Monica's list of 2st tier overlay related issues
Projects
None yet
Development

No branches or pull requests

6 participants