banzaicloud / istio-operator

An operator that manages Istio deployments on Kubernetes
Apache License 2.0
535 stars 94 forks source link

Add events to namespace label modifications #813

Closed Laci21 closed 2 years ago

Laci21 commented 2 years ago
Q A
Bug fix? no
New feature? yes
API breaks? no
Deprecations? no
Related tickets
License Apache 2.0

What's in this PR?

Record events when istio.io/rev labels are added to or removed from namespaces.

Why?

To help the user understand what happened and why.

Additional context

The events look like this:

default      43s         Normal    IstioInjectionLabelAddition           namespace/laci-test                                          istio.io/rev label added to namespace laci-test, because the namespace has istio.io/rev label in the cluster laci-test, where the ICP cp-v111x is present with the controlplane.istio.servicemesh.cisco.com/namespace-injection-source annotation
default      0s          Normal    IstioInjectionLabelRemoval            namespace/laci-test3                                         istio.io/rev label removed from namespace laci-test3, because the namespace either does not exist or does not have istio.io/rev label in the cluster laci-test, where the ICP cp-v111x is present with the controlplane.istio.servicemesh.cisco.com/namespace-injection-source annotation

Checklist