protocol
field in base config ports spec sometimes results in an empty ports list
#3620
Labels
area/kyaml
issues for kyaml
kind/bug
Categorizes issue or PR as related to a bug.
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
Projects
Describe the bug
If a
protocol
field is specified in a service's ports spec in the base config, it will be omitted from the build output if the patch also has a ports spec with the same port numbers. More variations tried are listed at the bottom.Files that can reproduce the issue
https://github.com/taneliang/kustomize-protocol-issue-repro. Reproduced below for convenience:
kustomization.yaml
deployment.yaml
patch-deployment.yaml
Expected output
Actual output
Kustomize version
{Version:kustomize/v4.0.1 GitCommit:516ff1fa56040adc0173ff6ece66350eb4ed78a9 BuildDate:2021-02-14T05:00:02+00:00 GoOs:darwin GoArch:amd64}
Platform
macOS
Additional context
Variations of the repro files above I've tried:
protocol: UDP
instead of TCP: issue remainsprotocol: TCP
from the base config (i.e. both configs don't have aprotocol
field set): resulting ports array is correctprotocol: TCP
in the patch config instead of the base config: resulting ports array is correctprotocol: TCP
in both configs: resulting ports array is correctI don't believe this can be reproduced on v3.9.2, so the cause was likely introduced between 3.9.2 and 4.0.1
The text was updated successfully, but these errors were encountered: