mirror of
https://github.com/bitnami/charts.git
synced 2026-03-14 14:57:22 +08:00
* [bitnami/metrics-server] add topologySpreadConstraints Add support for pod topologySpreadConstraints https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ * Fix wrong defaults and documentation
71 lines
3.2 KiB
YAML
71 lines
3.2 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ template "common.names.fullname" . }}
|
|
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
|
spec:
|
|
replicas: {{ .Values.replicas }}
|
|
selector:
|
|
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
labels: {{- include "common.labels.standard" . | nindent 8 }}
|
|
{{- if .Values.podAnnotations }}
|
|
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.podAnnotations "context" $) | nindent 8 }}
|
|
{{- end }}
|
|
spec:
|
|
{{- include "metrics-server.imagePullSecrets" . | nindent 6 }}
|
|
{{- if .Values.priorityClassName }}
|
|
priorityClassName: {{ .Values.priorityClassName | quote }}
|
|
{{- end }}
|
|
serviceAccountName: {{ template "metrics-server.serviceAccountName" . }}
|
|
{{- if .Values.affinity }}
|
|
affinity: {{- include "common.tplvalues.render" (dict "value" .Values.affinity "context" $) | nindent 8 }}
|
|
{{- else }}
|
|
affinity:
|
|
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "context" $) | nindent 10 }}
|
|
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "context" $) | nindent 10 }}
|
|
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.nodeAffinityPreset.type "key" .Values.nodeAffinityPreset.key "values" .Values.nodeAffinityPreset.values) | nindent 10 }}
|
|
{{- end }}
|
|
{{- if .Values.topologySpreadConstraints }}
|
|
topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.topologySpreadConstraints "context" $) | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.nodeSelector }}
|
|
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.nodeSelector "context" $) | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.hostAliases }}
|
|
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.hostAliases "context" $) | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.tolerations }}
|
|
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.tolerations "context" $) | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.hostNetwork }}
|
|
hostNetwork: true
|
|
{{- end }}
|
|
containers:
|
|
- name: metrics-server
|
|
image: {{ template "metrics-server.image" . }}
|
|
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
|
ports:
|
|
- name: https
|
|
containerPort: {{ .Values.securePort }}
|
|
command:
|
|
- metrics-server
|
|
- --secure-port={{ .Values.securePort }}
|
|
{{- range $key, $value := .Values.extraArgs }}
|
|
{{- if $value }}
|
|
- --{{ $key }}={{ $value }}
|
|
{{- else }}
|
|
- --{{ $key }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.resources }}
|
|
resources: {{- toYaml .Values.resources | nindent 12 }}
|
|
{{- end }}
|
|
{{- if .Values.extraVolumeMounts }}
|
|
volumeMounts: {{- toYaml .Values.extraVolumeMounts | nindent 12 }}
|
|
{{- end }}
|
|
{{- if .Values.extraVolumes }}
|
|
volumes: {{- toYaml .Values.extraVolumes | nindent 8 }}
|
|
{{- end }}
|