103 lines
3.4 KiB
YAML
103 lines
3.4 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "telegraf-operator.fullname" . }}
|
|
namespace: {{ .Release.Namespace }}
|
|
labels:
|
|
{{- include "telegraf-operator.labels" . | nindent 4 }}
|
|
spec:
|
|
replicas: {{ .Values.replicaCount }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "telegraf-operator.selectorLabels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
{{- include "telegraf-operator.selectorLabels" . | nindent 8 }}
|
|
{{- if eq .Values.certManager.enable false }}
|
|
annotations:
|
|
checksum/config: {{ include (print $.Template.BasePath "/tls.yml") . | sha256sum }}
|
|
{{- end }}
|
|
spec:
|
|
{{- if .Values.topologySpreadConstraints }}
|
|
topologySpreadConstraints:
|
|
{{ toYaml .Values.topologySpreadConstraints | indent 8 }}
|
|
{{- end }}
|
|
containers:
|
|
- name: {{ .Chart.Name }}
|
|
securityContext:
|
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
|
image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}"
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
args:
|
|
- "--telegraf-default-class={{ .Values.classes.default }}"
|
|
- --telegraf-classes-directory=/etc/telegraf-operator
|
|
- --enable-default-internal-plugin
|
|
- "--telegraf-image={{ .Values.image.sidecarImage }}"
|
|
{{- if eq .Values.requireAnnotationsForSecret true }}
|
|
- "--require-annotations-for-secret"
|
|
{{- end }}
|
|
{{- if eq .Values.hotReload true }}
|
|
- "--telegraf-watch-config=inotify"
|
|
{{- end }}
|
|
env:
|
|
- name: TZ
|
|
value: Asia/Kolkata
|
|
- name: POD_NAMESPACE
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.namespace
|
|
ports:
|
|
- name: https
|
|
containerPort: 9443
|
|
protocol: TCP
|
|
volumeMounts:
|
|
- mountPath: /etc/certs
|
|
name: certs
|
|
readOnly: true
|
|
- mountPath: /etc/telegraf-operator
|
|
name: classes
|
|
readOnly: true
|
|
resources:
|
|
{{- toYaml .Values.resources | nindent 12 }}
|
|
{{- with .Values.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
serviceAccountName: {{ include "telegraf-operator.fullname" . }}
|
|
securityContext:
|
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
|
volumes:
|
|
- name: certs
|
|
secret:
|
|
secretName: telegraf-operator-tls
|
|
- name: classes
|
|
secret:
|
|
secretName: {{ .Values.classes.secretName }}
|
|
{{- 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 }}
|