Skip to content
Snippets Groups Projects

Draft: Add "default" Helm labels and missing namespaces

Open Nacho Barrientos requested to merge ib_labels_ns into master

This changeset labels all the managed resources with standard labels which are part of the Helm chart skeleton, ex:

monitoring, servicemonitor-scheduler, ServiceMonitor (monitoring.coreos.com) has changed:
  # Source: cern-it-monitoring-kubernetes/templates/scheduler/servicemonitor.yaml
  apiVersion: monitoring.coreos.com/v1
  kind: ServiceMonitor
  metadata:
    name: servicemonitor-scheduler
    namespace: monitoring
+   labels:
+     helm.sh/chart: cern-it-monitoring-kubernetes-0.0.0
+     app.kubernetes.io/name: cern-it-monitoring-kubernetes
+     app.kubernetes.io/instance: kubernetes-monitoring
+     app.kubernetes.io/managed-by: Helm

The most useful bit about this is to easily know what version of the chart updated the resource for the last time.

I'm also adding the namespace metadata key to some resources that were missing it. Whereas this is ignored when using helm install as -n wins, it might be useful when using helm template to perhaps feed the output to kubectl apply -f -.

Edited by Nacho Barrientos

Merge request reports

Pipeline #11096017 failed

Pipeline failed for 34147c8b on ib_labels_ns

Ready to merge by members who can write to the target branch.
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading