mirror of
https://github.com/mastodon/chart
synced 2025-03-14 21:11:50 +00:00
Better control of labels/annotations for deployments and pods (#149)
This commit is contained in:
parent
ba7a1de157
commit
fd0366d059
|
@ -15,7 +15,7 @@ type: application
|
||||||
# This is the chart version. This version number should be incremented each time
|
# This is the chart version. This version number should be incremented each time
|
||||||
# you make changes to the chart and its templates, including the app version.
|
# you make changes to the chart and its templates, including the app version.
|
||||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||||
version: 5.3.3
|
version: 5.4.0
|
||||||
|
|
||||||
# This is the version number of the application being deployed. This version number should be
|
# This is the version number of the application being deployed. This version number should be
|
||||||
# incremented each time you make changes to the application. Versions are not expected to
|
# incremented each time you make changes to the application. Versions are not expected to
|
||||||
|
|
|
@ -7,12 +7,18 @@ metadata:
|
||||||
name: {{ include "mastodon.fullname" $context }}-sidekiq-{{ .name }}
|
name: {{ include "mastodon.fullname" $context }}-sidekiq-{{ .name }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "mastodon.labels" $context | nindent 4 }}
|
{{- include "mastodon.labels" $context | nindent 4 }}
|
||||||
|
{{- with $context.Values.mastodon.sidekiq.labels }}
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
app.kubernetes.io/component: sidekiq-{{ .name }}
|
app.kubernetes.io/component: sidekiq-{{ .name }}
|
||||||
app.kubernetes.io/part-of: rails
|
app.kubernetes.io/part-of: rails
|
||||||
annotations:
|
annotations:
|
||||||
{{- with $context.Values.deploymentAnnotations }}
|
{{- with $context.Values.deploymentAnnotations }}
|
||||||
{{- toYaml . | nindent 4 }}
|
{{- toYaml . | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- with $context.Values.mastodon.sidekiq.annotations }}
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
{{- if (has "scheduler" .queues) }}
|
{{- if (has "scheduler" .queues) }}
|
||||||
{{- if (gt (int .replicas) 1) }}
|
{{- if (gt (int .replicas) 1) }}
|
||||||
|
@ -37,6 +43,9 @@ spec:
|
||||||
{{- with $context.Values.podAnnotations }}
|
{{- with $context.Values.podAnnotations }}
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- with $context.Values.mastodon.sidekiq.podAnnotations }}
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
# roll the pods to pick up any db migrations or other changes
|
# roll the pods to pick up any db migrations or other changes
|
||||||
{{- include "mastodon.rollingPodAnnotations" $context | nindent 8 }}
|
{{- include "mastodon.rollingPodAnnotations" $context | nindent 8 }}
|
||||||
checksum/config-secrets-smtp: {{ include ( print $.Template.BasePath "/secret-smtp.yaml" ) $context | sha256sum | quote }}
|
checksum/config-secrets-smtp: {{ include ( print $.Template.BasePath "/secret-smtp.yaml" ) $context | sha256sum | quote }}
|
||||||
|
@ -44,6 +53,9 @@ spec:
|
||||||
{{- include "mastodon.globalLabels" $context | nindent 8 }}
|
{{- include "mastodon.globalLabels" $context | nindent 8 }}
|
||||||
{{- include "mastodon.selectorLabels" $context | nindent 8 }}
|
{{- include "mastodon.selectorLabels" $context | nindent 8 }}
|
||||||
{{- include "mastodon.statsdExporterLabels" $context | nindent 8 }}
|
{{- include "mastodon.statsdExporterLabels" $context | nindent 8 }}
|
||||||
|
{{- with $context.Values.mastodon.sidekiq.podLabels }}
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
app.kubernetes.io/component: sidekiq-{{ .name }}
|
app.kubernetes.io/component: sidekiq-{{ .name }}
|
||||||
app.kubernetes.io/part-of: rails
|
app.kubernetes.io/part-of: rails
|
||||||
spec:
|
spec:
|
||||||
|
|
|
@ -4,8 +4,14 @@ metadata:
|
||||||
name: {{ include "mastodon.fullname" . }}-streaming
|
name: {{ include "mastodon.fullname" . }}-streaming
|
||||||
labels:
|
labels:
|
||||||
{{- include "mastodon.labels" . | nindent 4 }}
|
{{- include "mastodon.labels" . | nindent 4 }}
|
||||||
|
{{- with .Values.mastodon.streaming.labels }}
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
annotations:
|
annotations:
|
||||||
{{- with (default .Values.deploymentAnnotations .Values.mastodon.streaming.deploymentAnnotations) }}
|
{{- with .Values.deploymentAnnotations }}
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.mastodon.streaming.annotations }}
|
||||||
{{- toYaml . | nindent 4 }}
|
{{- toYaml . | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
|
@ -13,8 +19,8 @@ spec:
|
||||||
{{- if (ne (toString .Values.mastodon.revisionHistoryLimit) "<nil>") }}
|
{{- if (ne (toString .Values.mastodon.revisionHistoryLimit) "<nil>") }}
|
||||||
revisionHistoryLimit: {{ .Values.mastodon.revisionHistoryLimit }}
|
revisionHistoryLimit: {{ .Values.mastodon.revisionHistoryLimit }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.mastodon.web.updateStrategy }}
|
{{- if .Values.mastodon.streaming.updateStrategy }}
|
||||||
strategy: {{- toYaml .Values.mastodon.web.updateStrategy | nindent 4 }}
|
strategy: {{- toYaml .Values.mastodon.streaming.updateStrategy | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
|
@ -23,7 +29,10 @@ spec:
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
annotations:
|
annotations:
|
||||||
{{- with (default .Values.podAnnotations .Values.mastodon.streaming.podAnnotations) }}
|
{{- with .Values.podAnnotations }}
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.mastodon.streaming.podAnnotations }}
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
# roll the pods to pick up any db migrations or other changes
|
# roll the pods to pick up any db migrations or other changes
|
||||||
|
@ -31,6 +40,9 @@ spec:
|
||||||
labels:
|
labels:
|
||||||
{{- include "mastodon.globalLabels" . | nindent 8 }}
|
{{- include "mastodon.globalLabels" . | nindent 8 }}
|
||||||
{{- include "mastodon.selectorLabels" . | nindent 8 }}
|
{{- include "mastodon.selectorLabels" . | nindent 8 }}
|
||||||
|
{{- with .Values.mastodon.streaming.podLabels }}
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
app.kubernetes.io/component: streaming
|
app.kubernetes.io/component: streaming
|
||||||
spec:
|
spec:
|
||||||
{{- with .Values.imagePullSecrets }}
|
{{- with .Values.imagePullSecrets }}
|
||||||
|
|
|
@ -4,8 +4,14 @@ metadata:
|
||||||
name: {{ include "mastodon.fullname" . }}-web
|
name: {{ include "mastodon.fullname" . }}-web
|
||||||
labels:
|
labels:
|
||||||
{{- include "mastodon.labels" . | nindent 4 }}
|
{{- include "mastodon.labels" . | nindent 4 }}
|
||||||
|
{{- with .Values.mastodon.web.labels }}
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
annotations:
|
annotations:
|
||||||
{{- with (default .Values.deploymentAnnotations .Values.mastodon.web.deploymentAnnotations) }}
|
{{- with .Values.deploymentAnnotations }}
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.mastodon.web.annotations }}
|
||||||
{{- toYaml . | nindent 4 }}
|
{{- toYaml . | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
|
@ -24,7 +30,10 @@ spec:
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
annotations:
|
annotations:
|
||||||
{{- with (default .Values.podAnnotations .Values.mastodon.web.podAnnotations) }}
|
{{- with .Values.podAnnotations }}
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.mastodon.web.podAnnotations }}
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
# roll the pods to pick up any db migrations or other changes
|
# roll the pods to pick up any db migrations or other changes
|
||||||
|
@ -33,6 +42,9 @@ spec:
|
||||||
{{- include "mastodon.globalLabels" . | nindent 8 }}
|
{{- include "mastodon.globalLabels" . | nindent 8 }}
|
||||||
{{- include "mastodon.selectorLabels" . | nindent 8 }}
|
{{- include "mastodon.selectorLabels" . | nindent 8 }}
|
||||||
{{- include "mastodon.statsdExporterLabels" . | nindent 8 }}
|
{{- include "mastodon.statsdExporterLabels" . | nindent 8 }}
|
||||||
|
{{- with .Values.mastodon.web.podLabels }}
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
app.kubernetes.io/component: web
|
app.kubernetes.io/component: web
|
||||||
app.kubernetes.io/part-of: rails
|
app.kubernetes.io/part-of: rails
|
||||||
spec:
|
spec:
|
||||||
|
|
36
values.yaml
36
values.yaml
|
@ -141,6 +141,18 @@ mastodon:
|
||||||
resources: {}
|
resources: {}
|
||||||
# -- Affinity for all Sidekiq Deployments unless overwritten, overwrites .Values.affinity
|
# -- Affinity for all Sidekiq Deployments unless overwritten, overwrites .Values.affinity
|
||||||
affinity: {}
|
affinity: {}
|
||||||
|
# -- Annotations to apply to the deployment object(s) for sidekiq.
|
||||||
|
# -- These are applied in addition to deploymentAnnotations.
|
||||||
|
annotations: {}
|
||||||
|
# -- Labels to apply to the deployment object(s) for sidekiq.
|
||||||
|
# -- These are applied in addition to mastodon.labels.
|
||||||
|
labels: {}
|
||||||
|
# -- Annotations to apply to the sidekiq pods.
|
||||||
|
# -- These are applied in addition to the global podAnnotations.
|
||||||
|
podAnnotations: {}
|
||||||
|
# -- Labels to apply to the sidekiq pods.
|
||||||
|
# -- These are applied in addition to mastodon.labels.
|
||||||
|
podLabels: {}
|
||||||
# Rollout strategy to use when updating pods.
|
# Rollout strategy to use when updating pods.
|
||||||
# Recreate will help reduce the number of retried jobs when updating when
|
# Recreate will help reduce the number of retried jobs when updating when
|
||||||
# the code introduces a new job as the pods are all replaced immediately.
|
# the code introduces a new job as the pods are all replaced immediately.
|
||||||
|
@ -255,6 +267,18 @@ mastodon:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
# -- Affinity for Streaming Pods, overwrites .Values.affinity
|
# -- Affinity for Streaming Pods, overwrites .Values.affinity
|
||||||
affinity: {}
|
affinity: {}
|
||||||
|
# -- Annotations to apply to the deployment object for streaming.
|
||||||
|
# -- These are applied in addition to deploymentAnnotations.
|
||||||
|
annotations: {}
|
||||||
|
# -- Labels to apply to the deployment object for streaming.
|
||||||
|
# -- These are applied in addition to mastodon.labels.
|
||||||
|
labels: {}
|
||||||
|
# -- Annotations to apply to the streaming pods.
|
||||||
|
# -- These are applied in addition to the global podAnnotations.
|
||||||
|
podAnnotations: {}
|
||||||
|
# -- Labels to apply to the streaming pods.
|
||||||
|
# -- These are applied in addition to mastodon.labels.
|
||||||
|
podLabels: {}
|
||||||
# Rollout strategy to use when updating pods
|
# Rollout strategy to use when updating pods
|
||||||
# ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy
|
# ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy
|
||||||
updateStrategy:
|
updateStrategy:
|
||||||
|
@ -301,6 +325,18 @@ mastodon:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
# -- Affinity for Web Pods, overwrites .Values.affinity
|
# -- Affinity for Web Pods, overwrites .Values.affinity
|
||||||
affinity: {}
|
affinity: {}
|
||||||
|
# -- Annotations to apply to the deployment object for web.
|
||||||
|
# -- These are applied in addition to deploymentAnnotations.
|
||||||
|
annotations: {}
|
||||||
|
# -- Labels to apply to the deployment object for web.
|
||||||
|
# -- These are applied in addition to mastodon.labels.
|
||||||
|
labels: {}
|
||||||
|
# -- Annotations to apply to the web pods.
|
||||||
|
# -- These are applied in addition to the global podAnnotations.
|
||||||
|
podAnnotations: {}
|
||||||
|
# -- Labels to apply to the web pods.
|
||||||
|
# -- These are applied in addition to mastodon.labels.
|
||||||
|
podLabels: {}
|
||||||
# Rollout strategy to use when updating pods
|
# Rollout strategy to use when updating pods
|
||||||
# ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy
|
# ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy
|
||||||
updateStrategy:
|
updateStrategy:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user