GoogleContainerTools / GoogleContainerTools/skaffold

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

Open
#9,404 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
15.9k
Forks
1.7k
Avg merge
3d 9h
Merged PRs (30d)
10

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.