GoogleContainerTools / skaffold

Easy and Repeatable Kubernetes Development

Home Page:https://skaffold.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

skaffold.yaml: Add global field to hold YAML anchor definitions

dallasvaughan opened this issue · comments

Expected behavior

Following the guidance on https://skaffold.dev/docs/references/yaml/ (YAML Anchors section) to define and use YAML anchors for common variable values does not result in JSON schema validation errors for skaffold.yaml.

Actual behavior

Additional global fields added to skaffold.yaml fail validation against the JSON schema because additionalProperties: false

Recommended Schema Change

In order to properly support user-defined anchors without failing schema validation, add a new field definition to the Skaffold JSON schema (like commonVariables or .commonVariables) specifically for defining reused YAML values within skaffold.yaml. Alternatively, add a schema that allows any global field whose name begins with . so that defining custom variables is possible.