tetragon icon indicating copy to clipboard operation
tetragon copied to clipboard

helm: Template CRDs directly to get standard k8s labels

Open lambdanis opened this issue 2 months ago • 1 comments

So far CRDs were included in the Helm chart like this:

  1. Copy into crds-yaml directory
  2. Concatenate in a template using .Files.Get

With such approach, Helm doesn't add standard k8s "app.kubernetes.io/*" labels (e.g. version, managed-by) to CRDs like it does for other resources. Having these labels is useful from the operational perspective, so this commit changes how CRDs are included in the Helm chart. It now works like this:

  1. Copy inside the templates directory
  2. Wrap each CRD in an if block to check if it should be included

lambdanis avatar Jun 05 '24 12:06 lambdanis