Andy Bavier | 1cd0a4b | 2021-04-26 15:24:57 -0700 | [diff] [blame] | 1 | # Copyright 2020-present Open Networking Foundation |
Scott Baker | 4cad5ee | 2022-06-09 14:17:35 -0700 | [diff] [blame] | 2 | # SPDX-License-Identifier: Apache-2.0 |
Andy Bavier | 1cd0a4b | 2021-04-26 15:24:57 -0700 | [diff] [blame] | 3 | |
| 4 | apiVersion: apps/v1 |
| 5 | kind: Deployment |
| 6 | metadata: |
| 7 | name: {{ include "edge-maintenance-agent.fullname" . }} |
| 8 | labels: |
| 9 | {{- include "edge-maintenance-agent.labels" . | nindent 4 }} |
| 10 | spec: |
| 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 Bavier | 1d72fff | 2022-06-09 15:35:16 -0700 | [diff] [blame^] | 44 | - 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 Bavier | 1cd0a4b | 2021-04-26 15:24:57 -0700 | [diff] [blame] | 56 | 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 }} |