Open jastang opened 4 years ago
Unfortunately BigQueryTable does not support periods in the labels. When ConfigConnector tries to create the associated BigQuery it ends up using the GCP APIs for BigQuery. In the future, we intend to improve ConfigConnector such that it will let you know when you try to apply / create a new resource if the labels are not compatible with GCP.
You can see the guidelines for GCP labels here: https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources
ConfigConnector should be enhanced to block or translate labels which will be invalid on GCP.
Note that Config Connector will treat labels with prefixes (i.e. my.prefix/key: value
) as Kubernetes-specific and will not map them to the underlying GCP API. If this is acceptable for your use case, you can add a prefix to your desired keys.
Would it be possible to (optionally) convert invalid label keys to valid ones by making them lowercase and replacing "." with "_", or to (optionally) ignore invalid labels entirely, rather than to reject the creation of the resource?
I have come across a problem with a deployment tool Octopus Deploy that adds various labels to kubernetes resources starting with "Octopus.*" naming structure (in order to track what was deployed and what needs to be removed), which of-course fails when the label key validation takes place.
Issue According to the k8s documentation on label syntax, the
.
character should be allowed in label values. However, this is not supported for KCC resource definitions.Environment
kubectl version
KCC Version: 1.4.0
Steps to Reproduce N.B. This was observed for
kind:BigQueryTable
, but I did not test other resource types. Apply the following YAML (assumes the dataset exists)Observed Behaviour
Expected Behaviour The Object Detail YAML in the GKE Object Browser should contain no errors.