blob: 918f71176f8c2e54ee25bf8f8d6e9e7c42b40c3d [file] [log] [blame]
Andy Bavier1cd0a4b2021-04-26 15:24:57 -07001# Copyright 2020-present Open Networking Foundation
Scott Baker4cad5ee2022-06-09 14:17:35 -07002# SPDX-License-Identifier: Apache-2.0
Andy Bavier1cd0a4b2021-04-26 15:24:57 -07003
4apiVersion: apps/v1
5kind: Deployment
6metadata:
7 name: {{ include "edge-maintenance-agent.fullname" . }}
8 labels:
9 {{- include "edge-maintenance-agent.labels" . | nindent 4 }}
10spec:
11 replicas: {{ .Values.replicaCount }}
12 selector:
13 matchLabels:
14 {{- include "edge-maintenance-agent.selectorLabels" . | nindent 6 }}
15 template:
16 metadata:
17 {{- with .Values.podAnnotations }}
18 annotations:
19 {{- toYaml . | nindent 8 }}
20 {{- end }}
21 labels:
22 {{- include "edge-maintenance-agent.selectorLabels" . | nindent 8 }}
23 spec:
24 {{- with .Values.imagePullSecrets }}
25 imagePullSecrets:
26 {{- toYaml . | nindent 8 }}
27 {{- end }}
28 securityContext:
29 {{- toYaml .Values.podSecurityContext | nindent 8 }}
30 containers:
31 - name: {{ .Chart.Name }}
32 securityContext:
33 {{- toYaml .Values.securityContext | nindent 12 }}
34 image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
35 imagePullPolicy: {{ .Values.image.pullPolicy }}
36 ports:
37 - name: http
38 containerPort: 8080
39 protocol: TCP
40 command: ["python", "edge_maintenance_agent.py"]
41 env:
42 - name: AETHER_EDGE_STATUS_URL
43 value: "{{ .Values.edgeMonitoringServerURL }}/{{ .Values.edgeName }}"
44 livenessProbe:
45 httpGet:
46 path: /healthz
47 port: http
48 initialDelaySeconds: 3
49 periodSeconds: 3
50 readinessProbe:
51 httpGet:
52 path: /metrics
53 port: http
54 resources:
55 {{- toYaml .Values.resources | nindent 12 }}
56 {{- with .Values.nodeSelector }}
57 nodeSelector:
58 {{- toYaml . | nindent 8 }}
59 {{- end }}
60 {{- with .Values.affinity }}
61 affinity:
62 {{- toYaml . | nindent 8 }}
63 {{- end }}
64 {{- with .Values.tolerations }}
65 tolerations:
66 {{- toYaml . | nindent 8 }}
67 {{- end }}