Skip to content
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

kustomize: strategicMergePatch clobbers patched arrays #3934

Closed
joelanford opened this issue May 20, 2024 · 1 comment · Fixed by #3937
Closed

kustomize: strategicMergePatch clobbers patched arrays #3934

joelanford opened this issue May 20, 2024 · 1 comment · Fixed by #3937
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@joelanford
Copy link
Member

joelanford commented May 20, 2024

What broke? What's expected?

When I enabled the manager_metrics_patch.yaml in config/default/kustomization.yaml, it wiped out the arguments that I had setup in the config/manager/manager.yaml.

Reproducing this issue

Initialize project and build manifests with and without metrics patch commented:

kubebuilder init --plugins go/v4 --domain example.org --owner "Your name" --repo example.org/test-project
make kustomize && bin/kustomize-v5.3.0 build config/default > default.yaml
sed -i 's/#- path: manager_metrics_patch.yaml/- path: manager_metrics_patch.yaml/' config/default/kustomization.yaml
make kustomize && bin/kustomize-v5.3.0 build config/default > metrics-patch.yaml

Diff the manifests:

diff default.yaml metrics-patch.yaml
151,153c151
<         - --leader-elect
<         - --health-probe-bind-address=:8081
<         - --metrics-bind-address=0
---
>         - --metrics-bind-address=0.0.0.0:8080

KubeBuilder (CLI) Version

v3.15.0

PROJECT version

v3

Plugin versions

go.kubebuilder.io/v4

Other versions

No response

Extra Labels

No response

@joelanford joelanford added the kind/bug Categorizes issue or PR as related to a bug. label May 20, 2024
camilamacedo86 added a commit to camilamacedo86/kubebuilder that referenced this issue May 20, 2024
Ensure that enabling the manager_metrics_patch.yaml in config/default/kustomization.yaml does not overwrite existing arguments in config/manager/manager.yaml. The patch now appends the --metrics-bind-address argument without replacing other arguments.

More info: kubernetes-sigs#3934
camilamacedo86 added a commit to camilamacedo86/kubebuilder that referenced this issue May 20, 2024
Ensure that enabling the manager_metrics_patch.yaml in config/default/kustomization.yaml does not overwrite existing arguments in config/manager/manager.yaml. The patch now appends the --metrics-bind-address argument without replacing other arguments.

More info: kubernetes-sigs#3934
@camilamacedo86
Copy link
Member

Hi @joelanford,

For now I think the best is we ensure that it is as it was before: #3937
I tracked an issue for we analyse the suggestion to use Pod instead: #3936

camilamacedo86 added a commit to camilamacedo86/kubebuilder that referenced this issue May 20, 2024
Ensure that enabling the manager_metrics_patch.yaml in config/default/kustomization.yaml does not overwrite existing arguments in config/manager/manager.yaml. The patch now appends the --metrics-bind-address argument without replacing other arguments.

More info: kubernetes-sigs#3934
camilamacedo86 added a commit to camilamacedo86/kubebuilder that referenced this issue May 20, 2024
Ensure that enabling the manager_metrics_patch.yaml in config/default/kustomization.yaml does not overwrite existing arguments in config/manager/manager.yaml. The patch now appends the --metrics-bind-address argument without replacing other arguments.

More info: kubernetes-sigs#3934
camilamacedo86 added a commit to camilamacedo86/kubebuilder that referenced this issue May 20, 2024
Ensure that enabling the manager_metrics_patch.yaml in config/default/kustomization.yaml does not overwrite existing arguments in config/manager/manager.yaml. The patch now appends the --metrics-bind-address argument without replacing other arguments.

More info: kubernetes-sigs#3934
camilamacedo86 added a commit to camilamacedo86/kubebuilder that referenced this issue May 21, 2024
Ensure that enabling the manager_metrics_patch.yaml in config/default/kustomization.yaml does not overwrite existing arguments in config/manager/manager.yaml. The patch now appends the --metrics-bind-address argument without replacing other arguments.

More info: kubernetes-sigs#3934
camilamacedo86 added a commit to camilamacedo86/kubebuilder that referenced this issue May 21, 2024
Ensure that enabling the manager_metrics_patch.yaml in config/default/kustomization.yaml does not overwrite existing arguments in config/manager/manager.yaml. The patch now appends the --metrics-bind-address argument without replacing other arguments.

More info: kubernetes-sigs#3934
camilamacedo86 added a commit to camilamacedo86/kubebuilder that referenced this issue May 21, 2024
Ensure that enabling the manager_metrics_patch.yaml in config/default/kustomization.yaml does not overwrite existing arguments in config/manager/manager.yaml. The patch now appends the --metrics-bind-address argument without replacing other arguments.

More info: kubernetes-sigs#3934
camilamacedo86 added a commit to camilamacedo86/kubebuilder that referenced this issue May 22, 2024
Ensure that enabling the manager_metrics_patch.yaml in config/default/kustomization.yaml does not overwrite existing arguments in config/manager/manager.yaml. The patch now appends the --metrics-bind-address argument without replacing other arguments.

More info: kubernetes-sigs#3934
camilamacedo86 added a commit to camilamacedo86/kubebuilder that referenced this issue May 22, 2024
Ensure that enabling the manager_metrics_patch.yaml in config/default/kustomization.yaml does not overwrite existing arguments in config/manager/manager.yaml. The patch now appends the --metrics-bind-address argument without replacing other arguments.

More info: kubernetes-sigs#3934
camilamacedo86 added a commit to camilamacedo86/kubebuilder that referenced this issue May 22, 2024
Ensure that enabling the manager_metrics_patch.yaml in config/default/kustomization.yaml does not overwrite existing arguments in config/manager/manager.yaml. The patch now appends the --metrics-bind-address argument without replacing other arguments.

More info: kubernetes-sigs#3934
camilamacedo86 added a commit to camilamacedo86/kubebuilder that referenced this issue May 23, 2024
Ensure that enabling the manager_metrics_patch.yaml in config/default/kustomization.yaml does not overwrite existing arguments in config/manager/manager.yaml. The patch now appends the --metrics-bind-address argument without replacing other arguments.

More info: kubernetes-sigs#3934
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants