From 2971d34a130303c29992a50d4ec9989aeda4fc52 Mon Sep 17 00:00:00 2001 From: Stefan Prodan Date: Mon, 26 Sep 2022 14:08:32 +0300 Subject: [PATCH] Add component label for controllers and their CRDs Label each controller deployment, service, service account and CRDs with `app.kubernetes.io/component: `. Signed-off-by: Stefan Prodan --- manifests/bases/helm-controller/kustomization.yaml | 2 ++ manifests/bases/helm-controller/labels.yaml | 9 +++++++++ .../bases/image-automation-controller/kustomization.yaml | 2 ++ manifests/bases/image-automation-controller/labels.yaml | 9 +++++++++ .../bases/image-reflector-controller/kustomization.yaml | 2 ++ manifests/bases/image-reflector-controller/labels.yaml | 9 +++++++++ manifests/bases/kustomize-controller/kustomization.yaml | 3 ++- manifests/bases/kustomize-controller/labels.yaml | 9 +++++++++ .../bases/notification-controller/kustomization.yaml | 2 ++ manifests/bases/notification-controller/labels.yaml | 9 +++++++++ manifests/bases/source-controller/kustomization.yaml | 3 ++- manifests/bases/source-controller/labels.yaml | 9 +++++++++ 12 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 manifests/bases/helm-controller/labels.yaml create mode 100644 manifests/bases/image-automation-controller/labels.yaml create mode 100644 manifests/bases/image-reflector-controller/labels.yaml create mode 100644 manifests/bases/kustomize-controller/labels.yaml create mode 100644 manifests/bases/notification-controller/labels.yaml create mode 100644 manifests/bases/source-controller/labels.yaml diff --git a/manifests/bases/helm-controller/kustomization.yaml b/manifests/bases/helm-controller/kustomization.yaml index 10532208..becb28ca 100644 --- a/manifests/bases/helm-controller/kustomization.yaml +++ b/manifests/bases/helm-controller/kustomization.yaml @@ -4,6 +4,8 @@ resources: - https://github.com/fluxcd/helm-controller/releases/download/v0.24.0/helm-controller.crds.yaml - https://github.com/fluxcd/helm-controller/releases/download/v0.24.0/helm-controller.deployment.yaml - account.yaml +transformers: +- labels.yaml patchesJson6902: - target: group: apps diff --git a/manifests/bases/helm-controller/labels.yaml b/manifests/bases/helm-controller/labels.yaml new file mode 100644 index 00000000..29c577f0 --- /dev/null +++ b/manifests/bases/helm-controller/labels.yaml @@ -0,0 +1,9 @@ +apiVersion: builtin +kind: LabelTransformer +metadata: + name: labels +labels: + app.kubernetes.io/component: helm-controller +fieldSpecs: + - path: metadata/labels + create: true diff --git a/manifests/bases/image-automation-controller/kustomization.yaml b/manifests/bases/image-automation-controller/kustomization.yaml index 53b2f775..3ed2e6b1 100644 --- a/manifests/bases/image-automation-controller/kustomization.yaml +++ b/manifests/bases/image-automation-controller/kustomization.yaml @@ -4,6 +4,8 @@ resources: - https://github.com/fluxcd/image-automation-controller/releases/download/v0.25.0/image-automation-controller.crds.yaml - https://github.com/fluxcd/image-automation-controller/releases/download/v0.25.0/image-automation-controller.deployment.yaml - account.yaml +transformers: +- labels.yaml patchesJson6902: - target: group: apps diff --git a/manifests/bases/image-automation-controller/labels.yaml b/manifests/bases/image-automation-controller/labels.yaml new file mode 100644 index 00000000..88ddf5a5 --- /dev/null +++ b/manifests/bases/image-automation-controller/labels.yaml @@ -0,0 +1,9 @@ +apiVersion: builtin +kind: LabelTransformer +metadata: + name: labels +labels: + app.kubernetes.io/component: image-automation-controller +fieldSpecs: + - path: metadata/labels + create: true diff --git a/manifests/bases/image-reflector-controller/kustomization.yaml b/manifests/bases/image-reflector-controller/kustomization.yaml index 1c86e492..b139c31a 100644 --- a/manifests/bases/image-reflector-controller/kustomization.yaml +++ b/manifests/bases/image-reflector-controller/kustomization.yaml @@ -4,6 +4,8 @@ resources: - https://github.com/fluxcd/image-reflector-controller/releases/download/v0.21.0/image-reflector-controller.crds.yaml - https://github.com/fluxcd/image-reflector-controller/releases/download/v0.21.0/image-reflector-controller.deployment.yaml - account.yaml +transformers: +- labels.yaml patchesJson6902: - target: group: apps diff --git a/manifests/bases/image-reflector-controller/labels.yaml b/manifests/bases/image-reflector-controller/labels.yaml new file mode 100644 index 00000000..ee3a2f4f --- /dev/null +++ b/manifests/bases/image-reflector-controller/labels.yaml @@ -0,0 +1,9 @@ +apiVersion: builtin +kind: LabelTransformer +metadata: + name: labels +labels: + app.kubernetes.io/component: image-reflector-controller +fieldSpecs: + - path: metadata/labels + create: true diff --git a/manifests/bases/kustomize-controller/kustomization.yaml b/manifests/bases/kustomize-controller/kustomization.yaml index 51986bb2..1d42f608 100644 --- a/manifests/bases/kustomize-controller/kustomization.yaml +++ b/manifests/bases/kustomize-controller/kustomization.yaml @@ -4,6 +4,8 @@ resources: - https://github.com/fluxcd/kustomize-controller/releases/download/v0.28.0/kustomize-controller.crds.yaml - https://github.com/fluxcd/kustomize-controller/releases/download/v0.28.0/kustomize-controller.deployment.yaml - account.yaml +transformers: +- labels.yaml patchesJson6902: - target: group: apps @@ -11,4 +13,3 @@ patchesJson6902: kind: Deployment name: kustomize-controller path: patch.yaml - diff --git a/manifests/bases/kustomize-controller/labels.yaml b/manifests/bases/kustomize-controller/labels.yaml new file mode 100644 index 00000000..86e93ee2 --- /dev/null +++ b/manifests/bases/kustomize-controller/labels.yaml @@ -0,0 +1,9 @@ +apiVersion: builtin +kind: LabelTransformer +metadata: + name: labels +labels: + app.kubernetes.io/component: kustomize-controller +fieldSpecs: + - path: metadata/labels + create: true diff --git a/manifests/bases/notification-controller/kustomization.yaml b/manifests/bases/notification-controller/kustomization.yaml index e17a3923..7526df1d 100644 --- a/manifests/bases/notification-controller/kustomization.yaml +++ b/manifests/bases/notification-controller/kustomization.yaml @@ -4,6 +4,8 @@ resources: - https://github.com/fluxcd/notification-controller/releases/download/v0.26.0/notification-controller.crds.yaml - https://github.com/fluxcd/notification-controller/releases/download/v0.26.0/notification-controller.deployment.yaml - account.yaml +transformers: +- labels.yaml patchesJson6902: - target: group: apps diff --git a/manifests/bases/notification-controller/labels.yaml b/manifests/bases/notification-controller/labels.yaml new file mode 100644 index 00000000..4f6fdf07 --- /dev/null +++ b/manifests/bases/notification-controller/labels.yaml @@ -0,0 +1,9 @@ +apiVersion: builtin +kind: LabelTransformer +metadata: + name: labels +labels: + app.kubernetes.io/component: notification-controller +fieldSpecs: + - path: metadata/labels + create: true diff --git a/manifests/bases/source-controller/kustomization.yaml b/manifests/bases/source-controller/kustomization.yaml index c62cac6d..7089cc03 100644 --- a/manifests/bases/source-controller/kustomization.yaml +++ b/manifests/bases/source-controller/kustomization.yaml @@ -4,6 +4,8 @@ resources: - https://github.com/fluxcd/source-controller/releases/download/v0.29.0/source-controller.crds.yaml - https://github.com/fluxcd/source-controller/releases/download/v0.29.0/source-controller.deployment.yaml - account.yaml +transformers: +- labels.yaml patchesJson6902: - target: group: apps @@ -11,4 +13,3 @@ patchesJson6902: kind: Deployment name: source-controller path: patch.yaml - diff --git a/manifests/bases/source-controller/labels.yaml b/manifests/bases/source-controller/labels.yaml new file mode 100644 index 00000000..a7d9e0ad --- /dev/null +++ b/manifests/bases/source-controller/labels.yaml @@ -0,0 +1,9 @@ +apiVersion: builtin +kind: LabelTransformer +metadata: + name: labels +labels: + app.kubernetes.io/component: source-controller +fieldSpecs: + - path: metadata/labels + create: true