kustomize
kustomize copied to clipboard
No Test for Configuration more specific than default
Is your feature request related to a problem? Please describe.
We document the functionality of the kustomize field configurations
, but we lack test coverage and comments for the following case:
- user-specified
configurations
are covered by default configurations, but more specific than default
According to the documentation, in such a case, the more specific user-specified configuration should replace the more generic default and the transformer should not be applied to field specs that fall under the latter, but not the first.
See issue #4722 for reference.
FYI: We believe the code that implements the intended behavior is in accumulateTarget()
. This method call appends the user-specified config to the list of configs, but then moves it to the beginning via sort. Thus, when this list of configs is merged with an empty list, the latter, more generic default config is marked as redundant and not included in the final configs here.
Describe the solution you'd like
We should have at least 1 test covering such a case. As stated above, because the code that implements this behavior is located here, the solution will probably be an integration test under kusttarget_test.go
or api/krusty
that follows a similar setup in #4722.
A few comments, say above MergeConfig()
, the sortFields()
call, and the sortFields()
definition, to explain their purpose would also be very helpful.
/triage accepted
/assign
/close
Addressed by #4882.
@annasong20: Closing this issue.
In response to this:
/close
Addressed by #4882.
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.