Skip to content

skaffold labels erroneously added to CRD validation schema metadata field #1737

@andsens

Description

@andsens

I am trying to get cert-manager up and running with skaffold+kustomize, but am running into an issue with skaffold adding labels to a CRD manifest. kustomize build . | kubectl apply -f - works fine, so I
think this is skaffold itself. Either it modifies the manifest or kustomize gets some additional flags.

Expected behavior

The manifest validates.

Actual behavior

skaffold errors out with:

error: error validating "STDIN": error validating data: ValidationError(CustomResourceDefinition.spec.validation.openAPIV3Schema.properties.metadata): unknown field "labels" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps; if you choose to ignore these errors, turn validation off with --validate=false

Information

  • Skaffold version: v0.24.0
  • Operating system: MacOS 10.14.3
  • Contents of skaffold.yaml:
apiVersion: skaffold/v1beta6
kind: Config
deploy:
  kustomize:
    path: .

Steps to reproduce the behavior

  1. skaffold run this gist.

Full log

$ skaffold run
Starting build...
Build complete in 40.014µs
Starting test...
Test complete in 7.814µs
Starting deploy...
kubectl client version: 1.13
error: error validating "STDIN": error validating data: ValidationError(CustomResourceDefinition.spec.validation.openAPIV3Schema.properties.metadata): unknown field "labels" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps; if you choose to ignore these errors, turn validation off with --validate=false
Deploy complete in 644.45351ms
You can also run [skaffold run --tail] to get the logs

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions