-
Notifications
You must be signed in to change notification settings - Fork 924
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
kubectl kustomize v. 1.21 not supporting YAML references #1043
Comments
@ZhilinS: This issue is currently awaiting triage. SIG CLI takes a lead on issue triage for this repo, but any Kubernetes member can accept issues by applying the The 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. |
It can be fixed by changing api.yaml to
but it's strange to see that previous version of tool was working with standard YAML syntax and the newest one isn't |
We have been experiencing a lot of issues with regard to the use of anchors. Following YAML that used to work with apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: &app my-app
subjects:
- kind: ServiceAccount
name: *app
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: *app Also rendering https://github.com/knative-sandbox/eventing-kafka-broker/releases/download/v0.22.1/eventing-kafka-controller.yaml using livenessProbe:
!!merge <<: *probe
initialDelaySeconds: 20 Similarly rendering https://github.com/knative-sandbox/eventing-kafka/releases/download/v0.22.3/source.yaml errors out due to the use of YAML anchors. edit: none of the above issues are experienced with kubectl 1.20.4 |
Kubectl 1.21 contains a large version bump to Kustomize, from v2 to v4. There are already several issues open on the Kustomize repo about problems with YAML anchors. Please follow along there. I believe the most relevant to this particular case is kubernetes-sigs/kustomize#3614. /triage duplicate |
@KnVerey: Closing this issue. In response to this:
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. |
What happened:
After upgrading kubectl to version 1.21 kustomize command fails when YAML anchors are references by '<<'
What you expected to happen:
As it was in v. 1.20, command should provide correct output, but not the erorr
How to reproduce it (as minimally and precisely as possible):
Given this 2 files:
kustomization.yaml:
api.yaml:
Execute
kubectl kustomize .
and see the following output:v. 1.20:
v. 1.21:
So, now kubectl cannot recognize
<<
while parsing yaml. Replacement with any string fixes the issue. Even"<<"
fixes it.Environment:
The text was updated successfully, but these errors were encountered: