Andy Bavier | 177f29f | 2020-08-12 14:42:00 -0700 | [diff] [blame] | 1 | # Copyright 2020-present Open Networking Foundation |
| 2 | # SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0 |
| 3 | |
| 4 | apiVersion: apps/v1 |
| 5 | kind: Deployment |
| 6 | metadata: |
| 7 | name: {{ include "edge-monitoring-server.fullname" . }} |
| 8 | labels: |
| 9 | {{- include "edge-monitoring-server.labels" . | nindent 4 }} |
| 10 | spec: |
| 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 |
Andy Bavier | af5da15 | 2020-10-21 13:58:58 -0700 | [diff] [blame] | 49 | - name: AETHER_ENV |
| 50 | value: {{ .Values.aetherEnv }} |
Andy Bavier | 177f29f | 2020-08-12 14:42:00 -0700 | [diff] [blame] | 51 | livenessProbe: |
| 52 | httpGet: |
| 53 | path: /edges/healthz |
| 54 | port: 80 |
| 55 | initialDelaySeconds: 3 |
| 56 | periodSeconds: 3 |
| 57 | readinessProbe: |
| 58 | httpGet: |
| 59 | path: /edges |
| 60 | port: http |
| 61 | resources: |
| 62 | {{- toYaml .Values.resources | nindent 12 }} |
| 63 | {{- with .Values.nodeSelector }} |
| 64 | nodeSelector: |
| 65 | {{- toYaml . | nindent 8 }} |
| 66 | {{- end }} |
| 67 | {{- with .Values.affinity }} |
| 68 | affinity: |
| 69 | {{- toYaml . | nindent 8 }} |
| 70 | {{- end }} |
| 71 | {{- with .Values.tolerations }} |
| 72 | tolerations: |
| 73 | {{- toYaml . | nindent 8 }} |
| 74 | {{- end }} |