kubernetes-sigs / kubectl-validate

Apache License 2.0
121 stars 31 forks source link

Log info fails #126

Open omerap12 opened 1 month ago

omerap12 commented 1 month ago

What type of PR is this?

/kind feature

What this PR does / why we need it:

Adds more information when fails. For example, for the following manifest:

apiVersion: v1
kind: ConfigMap
metadata:
  name: x.com
datas: 
  key: value
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: game-demo
data:
  # property-like keys; each key maps to a simple value
  player_initial_lives: "3"
  ui_properties_file_name: "user-interface.properties"

  # file-like keys
  game.properties: |
    enemy.types=aliens,monsters
    player.maximum-lives=5    
  user-interface.properties: |
    color.good=purple
    color.bad=yellow
    allow.textmode=true    

The error would look like:

  test.yaml...ERROR
  failed to parse YAML for object - Name: x.com version: v1, kind: ConfigMap
  datas: Invalid value: value provided for unknown field
  Error: validation failed
  exit status 1

Which issue(s) this PR fixes:

Fixes #94

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

omerap12 commented 1 month ago

Ping @alexzielenski

k8s-ci-robot commented 1 month ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alexzielenski, omerap12

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubernetes-sigs/kubectl-validate/blob/main/OWNERS)~~ [alexzielenski] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
k8s-ci-robot commented 1 month ago

New changes are detected. LGTM label has been removed.

omerap12 commented 1 month ago

Hey @alexzielenski . Removed the check you have mentioned