kubernetes-sigs / kustomize

Customization of kubernetes YAML configurations
Apache License 2.0
11.08k stars 2.26k forks source link

Typos in fieldSpec do not get detected #5811

Open guettli opened 20 hours ago

guettli commented 20 hours ago

What happened?

I had a typo in a fieldSpec, and the typo got silently ignored.

apiVersion: builtin
kind: NamespaceTransformer
metadata:
  name: dummy
  namespace: dummy
fieldSpecs:
- path: metadata/name
  kind: Namespace
  fooooo: bar

What did you expect to happen?

I expect that my yaml gets validated before it gets executed.

How can we reproduce it (as minimally and precisely as possible)?

set-namespace.yaml

apiVersion: builtin
kind: NamespaceTransformer
metadata:
  name: dummy
  namespace: dummy
fieldSpecs:
- path: metadata/name
  kind: Namespace
  fooooo: bar

Expected output

Actual output

an error message like:

invalid field "fooooo"

Kustomize version

sigs.k8s.io/kustomize/api v0.18.0

Operating system

Linux

k8s-ci-robot commented 20 hours ago

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 triage/accepted label.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.