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 build fails for kustomize v5.0.3 #1815

Closed
nnbu opened this issue Sep 25, 2024 · 0 comments · Fixed by #1822
Closed

kustomize build fails for kustomize v5.0.3 #1815

nnbu opened this issue Sep 25, 2024 · 0 comments · Fixed by #1822
Assignees
Labels
bug Something isn't working good first issue Good for newcomers
Milestone

Comments

@nnbu
Copy link

nnbu commented Sep 25, 2024

Describe the bug:
The repository has kustomization.yaml which are formatted based on older kustomize version.
kustomize build config/default works for kustomize version v4.3.0

But when kustomize version is v5.0.3 , it fails

$ kustomize build config/default
Error: invalid Kustomization: json: cannot unmarshal string into Go struct field Kustomization.patches of type types.Patch
$ kustomize version
v5.0.3

Expected behaviour:
kustomize 5.0.3 build should work

Steps to reproduce the bug:
mentioned above

Additional context:
A quick fix would be to make change something like this.

diff --git a/config/default/kustomization.yaml b/config/default/kustomization.yaml
index 072ac400..0972f6e9 100644
--- a/config/default/kustomization.yaml
+++ b/config/default/kustomization.yaml
@@ -22,11 +22,11 @@ bases:
 #- ../certmanager

 patches:
-- manager_image_patch.yaml
+  - path: manager_image_patch.yaml
   # Protect the /metrics endpoint by putting it behind auth.
   # Only one of manager_auth_proxy_patch.yaml and
   # manager_prometheus_metrics_patch.yaml should be enabled.
-- manager_auth_proxy_patch.yaml
+  - path: manager_auth_proxy_patch.yaml
   # If you want your controller-manager to expose the /metrics
   # endpoint w/o any authn/z, uncomment the following line and
   # comment manager_auth_proxy_patch.yaml.

Environment details:

  • Kubernetes version (e.g. v1.15.2): NA
  • Cloud-provider/provisioner (e.g. AKS, GKE, EKS, PKE etc): NA
  • logging-operator version (e.g. 2.1.1): 4.9.1
  • Install method (e.g. helm or static manifests): NA
  • Logs from the misbehaving component (and any other relevant logs): NA
  • Resource definition (possibly in YAML format) that caused the issue, without sensitive data: NA

/kind bug

@nnbu nnbu added the bug Something isn't working label Sep 25, 2024
@pepov pepov added the good first issue Good for newcomers label Sep 26, 2024
@pepov pepov modified the milestones: 4.x, 4.11 Oct 7, 2024
@csatib02 csatib02 linked a pull request Oct 9, 2024 that will close this issue
@csatib02 csatib02 self-assigned this Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants