blob: 65895ca63a7760e90f7a1d73a6eb0ed5b82e95f1 [file] [log] [blame]
Andy Bavier177f29f2020-08-12 14:42:00 -07001# Copyright 2020-present Open Networking Foundation
2# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
3
4apiVersion: apps/v1
5kind: Deployment
6metadata:
7 name: {{ include "edge-monitoring-server.fullname" . }}
8 labels:
9 {{- include "edge-monitoring-server.labels" . | nindent 4 }}
10spec:
11{{- if not .Values.autoscaling.enabled }}
12 replicas: {{ .Values.replicaCount }}
13{{- end }}
14 selector:
15 matchLabels:
16 {{- include "edge-monitoring-server.selectorLabels" . | nindent 6 }}
17 template:
18 metadata:
19 {{- with .Values.podAnnotations }}
20 annotations:
21 {{- toYaml . | nindent 8 }}
22 {{- end }}
23 labels:
24 {{- include "edge-monitoring-server.selectorLabels" . | nindent 8 }}
25 spec:
26 {{- with .Values.imagePullSecrets }}
27 imagePullSecrets:
28 {{- toYaml . | nindent 8 }}
29 {{- end }}
30 securityContext:
31 {{- toYaml .Values.podSecurityContext | nindent 8 }}
32 containers:
33 - name: {{ .Chart.Name }}
34 securityContext:
35 {{- toYaml .Values.securityContext | nindent 12 }}
36 image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
37 imagePullPolicy: {{ .Values.image.pullPolicy }}
38 ports:
39 - name: http
40 containerPort: 80
41 protocol: TCP
42 command: ["python", "edge_monitoring_server.py"]
43 env:
44 - name: SECRET_ICAL_URL
45 valueFrom:
46 secretKeyRef:
47 name: {{ include "edge-monitoring-server.fullname" . }}-calendar-secret
48 key: iCalUrl
49 livenessProbe:
50 httpGet:
51 path: /edges/healthz
52 port: 80
53 initialDelaySeconds: 3
54 periodSeconds: 3
55 readinessProbe:
56 httpGet:
57 path: /edges
58 port: http
59 resources:
60 {{- toYaml .Values.resources | nindent 12 }}
61 {{- with .Values.nodeSelector }}
62 nodeSelector:
63 {{- toYaml . | nindent 8 }}
64 {{- end }}
65 {{- with .Values.affinity }}
66 affinity:
67 {{- toYaml . | nindent 8 }}
68 {{- end }}
69 {{- with .Values.tolerations }}
70 tolerations:
71 {{- toYaml . | nindent 8 }}
72 {{- end }}