From cae399fabe34fb8eb5537c102632233403540b24 Mon Sep 17 00:00:00 2001 From: Daniel Pacak Date: Sat, 6 Nov 2021 23:05:53 +0100 Subject: [PATCH] chore(deploy): add recommended labels (#797) Signed-off-by: Daniel Pacak --- deploy/static/02-starboard-operator.rbac.yaml | 15 ++++++++++++++ .../static/03-starboard-operator.config.yaml | 20 +++++++++++++++---- .../04-starboard-operator.deployment.yaml | 19 ++++++++++++++---- 3 files changed, 46 insertions(+), 8 deletions(-) diff --git a/deploy/static/02-starboard-operator.rbac.yaml b/deploy/static/02-starboard-operator.rbac.yaml index 88ad4b37a..d4ac44663 100644 --- a/deploy/static/02-starboard-operator.rbac.yaml +++ b/deploy/static/02-starboard-operator.rbac.yaml @@ -4,11 +4,21 @@ kind: ServiceAccount metadata: name: starboard-operator namespace: starboard-system + labels: + app.kubernetes.io/name: starboard-operator + app.kubernetes.io/instance: starboard-operator + app.kubernetes.io/version: "0.13.0-rc2" + app.kubernetes.io/managed-by: kubectl --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: starboard-operator + labels: + app.kubernetes.io/name: starboard-operator + app.kubernetes.io/instance: starboard-operator + app.kubernetes.io/version: "0.13.0-rc2" + app.kubernetes.io/managed-by: kubectl rules: - apiGroups: - "" @@ -125,6 +135,11 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: starboard-operator + labels: + app.kubernetes.io/name: starboard-operator + app.kubernetes.io/instance: starboard-operator + app.kubernetes.io/version: "0.13.0-rc2" + app.kubernetes.io/managed-by: kubectl roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole diff --git a/deploy/static/03-starboard-operator.config.yaml b/deploy/static/03-starboard-operator.config.yaml index 80e24171b..1f419161d 100644 --- a/deploy/static/03-starboard-operator.config.yaml +++ b/deploy/static/03-starboard-operator.config.yaml @@ -5,7 +5,10 @@ metadata: name: starboard namespace: starboard-system labels: - "app.kubernetes.io/managed-by": "starboard" + app.kubernetes.io/name: starboard-operator + app.kubernetes.io/instance: starboard-operator + app.kubernetes.io/version: "0.13.0-rc2" + app.kubernetes.io/managed-by: kubectl data: vulnerabilityReports.scanner: Trivy configAuditReports.scanner: Polaris @@ -17,7 +20,10 @@ metadata: name: starboard namespace: starboard-system labels: - "app.kubernetes.io/managed-by": "starboard" + app.kubernetes.io/name: starboard-operator + app.kubernetes.io/instance: starboard-operator + app.kubernetes.io/version: "0.13.0-rc2" + app.kubernetes.io/managed-by: kubectl --- apiVersion: v1 kind: ConfigMap @@ -25,7 +31,10 @@ metadata: name: starboard-trivy-config namespace: starboard-system labels: - "app.kubernetes.io/managed-by": "starboard" + app.kubernetes.io/name: starboard-operator + app.kubernetes.io/instance: starboard-operator + app.kubernetes.io/version: "0.13.0-rc2" + app.kubernetes.io/managed-by: kubectl data: trivy.imageRef: docker.io/aquasec/trivy:0.20.0 trivy.severity: UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL @@ -41,7 +50,10 @@ metadata: name: starboard-polaris-config namespace: starboard-system labels: - "app.kubernetes.io/managed-by": "starboard" + app.kubernetes.io/name: starboard-operator + app.kubernetes.io/instance: starboard-operator + app.kubernetes.io/version: "0.13.0-rc2" + app.kubernetes.io/managed-by: kubectl data: polaris.imageRef: quay.io/fairwinds/polaris:4.2 polaris.resources.requests.cpu: "50m" diff --git a/deploy/static/04-starboard-operator.deployment.yaml b/deploy/static/04-starboard-operator.deployment.yaml index fdfc01874..fef192351 100644 --- a/deploy/static/04-starboard-operator.deployment.yaml +++ b/deploy/static/04-starboard-operator.deployment.yaml @@ -4,6 +4,11 @@ kind: Service metadata: name: starboard-operator namespace: starboard-system + labels: + app.kubernetes.io/name: starboard-operator + app.kubernetes.io/instance: starboard-operator + app.kubernetes.io/version: "0.13.0-rc2" + app.kubernetes.io/managed-by: kubectl annotations: prometheus.io/path: /metrics prometheus.io/scrape: "true" @@ -14,7 +19,8 @@ spec: targetPort: metrics name: metrics selector: - app: starboard-operator + app.kubernetes.io/name: starboard-operator + app.kubernetes.io/instance: starboard-operator --- apiVersion: apps/v1 kind: Deployment @@ -22,18 +28,23 @@ metadata: name: starboard-operator namespace: starboard-system labels: - app: starboard-operator + app.kubernetes.io/name: starboard-operator + app.kubernetes.io/instance: starboard-operator + app.kubernetes.io/version: "0.13.0-rc2" + app.kubernetes.io/managed-by: kubectl spec: replicas: 1 strategy: type: Recreate selector: matchLabels: - app: starboard-operator + app.kubernetes.io/name: starboard-operator + app.kubernetes.io/instance: starboard-operator template: metadata: labels: - app: starboard-operator + app.kubernetes.io/name: starboard-operator + app.kubernetes.io/instance: starboard-operator spec: serviceAccountName: starboard-operator automountServiceAccountToken: true