-
Notifications
You must be signed in to change notification settings - Fork 1
/
service.template.yaml
43 lines (43 loc) · 1.23 KB
/
service.template.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: ${SERVICE}
spec:
template:
spec:
containers:
- image: ${IMAGE}
ports:
- containerPort: 8000
startupProbe:
httpGet:
path: /health
port: 8000
livenessProbe:
httpGet:
path: /health
port: 8000
volumeMounts:
- mountPath: /code/app/dotenv
name: dotenv
env:
- name: OTEL_EXPORTER_OTLP_PROTOCOL
value: ${OTEL_EXPORTER_OTLP_PROTOCOL}
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: ${OTEL_EXPORTER_OTLP_ENDPOINT}
- name: OTEL_EXPORTER_OTLP_HEADERS
valueFrom:
secretKeyRef:
key: ${OTEL_EXPORTER_OTLP_HEADERS_SECRET_VERSION}
name: ${OTEL_EXPORTER_OTLP_HEADERS_SECRET_NAME}
- name: OTEL_SERVICE_NAME
value: ${OTEL_SERVICE_NAME}
- name: OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED
value: "${OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED}"
volumes:
- name: dotenv
secret:
items:
- key: ${DOTENV_SECRET_VERSION}
path: .env
secretName: ${DOTENV_SECRET_NAME}