-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[feature request] multiple Kustomizations #1872
Comments
I'm imagining something like
|
@paultiplady kubernetes-sigs/kustomize#168 talks about running kustomize twice with different |
I agree with @corneliusweig, you could create variants using overlays like this? I am closing this issue for now, please re-open if you think this does not support your use case |
Following the example @tejal29 linked to I organized overlays to differentiate service
My initial hope was to point skaffold at a list of kustomization paths like @paultiplady's suggestion, which appears similar in spirit to the microservices example. I'm not sure what restructuring kustomization manifests in the manner that @corneliusweig suggests will look like, but am going to give it a go. |
@itsleeowen @paultiplady I'm facing the same issue, did you manage to work around? If so, what does your hierarchy looks like? @tejal29 @corneliusweig Kustomize has now some load restrictions that prevents by default to include something else in overlays other than a base, so it forces some kind of hierarchy iirc. |
I'd expect multiple kustomisations to work in exactly the same way you can deploy multiple kubectl manifests, or multiple helm chart. It doesn't make sense (to me) you'd support one and not the other, or expect an overarching kustomisation when this isn't the case with helm or kubectl. My use case is that I have multiple microservices, each microservice has its own Docker image and set of manifests (each with their own kustomisations). All of these services make up the application stack that I want to deploy with Skaffold. |
@kri5 @davestephens Looking at the documentation for
So it seems quite clear to me, that one can pass multiple resources ( Consequently, Skaffold would distort the design principle of kustomize, if we were to support multiple Do you agree? |
@corneliusweig My understanding was the complete opposite, actually. eg, if you do a Perhaps I'm misunderstanding the use case of Skaffold, but my understanding was that you could use it to build multiple images, helm charts, manifests etc, and push them to your k8s cluster? Building and pushing multiple kustomisations feels like the missing link to me... |
@davestephens I totally agree with you. I have an environment where there are multiple "projects" some that need kustomization, and other don't So I'd like to :
And I can't do any of that... |
@tejal29 and @paultiplady. Could you please reopen this issue! This is an absolute basic feature as lot of people here have requested (and reacted/commented). I was so happy the first minutes about skaffold as it seemed to fulfill all developer needs but then I got so disappointed that this basic feature is missing. Summarizing, as all the other comments already state:
And of course kustomize should work the same way too.
Thanks very much! |
Kustomize solves this by creating a new variant with several bases (see https://github.com/kubernetes-sigs/kustomize/tree/master/examples/multibases). So @ichtestemalwieder's example just needs a kustomization.yaml with the following content: resources:
- devopos/mysql
- devopos/memcached
- monorepo/packages/restapi
- monorepo/packages/frontend Maybe someone can explain, why this solution does not work for you? |
@corneliusweig: Thanks very much for your answer! As far as I understeand multibases, it is the equivalent of "helm umbrella charts". Yes it seems to be a solution, but not an ideal one. As it requires to setup an additional and "external" (to skaffold) "meta/aggregator" configuration file (namely the multibases kustomization.yaml file). Conclusion and potential Improvements: |
This issue was discussed during the Skaffold bi-weekly meeting on Jan 22. The core team agrees that Skaffold should treat helm and kustomize in the same way, see #3585 for details. Btw, everybody is welcome to bring up issues like these during that meeting. That's what it is there for :) |
Some kustomize workflows may involve multiple kustomizations, e.g. as suggested in kubernetes-sigs/kustomize#168, having one kustomization for a db migration, followed by another for the main deploy.
More generally, since it's supported to have multiple helm releases in the helm deployer, by analogy it seems we should support a list of kustomizations in the kustomize deployer, instead of just one.
Information
The text was updated successfully, but these errors were encountered: