charts/uptimerobot/templates/deployment.yaml

75 lines
2.7 KiB
YAML
Raw Normal View History

2019-08-05 12:13:12 +00:00
apiVersion: apps/v1
2018-06-24 14:34:16 +00:00
kind: Deployment
metadata:
name: {{ template "uptimerobot.fullname" . }}
labels:
app: {{ template "uptimerobot.name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
selector:
matchLabels:
app: {{ template "uptimerobot.name" . }}
release: {{ .Release.Name }}
replicas: {{ default 1 .Values.replicas }}
template:
metadata:
labels:
app: {{ template "uptimerobot.name" . }}
release: {{ .Release.Name }}
{{- if .Values.podAnnotations }}
annotations:
{{- range $key, $value := .Values.podAnnotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
2018-06-24 14:34:16 +00:00
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: UPTIMEROBOT_API_KEY
valueFrom:
secretKeyRef:
name: {{ template "uptimerobot.fullname" . }}
key: uptimerobot-apikey
{{- if .Values.config.influxdb.username }}
- name: INFLUX_USERNAME
valueFrom:
configMapKeyRef:
name: {{ template "uptimerobot.fullname" . }}
key: influxdb-username
{{- end }}
{{- if .Values.config.influxdb.password }}
- name: INFLUX_PASSWORD
valueFrom:
configMapKeyRef:
name: {{ template "uptimerobot.fullname" . }}
key: influxdb-password
{{- end }}
- name: APPLICATION_INTERVAL
2018-06-24 14:34:16 +00:00
value: "{{ .Values.delay }}"
{{- if .Values.config.uptimerobot.logs_limit }}
- name: UPTIMEROBOT_LOGS_LIMIT
value: "{{ .Values.config.uptimerobot.logs_limit }}"
{{- end }}
{{- if .Values.config.uptimerobot.response_times_limit }}
- name: UPTIMEROBOT_RESPONSE_TIMES_LIMIT
value: "{{ .Values.config.uptimerobot.response_times_limit }}"
{{- end }}
- name: INFLUX_HOST
value: "{{ .Values.config.influxdb.host }}"
- name: INFLUX_PORT
value: "{{ .Values.config.influxdb.port }}"
- name: INFLUX_PROTOCOL
value: "{{ .Values.config.influxdb.protocol }}"
- name: INFLUX_DATABASE
value: "{{ .Values.config.influxdb.database }}"
2018-06-24 14:34:16 +00:00
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
{{- end }}