Assign unique set of labels to k8s deployments #19703 (#19706)

This commit is contained in:
Alex Nordlund 2022-11-08 17:21:06 +01:00 committed by GitHub
parent f4b78028a3
commit 476e74b4c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 18 additions and 10 deletions

View file

@ -27,7 +27,7 @@ spec:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: component
- key: app.kubernetes.io/part-of
operator: In
values:
- rails

View file

@ -11,7 +11,8 @@ spec:
selector:
matchLabels:
{{- include "mastodon.selectorLabels" . | nindent 6 }}
component: rails
app.kubernetes.io/component: sidekiq
app.kubernetes.io/part-of: rails
template:
metadata:
annotations:
@ -22,7 +23,8 @@ spec:
rollme: {{ randAlphaNum 5 | quote }}
labels:
{{- include "mastodon.selectorLabels" . | nindent 8 }}
component: rails
app.kubernetes.io/component: sidekiq
app.kubernetes.io/part-of: rails
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
@ -40,7 +42,7 @@ spec:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: component
- key: app.kubernetes.io/part-of
operator: In
values:
- rails

View file

@ -11,6 +11,7 @@ spec:
selector:
matchLabels:
{{- include "mastodon.selectorLabels" . | nindent 6 }}
app.kubernetes.io/component: streaming
template:
metadata:
{{- with .Values.podAnnotations }}
@ -19,6 +20,7 @@ spec:
{{- end }}
labels:
{{- include "mastodon.selectorLabels" . | nindent 8 }}
app.kubernetes.io/component: streaming
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:

View file

@ -11,7 +11,8 @@ spec:
selector:
matchLabels:
{{- include "mastodon.selectorLabels" . | nindent 6 }}
component: rails
app.kubernetes.io/component: web
app.kubernetes.io/part-of: rails
template:
metadata:
annotations:
@ -22,7 +23,8 @@ spec:
rollme: {{ randAlphaNum 5 | quote }}
labels:
{{- include "mastodon.selectorLabels" . | nindent 8 }}
component: rails
app.kubernetes.io/component: web
app.kubernetes.io/part-of: rails
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:

View file

@ -27,7 +27,7 @@ spec:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: component
- key: app.kubernetes.io/part-of
operator: In
values:
- rails

View file

@ -28,7 +28,7 @@ spec:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: component
- key: app.kubernetes.io/part-of
operator: In
values:
- rails

View file

@ -28,7 +28,7 @@ spec:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: component
- key: app.kubernetes.io/part-of
operator: In
values:
- rails

View file

@ -27,7 +27,7 @@ spec:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: component
- key: app.kubernetes.io/part-of
operator: In
values:
- rails

View file

@ -13,3 +13,4 @@ spec:
name: streaming
selector:
{{- include "mastodon.selectorLabels" . | nindent 4 }}
app.kubernetes.io/component: streaming

View file

@ -13,3 +13,4 @@ spec:
name: http
selector:
{{- include "mastodon.selectorLabels" . | nindent 4 }}
app.kubernetes.io/component: web