-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.triage/acceptedIndicates an issue or PR is ready to be actively worked on.Indicates an issue or PR is ready to be actively worked on.
Description
What happened?
I've tried my existing kustomize manifests with kustomize 5.0.0 and found a problem. I applied kustomize edit fix, but kustomize build command returns error:
Error: trouble configuring builtin PatchTransformer with config: `
path: secret.patch.yaml
`: unable to parse SM or JSON patch from [
manifest content
]
What did you expect to happen?
Kustomize build returns:
apiVersion: v1
kind: Secret
metadata:
name: secret1
type: Opaque
stringData:
admin.password: newpassword
---
apiVersion: v1
kind: Secret
metadata:
name: secret2
type: Opaque
stringData:
admin.user: newuser
How can we reproduce it (as minimally and precisely as possible)?
# kustomization.yaml
resources:
- secret.yaml
patches:
- path: secret.patch.yaml# secret.yaml
apiVersion: v1
kind: Secret
metadata:
name: secret1
type: Opaque
stringData:
admin.password: password
---
apiVersion: v1
kind: Secret
metadata:
name: secret2
type: Opaque
stringData:
admin.user: user# secret.patch.yaml
apiVersion: v1
kind: Secret
metadata:
name: secret1
type: Opaque
stringData:
admin.password: newpassword
---
apiVersion: v1
kind: Secret
metadata:
name: secret2
type: Opaque
stringData:
admin.user: newuserExpected output
apiVersion: v1
kind: Secret
metadata:
name: secret1
type: Opaque
stringData:
admin.password: newpassword
---
apiVersion: v1
kind: Secret
metadata:
name: secret2
type: Opaque
stringData:
admin.user: newuserActual output
Error: trouble configuring builtin PatchTransformer with config: `
path: secret.patch.yaml
`: unable to parse SM or JSON patch from [apiVersion: v1
kind: Secret
metadata:
name: secret1
type: Opaque
stringData:
admin.password: newpassword
---
apiVersion: v1
kind: Secret
metadata:
name: secret2
type: Opaque
stringData:
admin.user: newuser
]Kustomize version
5.0.0
Operating system
Linux
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.triage/acceptedIndicates an issue or PR is ready to be actively worked on.Indicates an issue or PR is ready to be actively worked on.
Type
Projects
Status
Done