From c6ea3383b60730a4f914f0f126cc19bc61fb69f9 Mon Sep 17 00:00:00 2001 From: Dean Roehrich Date: Tue, 2 Jul 2024 13:04:18 -0500 Subject: [PATCH] Add version labels to release manifest items (#75) Add component/version labels to each resource in the manifest. If run locally the labels will be: app.kubernetes.io/component: lustre-csi-driver app.kubernetes.io/version: If run from nnf-deploy's "make manifests" the labels will be: app.kubernetes.io/component: lustre-csi-driver app.kubernetes.io/version: app.kubernetes.io/part-of: nnf app.kubernetes.io/nnf-version: Signed-off-by: Dean Roehrich --- hack/make-kustomization.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/hack/make-kustomization.sh b/hack/make-kustomization.sh index 78034df..56cd3a3 100755 --- a/hack/make-kustomization.sh +++ b/hack/make-kustomization.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2023 Hewlett Packard Enterprise Development LP +# Copyright 2023-2024 Hewlett Packard Enterprise Development LP # Other additional copyright holders may be indicated within. # # The entirety of this work is licensed under the Apache License, @@ -33,6 +33,21 @@ cat < "$OVERLAY_DIR"/kustomization.yaml resources: - ../$OVERLAY +commonLabels: + app.kubernetes.io/version: "$TAG" + app.kubernetes.io/component: lustre-csi-driver +EOF + +if [[ -n $NNF_VERSION ]] +then + cat <> "$OVERLAY_DIR"/kustomization.yaml + app.kubernetes.io/nnf-version: "$NNF_VERSION" + app.kubernetes.io/part-of: nnf +EOF +fi + +cat <> "$OVERLAY_DIR"/kustomization.yaml + apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization images: