|
1 | 1 | apiVersion: apps/v1 |
2 | 2 | kind: Deployment |
3 | 3 | metadata: |
4 | | - name: mrmat-python-api-fastapi |
| 4 | + name: mpafastapi |
5 | 5 | labels: |
6 | | - app.kubernetes.io/name: mrmat-python-api-fastapi |
7 | | - app.kubernetes.io/part-of: mrmat-python-api-fastapi |
| 6 | + app.kubernetes.io/name: mpafastapi |
| 7 | + {{ include "common.labels" . | nindent 4 }} |
8 | 8 | spec: |
9 | 9 | replicas: {{ .Values.pod.replicas | int }} |
10 | 10 | selector: |
11 | 11 | matchLabels: |
12 | | - app: {{ .Values.pod.name }} |
13 | | - version: {{ .Chart.AppVersion }} |
| 12 | + {{ include "common.labels" . | nindent 6 }} |
14 | 13 | template: |
15 | 14 | metadata: |
16 | 15 | labels: |
17 | | - sidecar.istio.io/inject: "true" |
18 | | - app: {{ .Values.pod.name }} |
19 | | - version: {{ .Chart.AppVersion }} |
20 | | - app.kubernetes.io/name: mrmat-python-api-fastapi |
21 | | - app.kubernetes.io/part-of: mrmat-python-api-fastapi |
| 16 | + {{ include "common.labels" . | nindent 8 }} |
22 | 17 | annotations: |
23 | 18 | prometheus.io/scrape: "true" |
24 | 19 | prometheus.io/scheme: http |
25 | 20 | prometheus.io/port: "8000" |
26 | 21 | prometheus.io/path: /metrics |
27 | 22 | spec: |
28 | | - serviceAccountName: {{ .Values.serviceAccount.name }} |
| 23 | + serviceAccountName: {{ .Values.sa.name }} |
| 24 | + volumes: |
| 25 | + - name: config-volume |
| 26 | + secret: |
| 27 | + secretName: config-mpafastapi |
| 28 | + - name: data-volume |
| 29 | + emptyDir: |
| 30 | + sizeLimit: 10Mi |
| 31 | + medium: Memory |
29 | 32 | containers: |
30 | | - - name: mrmat-python-api-fastapi |
| 33 | + - name: mpafastapi |
31 | 34 | image: {{ .Values.pod.repository }}:{{ .Chart.AppVersion }} |
32 | 35 | imagePullPolicy: {{ .Values.pod.imagePullPolicy }} |
33 | 36 | env: |
| 37 | + - name: APP_CONFIG |
| 38 | + value: /config/app_config.json |
34 | 39 | - name: OTEL_SERVICE_NAME |
35 | 40 | value: "mrmat-python-api-fastapi" |
36 | 41 | - name: OTEL_TRACES_EXPORTER |
|
51 | 56 | - name: http |
52 | 57 | containerPort: {{ .Values.pod.port }} |
53 | 58 | protocol: TCP |
| 59 | + volumeMounts: |
| 60 | + - name: config-volume |
| 61 | + mountPath: /config |
| 62 | + readOnly: true |
| 63 | + - name: data-volume |
| 64 | + mountPath: /data |
54 | 65 | securityContext: |
55 | 66 | capabilities: |
56 | 67 | drop: |
|
0 commit comments