Fix up multicluster component labels (#4806)

Fixes #4511

Add the `linkerd.io/control-plane-component: gateway` label to the multicluster gateway.  Change the value of `linkerd.io/control-plane-component` from `linkerd-service-mirror` to `service-mirror` for the service mirror controller.

These changes are for consistency and should not result in any change in functionality.

Signed-off-by: Alex Leong <alex@buoyant.io>
This commit is contained in:
Alex Leong 2020-08-11 17:02:20 -07:00 committed by GitHub
parent 729abf7f72
commit 6ef9cab3d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 6 deletions

View File

@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: linkerd-service-mirror-access-local-resources-{{.Values.targetClusterName}}
labels:
{{.Values.controllerComponentLabel}}: linkerd-service-mirror
{{.Values.controllerComponentLabel}}: service-mirror
mirror.linkerd.io/cluster-name: {{.Values.targetClusterName}}
rules:
- apiGroups: [""]
@ -19,7 +19,7 @@ apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: linkerd-service-mirror-access-local-resources-{{.Values.targetClusterName}}
labels:
{{.Values.controllerComponentLabel}}: linkerd-service-mirror
{{.Values.controllerComponentLabel}}: service-mirror
mirror.linkerd.io/cluster-name: {{.Values.targetClusterName}}
roleRef:
apiGroup: rbac.authorization.k8s.io
@ -36,7 +36,7 @@ metadata:
name: linkerd-service-mirror-read-remote-creds-{{.Values.targetClusterName}}
namespace: {{.Values.namespace}}
labels:
{{.Values.controllerComponentLabel}}: linkerd-service-mirror
{{.Values.controllerComponentLabel}}: service-mirror
mirror.linkerd.io/cluster-name: {{.Values.targetClusterName}}
rules:
- apiGroups: [""]
@ -53,7 +53,7 @@ metadata:
name: linkerd-service-mirror-read-remote-creds-{{.Values.targetClusterName}}
namespace: {{.Values.namespace}}
labels:
{{.Values.controllerComponentLabel}}: linkerd-service-mirror
{{.Values.controllerComponentLabel}}: service-mirror
mirror.linkerd.io/cluster-name: {{.Values.targetClusterName}}
roleRef:
apiGroup: rbac.authorization.k8s.io
@ -70,14 +70,14 @@ metadata:
name: linkerd-service-mirror-{{.Values.targetClusterName}}
namespace: {{.Values.namespace}}
labels:
{{.Values.controllerComponentLabel}}: linkerd-service-mirror
{{.Values.controllerComponentLabel}}: service-mirror
mirror.linkerd.io/cluster-name: {{.Values.targetClusterName}}
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
{{.Values.controllerComponentLabel}}: linkerd-service-mirror
{{.Values.controllerComponentLabel}}: service-mirror
mirror.linkerd.io/cluster-name: {{.Values.targetClusterName}}
name: linkerd-service-mirror-{{.Values.targetClusterName}}
namespace: {{.Values.namespace}}

View File

@ -4,6 +4,8 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{.Values.gatewayName}}-config
labels:
{{.Values.controllerComponentLabel}}: gateway
annotations:
{{.Values.createdByAnnotation}}: {{default (printf "linkerd/helm %s" .Values.linkerdVersion) .Values.cliVersion}}
namespace: {{.Values.namespace}}
@ -54,6 +56,7 @@ metadata:
app.kubernetes.io/name: gateway
app.kubernetes.io/part-of: Linkerd
app.kubernetes.io/version: {{.Values.linkerdVersion}}
{{.Values.controllerComponentLabel}}: gateway
app: {{.Values.gatewayName}}
name: {{.Values.gatewayName}}
namespace: {{.Values.namespace}}
@ -117,6 +120,7 @@ metadata:
mirror.linkerd.io/probe-period: "{{.Values.gatewayProbeSeconds}}"
mirror.linkerd.io/probe-path: {{.Values.gatewayProbePath}}
mirror.linkerd.io/multicluster-gateway: "true"
{{.Values.controllerComponentLabel}}: gateway
{{.Values.createdByAnnotation}}: {{default (printf "linkerd/helm %s" .Values.linkerdVersion) .Values.cliVersion}}
spec:
ports:

View File

@ -1,3 +1,4 @@
controllerComponentLabel: linkerd.io/control-plane-component
createdByAnnotation: linkerd.io/created-by
gateway: true
gatewayLocalProbePath: /health-local