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

Open
nnbu opened this issue Sep 25, 2024 · 0 comments
Open

kustomize build fails for kustomize v5.0.3 #1815

nnbu opened this issue Sep 25, 2024 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers

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
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

No branches or pull requests

2 participants