-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Support for mixins #759
Comments
Looks like related to #727 |
It would be very useful to be able to "compose" an application from individual components, without having to rely on inheritance chain. As example, application base layer should be able to refer to a database service, which is not part of the application, nor should the application base layer extend it. Instead, the final kustomize layer should be able to mix and match the application with possible different DB sizes / bases. |
I really like the idea of a sperate key like We also would like to have a structure like
The last part (within playbooks) is kind of a pain because I have to point at each patch/resource within a general patch which has to be maintained duplicate times (over multiple playbooks) instead of pointing just to a collection. edit to get around the security issue a workaround would be to create a symlink pointing back in the file tree. |
One use case for this would be a multi-tenant system with multiple release channels and resources allocations per tenants. To do this currently, one would need to create one base for each size/release channel combination. With mixins, this could be achieved by having one mixin to override images, and another one to set resources |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
This issue should stay alive. Lack of activity is no measure of interest here. We are waiting for something to actually happen. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Bump. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle rotten |
@pgpx looks like your #2168 is related to kubernetes/enhancements#1803 |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Looks like /close |
@Shell32-Natsu: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Kustomize currently interprets each overlay as a full set of resources and patches: each patch can modify only resource which is listed directly in
resources:
or indirectly withinbases:
This means that collecting resource and patch group together to use them later is impossible.
Currently I can create following overlay hierarchy:
base
without any bases: defines cluster skeleton with services and podsbase_debug
which inheritsbase
and enables debug tools included into containers (these debug tools disabled by default to simplify using the same container on production and in test environment)base_debug_aws
which adds AWS configs and secrets for servicesbase_debug_aws_scale_hard
which adds a lot of replicas for each service to test horizontal scalingtest_develop
which contains configuration for concrete test environment available at concrete domainThis looks like inheritance in OOP (with multiple inheritance when you have multiple bases).
Of course, I can mix changes from steps 2-4 into base or final overlays. I also can create several bases (one for skeleton and a few bases for things like secrets/configmaps) and maintain patches in place from which multiple overlays can re-use this patch.
But from my point of view, it's better to allow mixins: overlays that contains patches for resources that overlay doesn't have. Like this:
base
defines podsa_deployment.yaml
andb_deployment.yaml
debug
defines patcha_deployment_debug.yaml
, but includes neitherbase
to it's bases nora_deployment.yaml
to it's resourcesaws
adds new resourceaws_secret.yaml
and new patchb_deployment.yaml
scale_hard
adds patches with a lot of replicas fora_deployment.yaml
andb_deployment.yaml
test_develop
combinesbase
,debug
,aws
,scale_hard
in predicted order.It's possible to change kustomize in (at least) two ways:
bases
list to patch resources defined in previous base in the same list:mixins:
key which adds Mixin, which is overlay which can patch resources that it does not define, and process mixins when all bases are already processed.The text was updated successfully, but these errors were encountered: