Skip to content

kpt live silently fails to apply annotations with errors #3784

@mortent

Description

@mortent

Expected behavior

kpt live apply should fail to apply a resource if an annotation has an illegal value

Actual behavior

kpt live apply applied the resource without the annotations with illegal values.

Steps to reproduce the behavior

Example resource:

apiVersion: v1
kind: ConfigMap
metadata:
  name: game-config
  namespace: default
  annotations:
    example.com/my-anno: true
data:
  foo: bar

This completed without errors. But the resulting resource in the cluster does not include the annotation:

apiVersion: v1
data:
  foo: bar
kind: ConfigMap
metadata:
  annotations:
    config.k8s.io/owning-inventory: ed96c94158f88ec28abc7d491b8447fe24853c28-1675358808715604556
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"v1","data":{"foo":"bar"},"kind":"ConfigMap","metadata":{"annotations":{"config.k8s.io/owning-inventory":"ed96c94158f88ec28abc7d491b8447fe24853c28-1675358808715604556"},"name":"game-config","namespace":"default"}}
  creationTimestamp: "2023-02-02T23:46:15Z"
  name: game-config
  namespace: default
  resourceVersion: "665"
  uid: 7502f43b-1a46-4eb4-891c-53fab2801376

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions