205 lines
7.1 KiB
YAML
205 lines
7.1 KiB
YAML
{{- if .Values.deployment.enabled }}
|
|
{{- $scrapeConfName := (include "meesho.scrapeConfName" .) -}}
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "chart.fullname" . }}
|
|
namespace: {{ .Release.Namespace }}
|
|
labels:
|
|
{{- include "chart.labels" . | nindent 4 }}
|
|
{{- with .Values.extraLabels }}
|
|
{{ toYaml . | indent 4 }}
|
|
{{- end }}
|
|
{{- with .Values.annotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
replicas: {{ .Values.replicaCount }}
|
|
minReadySeconds: {{ .Values.deployment.minReadySeconds }}
|
|
progressDeadlineSeconds: {{ .Values.deployment.progressDeadlineSeconds }}
|
|
{{- with .Values.deployment.strategy }}
|
|
strategy:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "chart.selectorLabels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
{{- include "chart.selectorLabels" . | nindent 8 }}
|
|
{{- with .Values.extraLabels }}
|
|
{{ toYaml . | indent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.podLabels }}
|
|
{{ toYaml . | indent 8 }}
|
|
{{- end }}
|
|
annotations:
|
|
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
|
|
{{- range $key, $value := .Values.podAnnotations }}
|
|
{{ $key }}: {{ $value | quote }}
|
|
{{- end }}
|
|
spec:
|
|
{{- if .Values.topologySpreadConstraints }}
|
|
topologySpreadConstraints:
|
|
{{ toYaml .Values.topologySpreadConstraints | indent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
serviceAccountName: {{ include "chart.serviceAccountName" . }}
|
|
securityContext:
|
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
|
containers:
|
|
- name: {{ .Chart.Name }}
|
|
securityContext:
|
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
|
image: "{{ .Values.image.repository }}:{{ default .Chart.AppVersion .Values.image.tag }}"
|
|
workingDir: {{ .Values.containerWorkingDir }}
|
|
args:
|
|
- -promscrape.config=/config/{{ $scrapeConfName }}
|
|
- -remoteWrite.tmpDataPath=/tmpData
|
|
- -promscrape.streamParse
|
|
- -promscrape.suppressScrapeErrors
|
|
- -promscrape.suppressDuplicateScrapeTargetErrors
|
|
{{- range .Values.remoteWriteUrls }}
|
|
- -remoteWrite.url={{ . }}
|
|
{{- end }}
|
|
{{- range .Values.multiTenantUrls }}
|
|
- -remoteWrite.multitenantURL={{ . }}
|
|
{{- end }}
|
|
{{- range $key, $value := .Values.extraArgs }}
|
|
- -{{ $key }}={{ $value }}
|
|
{{- end }}
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
ports:
|
|
- name: http
|
|
containerPort: 8429
|
|
{{- if .Values.extraArgs.graphiteListenAddr }}
|
|
- name: graphite-tcp
|
|
protocol: TCP
|
|
containerPort: {{ include "split-host-port" .Values.extraArgs.graphiteListenAddr }}
|
|
{{- end }}
|
|
{{- if .Values.extraArgs.graphiteListenAddr }}
|
|
- name: graphite-udp
|
|
protocol: UDP
|
|
containerPort: {{ include "split-host-port" .Values.extraArgs.graphiteListenAddr }}
|
|
{{- end }}
|
|
{{- if .Values.extraArgs.influxListenAddr }}
|
|
- name: influx-tcp
|
|
protocol: TCP
|
|
containerPort: {{ include "split-host-port" .Values.extraArgs.influxListenAddr }}
|
|
{{- end }}
|
|
{{- if .Values.extraArgs.influxListenAddr }}
|
|
- name: influx-udp
|
|
protocol: UDP
|
|
containerPort: {{ include "split-host-port" .Values.extraArgs.influxListenAddr }}
|
|
{{- end }}
|
|
{{- if .Values.extraArgs.opentsdbHTTPListenAddr }}
|
|
- name: opentsdbhttp
|
|
protocol: TCP
|
|
containerPort: {{ include "split-host-port" .Values.extraArgs.opentsdbHTTPListenAddr }}
|
|
{{- end }}
|
|
{{- if .Values.extraArgs.opentsdbListenAddr }}
|
|
- name: opentsdb-tcp
|
|
protocol: TCP
|
|
containerPort: {{ include "split-host-port" .Values.extraArgs.opentsdbListenAddr }}
|
|
{{- end }}
|
|
{{- if .Values.extraArgs.opentsdbListenAddr }}
|
|
- name: opentsdb-udp
|
|
protocol: UDP
|
|
containerPort: {{ include "split-host-port" .Values.extraArgs.opentsdbListenAddr }}
|
|
{{- end }}
|
|
env:
|
|
- name: TZ
|
|
value: Asia/Kolkata
|
|
{{- with .Values.env }}
|
|
{{ toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
readinessProbe:
|
|
httpGet:
|
|
{{- if index .Values.extraArgs "http.pathPrefix" }}
|
|
path: {{ trimSuffix "/" (index .Values.extraArgs "http.pathPrefix") }}/health
|
|
{{- else }}
|
|
path: /health
|
|
{{- end }}
|
|
port: http
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 15
|
|
livenessProbe:
|
|
tcpSocket:
|
|
port: http
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 15
|
|
timeoutSeconds: 5
|
|
volumeMounts:
|
|
- name: tmpdata
|
|
mountPath: /tmpData
|
|
- name: config
|
|
mountPath: /config
|
|
{{- range .Values.extraHostPathMounts }}
|
|
- name: {{ .name }}
|
|
mountPath: {{ .mountPath }}
|
|
subPath: {{ .subPath }}
|
|
readOnly: {{ .readOnly }}
|
|
{{- end }}
|
|
{{- with .Values.extraVolumeMounts }}
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
resources:
|
|
{{- toYaml .Values.resources | nindent 12 }}
|
|
{{- with .Values.extraContainers }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.affinity }}
|
|
affinity:
|
|
{{ toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.schedulerName }}
|
|
schedulerName: "{{ .Values.schedulerName }}"
|
|
{{- end }}
|
|
nodeSelector:
|
|
{{- if .Values.dedicatedValue }}
|
|
dedicated: {{ include "meesho.dedicatedValue" . }}
|
|
{{- else }}
|
|
{{- with .Values.nodeSelector }}
|
|
{{ toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
tolerations:
|
|
{{- if .Values.dedicatedValue }}
|
|
- key: "dedicated"
|
|
operator: "Equal"
|
|
value: {{ include "meesho.dedicatedValue" . }}
|
|
effect: "NoSchedule"
|
|
{{- else }}
|
|
{{- with .Values.tolerations }}
|
|
{{ toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
volumes:
|
|
- name: tmpdata
|
|
{{- if .Values.persistence.enabled }}
|
|
persistentVolumeClaim:
|
|
claimName: {{ .Values.persistence.existingClaim | default (include "chart.fullname" .) }}
|
|
{{- else }}
|
|
emptyDir: {}
|
|
{{- end }}
|
|
- name: config
|
|
configMap:
|
|
name: {{ include "chart.configname" .}}
|
|
{{- range .Values.extraHostPathMounts }}
|
|
- name: {{ .name }}
|
|
hostPath:
|
|
path: {{ .hostPath }}
|
|
{{- end }}
|
|
{{- with .Values.extraVolumes }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.priorityClassName }}
|
|
priorityClassName: {{ .Values.priorityClassName }}
|
|
{{- end }}
|
|
{{- end }}
|