-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathdevices-state-manager-deployment.yaml
105 lines (102 loc) · 3.26 KB
/
devices-state-manager-deployment.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
kind: Deployment
apiVersion: apps/v1
metadata:
name: devices-state-manager
spec:
replicas: 1
selector:
matchLabels:
app: devices-state-manager
template:
metadata:
labels:
app: devices-state-manager
spec:
containers:
- name: devices-state-manager
image: acr${project-name}.azurecr.io/devices-state-manager:latest
imagePullPolicy: Always
ports:
- containerPort: 8090
resources:
requests:
cpu: 50m
memory: 128Mi
limits:
cpu: 150m
memory: 512Mi
volumeMounts:
- name: secrets-store-inline
mountPath: "/mnt/secrets-store"
readOnly: true
env:
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: "http://opentelemetrycollector:4318"
- name: CORECLR_ENABLE_PROFILING
value: "1"
- name: CORECLR_PROFILER
value: "{918728DD-259F-4A6A-AC2B-B85E1B658318}"
- name: CORECLR_PROFILER_PATH
value: "/otel-dotnet-auto/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so"
- name: DOTNET_ADDITIONAL_DEPS
value: "/otel-dotnet-auto/AdditionalDeps"
- name: DOTNET_SHARED_STORE
value: "/otel-dotnet-auto/store"
- name: DOTNET_STARTUP_HOOKS
value: "/otel-dotnet-auto/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll"
- name: OTEL_DOTNET_AUTO_HOME
value: "/otel-dotnet-auto"
- name: OTEL_SERVICE_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.labels['app']
- name: EVENT_HUB_CONNECTION_STRING
valueFrom:
secretKeyRef:
name: application-secrets
key: EventHubConnectionStringListen
- name: EVENT_HUB_NAME
valueFrom:
secretKeyRef:
name: application-secrets
key: EventHubName
- name: STORAGE_CONNECTION_STRING
valueFrom:
secretKeyRef:
name: application-secrets
key: StorageAccountConnectionString
- name: BLOB_CONTAINER_NAME
value: event-hub-data
- name: DEVICE_API_URL
value: "http://devices-api-service:8080"
- name: OTEL_DOTNET_AUTO_METRICS_ADDITIONAL_SOURCES
value: "DevicesStateManager"
- name: OTEL_DOTNET_AUTO_TRACES_ADDITIONAL_SOURCES
value: "DeviceUpdate"
readinessProbe:
tcpSocket:
port: 8090
initialDelaySeconds: 5
failureThreshold: 10
timeoutSeconds: 3
periodSeconds: 10
volumes:
- name: secrets-store-inline
csi:
driver: secrets-store.csi.k8s.io
readOnly: true
volumeAttributes:
secretProviderClass: "kvprovider"
---
apiVersion: v1
kind: Service
metadata:
name: devices-state-manager-service
spec:
type: LoadBalancer
ports:
- port: 8090
targetPort: 8090
selector:
app: devices-state-manager