From 850d4263356e36e8349b5cc119999653722db1e7 Mon Sep 17 00:00:00 2001 From: Rob Watson Date: Sun, 5 Jun 2022 17:44:52 +0200 Subject: [PATCH] Update labels --- deploy/base/deploy-drone-runner.yaml | 8 ++++++-- deploy/base/deploy-drone.yaml | 8 ++++++-- deploy/base/deploy-element.yaml | 8 ++++++-- deploy/base/deploy-invidious.yaml | 8 ++++++-- deploy/base/role-drone-runner.yaml | 2 ++ deploy/base/statefulset-gitea.yaml | 8 ++++++-- deploy/base/svc-drone.yaml | 1 + deploy/base/svc-element.yaml | 1 + deploy/base/svc-invidious.yaml | 1 + deploy/dev/kustomization.yaml | 19 ++++++++++++++++++- deploy/prod/kustomization.yaml | 19 ++++++++++++++++++- 11 files changed, 71 insertions(+), 12 deletions(-) diff --git a/deploy/base/deploy-drone-runner.yaml b/deploy/base/deploy-drone-runner.yaml index 2c912ea..a8d65c9 100644 --- a/deploy/base/deploy-drone-runner.yaml +++ b/deploy/base/deploy-drone-runner.yaml @@ -3,16 +3,20 @@ kind: Deployment metadata: name: drone-runner labels: + app: drone + component: runner app.kubernetes.io/name: drone-runner app.kubernetes.io/instance: drone-runner spec: selector: matchLabels: - app.kubernetes.io/name: drone-runner - app.kubernetes.io/instance: drone-runner + app: drone + component: runner template: metadata: labels: + app: drone + component: runner app.kubernetes.io/name: drone-runner app.kubernetes.io/instance: drone-runner spec: diff --git a/deploy/base/deploy-drone.yaml b/deploy/base/deploy-drone.yaml index 561be1b..1ef5285 100644 --- a/deploy/base/deploy-drone.yaml +++ b/deploy/base/deploy-drone.yaml @@ -3,16 +3,20 @@ kind: Deployment metadata: name: drone labels: + app: drone + component: web app.kubernetes.io/name: drone app.kubernetes.io/instance: drone spec: selector: matchLabels: - app.kubernetes.io/name: drone - app.kubernetes.io/instance: drone + app: drone + component: web template: metadata: labels: + app: drone + component: web app.kubernetes.io/name: drone app.kubernetes.io/instance: drone spec: diff --git a/deploy/base/deploy-element.yaml b/deploy/base/deploy-element.yaml index ae891d2..c9db096 100644 --- a/deploy/base/deploy-element.yaml +++ b/deploy/base/deploy-element.yaml @@ -3,16 +3,20 @@ kind: Deployment metadata: name: element labels: + app: element + component: web app.kubernetes.io/name: element app.kubernetes.io/instance: element spec: selector: matchLabels: - app.kubernetes.io/name: element - app.kubernetes.io/instance: element + app: element + component: web template: metadata: labels: + app: element + component: web app.kubernetes.io/name: element app.kubernetes.io/instance: element spec: diff --git a/deploy/base/deploy-invidious.yaml b/deploy/base/deploy-invidious.yaml index 9f76db3..a3a3488 100644 --- a/deploy/base/deploy-invidious.yaml +++ b/deploy/base/deploy-invidious.yaml @@ -3,16 +3,20 @@ kind: Deployment metadata: name: invidious labels: + app: invidious + component: web app.kubernetes.io/name: invidious app.kubernetes.io/instance: invidious spec: selector: matchLabels: - app.kubernetes.io/name: invidious - app.kubernetes.io/instance: invidious + app: invidious + component: web template: metadata: labels: + app: invidious + component: web app.kubernetes.io/name: invidious app.kubernetes.io/instance: invidious spec: diff --git a/deploy/base/role-drone-runner.yaml b/deploy/base/role-drone-runner.yaml index 0c7af48..2fe906b 100644 --- a/deploy/base/role-drone-runner.yaml +++ b/deploy/base/role-drone-runner.yaml @@ -3,6 +3,8 @@ apiVersion: rbac.authorization.k8s.io/v1 metadata: namespace: default name: drone-runner + labels: + app: drone rules: - apiGroups: - "" diff --git a/deploy/base/statefulset-gitea.yaml b/deploy/base/statefulset-gitea.yaml index 2902b29..fa63d28 100644 --- a/deploy/base/statefulset-gitea.yaml +++ b/deploy/base/statefulset-gitea.yaml @@ -3,17 +3,21 @@ kind: StatefulSet metadata: name: gitea labels: + app: gitea + component: web app.kubernetes.io/name: gitea app.kubernetes.io/instance: gitea spec: serviceName: gitea selector: matchLabels: - app.kubernetes.io/name: gitea - app.kubernetes.io/instance: gitea + app: gitea + component: web template: metadata: labels: + app: gitea + component: web app.kubernetes.io/name: gitea app.kubernetes.io/instance: gitea annotations: diff --git a/deploy/base/svc-drone.yaml b/deploy/base/svc-drone.yaml index 7eb080c..09144ff 100644 --- a/deploy/base/svc-drone.yaml +++ b/deploy/base/svc-drone.yaml @@ -2,6 +2,7 @@ apiVersion: v1 kind: Service metadata: labels: + app: drone app.kubernetes.io/instance: drone app.kubernetes.io/name: drone name: drone diff --git a/deploy/base/svc-element.yaml b/deploy/base/svc-element.yaml index 894577d..b1ba68c 100644 --- a/deploy/base/svc-element.yaml +++ b/deploy/base/svc-element.yaml @@ -2,6 +2,7 @@ apiVersion: v1 kind: Service metadata: labels: + app: element app.kubernetes.io/instance: element app.kubernetes.io/name: element name: element diff --git a/deploy/base/svc-invidious.yaml b/deploy/base/svc-invidious.yaml index 78d6dac..3fd2990 100644 --- a/deploy/base/svc-invidious.yaml +++ b/deploy/base/svc-invidious.yaml @@ -3,6 +3,7 @@ apiVersion: v1 kind: Service metadata: labels: + app: invidious app.kubernetes.io/instance: invidious app.kubernetes.io/name: invidious name: invidious diff --git a/deploy/dev/kustomization.yaml b/deploy/dev/kustomization.yaml index 22346f5..b877f8e 100644 --- a/deploy/dev/kustomization.yaml +++ b/deploy/dev/kustomization.yaml @@ -30,9 +30,15 @@ configMapGenerator: - name: invidious-config files: - config.yml=invidious-config.yaml + options: + labels: + app: invidious - name: element-config files: - config.json=element-config.json + options: + labels: + app: element - name: drone-config literals: # For Gitea/drone integration to work in dev, Gitea must be served from the @@ -43,7 +49,9 @@ configMapGenerator: - rpc-host=dev-drone - rpc-proto=http - logs-debug=false - + options: + labels: + app: drone secretGenerator: - name: grafana-credentials literals: @@ -58,6 +66,9 @@ secretGenerator: - database-name=invidious - database-user=kemal - database-password=kemal + options: + labels: + app: invidious - name: gitea-config literals: - admin-username=rob @@ -65,12 +76,18 @@ secretGenerator: - admin-email=mail@localhost files: - config.ini=gitea-config.ini + options: + labels: + app: gitea - name: drone-credentials literals: - database-url=postgres://postgres:postgres@dev-db:5432/drone?sslmode=disable - gitea-client-id=55847c4a-c80e-4e77-ab36-c6d102273115 - gitea-client-secret=IU4cb59RNNLuI9PRkUbldcEQ5wYPEZMBK5s6p7vTdVfe - rpc-secret=f5ec349109bb9bbdf00e4394afd28754 + options: + labels: + app: drone - name: synapse-config files: - homeserver.yaml=synapse-homeserver.yaml diff --git a/deploy/prod/kustomization.yaml b/deploy/prod/kustomization.yaml index 92b684d..030a9ce 100644 --- a/deploy/prod/kustomization.yaml +++ b/deploy/prod/kustomization.yaml @@ -18,9 +18,15 @@ configMapGenerator: - name: invidious-config files: - config.yml=invidious-config.yaml + options: + labels: + app: invidious - name: element-config files: - config.json=element-config.json + options: + labels: + app: element - name: drone-config literals: - gitea-server=https://git.netflux.io @@ -29,7 +35,9 @@ configMapGenerator: - rpc-host=drone.netflux.io - rpc-proto=https - logs-debug=false - + options: + labels: + app: drone secretGenerator: - name: prometheus-credentials files: @@ -48,18 +56,27 @@ secretGenerator: files: - database-url=secrets/invidious-database-url - database-password=secrets/invidious-database-password + options: + labels: + app: invidious - name: gitea-config files: - admin-username=secrets/gitea-admin-username - admin-password=secrets/gitea-admin-password - admin-email=secrets/gitea-admin-email - config.ini=secrets/gitea-config.ini + options: + labels: + app: gitea - name: drone-credentials files: - database-url=secrets/drone-database-url - gitea-client-id=secrets/drone-gitea-client-id - gitea-client-secret=secrets/drone-gitea-client-secret - rpc-secret=secrets/drone-rpc-secret + options: + labels: + app: drone - name: synapse-config files: - homeserver.yaml=secrets/synapse-homeserver.yaml