Adding a label to the tmc-local namespace used by Tanzu Mission Control Self-Managed (TMC-SM) gets removed or disappears.
This article provides steps on how to install TMC-SM with custom labels on the tmc-local namespace and ensure that the custom label does not get reverted.
Tanzu Mission Control Self-Managed (TMC-SM) 1.4.X
Tanzu Mission Control objects adhere to a defined configuration which routinely reconciles to a desired state.
This results in the system reverting any changes that are made outside of the defined configuration, including a custom label added to the tmc-local namespace.
In order for changes such as labels to persist on the tmc-local namespace used by Tanzu Mission Control Self-Managed, the values.yaml must be configured appropriately before installation.
createNamespace: false
namespace: tmc-local
kubectl create namespace tmc-local
watch kubectl describe namespace tmc-local
apiVersion: v1
kind: Namespace
metadata:
labels:
pod-security.kubernetes.io/enforce: privileged
annotations:
kapp.k14s.io/delete-strategy: orphan
name: tmc-localNOTE: Without the above label and annotation, changes to the tmc-local namespace will be reverted.
kubectl describe namespace tmc-local