Hacker News new | ask | show | jobs
by Benjamin_Dobell 2616 days ago
I just did the big 1.x -> 2.x refactor myself, and whilst it's not exactly pretty you can still reuse patches to some degree. It's just that every patch that will be applied independently now needs to be part of its own "base". You can then pull in the "base" wherever you want the patch applied. It's far from ideal, so I do hope the process improves, but it does at least work

EDIT: Although, after properly reading that linked issue, I see you mean applying the same patch to different resources. I interpreted "target" to mean build target (e.g. deployment/app), you can use the same patch across different deployments (apps) and overlays (environment). However, I see your use case is a bit different.

> I wish it folowwed a similar pattern as `kubernetes` resources where each resource had an `apiVersion`, and the `kustomization` itself had an `apiVersion`.

As of 2.0, this is now the case[1]:

> apiVersion: kustomize.config.k8s.io/v1beta1

> kind: Kustomization

[1] https://github.com/kubernetes-sigs/kustomize/blob/a5bb5479fb...