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

Add support for kustomize #8

Open
xakraz opened this issue Oct 30, 2020 · 5 comments
Open

Add support for kustomize #8

xakraz opened this issue Oct 30, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@xakraz
Copy link

xakraz commented Oct 30, 2020

Hi there !

I live your tool ! It is exactly what I was looking for since already a fan of Atlantis while working with Terraform.

Would it be possible to add support to kustomize.
Kustomize has a build command that fits in the logic of kubeapply.

Thanks for your work and considering my request.

@yolken-segment
Copy link
Contributor

Yes, agreed that kustomize support would be nice. We don't use it internally at Segment, which is why we didn't include it in the initial version, but can definitely add it in the future!

@yolken-segment yolken-segment added the enhancement New feature or request label Oct 30, 2020
@xakraz
Copy link
Author

xakraz commented Nov 2, 2020

What could I do to start working on it ?
Have you any recommandations ?

@yolken-segment
Copy link
Contributor

yolken-segment commented Nov 2, 2020

@xakraz cool, would welcome help here!

The first step would be to figure out the interface- right now, we use file extensions like .helm.yaml, .gotpl.yaml, etc. to figure out how to do the expansion. Not super familiar with how kustomize works, but from the docs looks like this same approach will be harder for kustomize because there are so many different files that can be included. So, as an alternative we can have some sort of convention where we put all kustomize-related things in kustomize subdirectories in the profile? Open to other suggestions here if you have them.

Then, we'll need some way to specify the kustomize environment for building, maybe in the cluster config? Once that's decided, we'll need to add the code into https://github.com/segmentio/kubeapply/blob/master/cmd/kubeapply/subcmd/expand.go#L78 and whatever libraries that's calling.

@yolken-segment
Copy link
Contributor

I can help as well- I should have some free time over the next 2 weeks.

@scriptcoded
Copy link

scriptcoded commented Jul 16, 2021

Hey! 👋 I discovered kubeapply just today (seems pretty nice), so I might be completely misunderstanding how it actually works, but if I've understood at least the basics correctly, kubeapply uses the config templates to produce an expanded configuration that's placed in the "expanded" directory. When applying the configs all kubeapply does is call kubectl with the contents of that directory. If that's the case, then this might just be as simple as calling kubectl with -k <expanded>/kustomize.yaml instead of -Rf <expanded>, since kustomize is part of kubectl.

I might be way off here, just something that struck me when I realized I'd have to convert my kustomize project to plain k8s, and loose features such as config map generation :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants