Closed icy closed 4 years ago
Actually it isn't a problem of the images:
transformer. When I remove the transformer from base
/ I can see the same diff
$ colordiff <(kust382 build overlay/) <(kust385 build overlay/)
22,23d21
< - name: FOO
< value: BAR
26,27d23
< image: bflux
< imagePullPolicy: Always
I suspect that the behavior of patches
has changed quite a lot, and that doesn't merge: it replaces things from base/
The difference is introduced in 3.8.3. We updated the API definition for k8s resources in 3.8.3 (#2978) and then the Deployment
in extensions/v1beta1
api version is not found in the new schema. So that it works in this way.
/close
@Shell32-Natsu: Closing this issue.
Change to apps/v1
will make it work.
Change to
apps/v1
will make it work.
Thanks a lot, @Shell32-Natsu .
Our k8s upgrade process is quite slow. I expected to use new version that addresses this issue https://github.com/kubernetes-sigs/kustomize/issues/2995, but I think now I have to a few more issues :dango:
Description
In
kustomize-3.8.5
an overlay patch can interfere withimages:
transformer inbase
and generate completely wrong output.In our test (https://github.com/icy/kustomize-misc/tree/master/002),
base/kustomization.yaml
specifies a transformerand in
overlay/kustomization.yaml
there is to modify the same deploymentExpected output
Image transformer result from
base
is reflected in the overlay.kustomize-3.8.2
works as expected. Theenv:
section in the base manifest is kept, and the followingdiff
command generates no-diff:Actual output
The output generated by
kustomize-3.8.5
doesn't include any result fromimages:
transformer. Theenv:
section in base manifest is gone:References