blob: 48a4e6a50f091e457797c5191f70eaf05f477fea [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 }}"
Andy Bavier1d72fff2022-06-09 15:35:16 -070044 - name: AETHER_USERNAME
45 valueFrom:
46 secretKeyRef:
47 name: {{ .Values.secretName }}
48 key: username
49 optional: false
50 - name: AETHER_PASSWORD
51 valueFrom:
52 secretKeyRef:
53 name: {{ .Values.secretName }}
54 key: password
55 optional: false
Andy Bavier1cd0a4b2021-04-26 15:24:57 -070056 livenessProbe:
57 httpGet:
58 path: /healthz
59 port: http
60 initialDelaySeconds: 3
61 periodSeconds: 3
62 readinessProbe:
63 httpGet:
64 path: /metrics
65 port: http
66 resources:
67 {{- toYaml .Values.resources | nindent 12 }}
68 {{- with .Values.nodeSelector }}
69 nodeSelector:
70 {{- toYaml . | nindent 8 }}
71 {{- end }}
72 {{- with .Values.affinity }}
73 affinity:
74 {{- toYaml . | nindent 8 }}
75 {{- end }}
76 {{- with .Values.tolerations }}
77 tolerations:
78 {{- toYaml . | nindent 8 }}
79 {{- end }}