-
Notifications
You must be signed in to change notification settings - Fork 118
/
Copy pathdeployment.yaml
61 lines (61 loc) · 2.09 KB
/
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
# Tell us about your experience using dotnet monitor: https://aka.ms/dotnet-monitor-survey
apiVersion: apps/v1
kind: Deployment
metadata:
name: deploy-exampleapp
spec:
replicas: 1
selector:
matchLabels:
app: exampleapp
template:
metadata:
labels:
app: exampleapp
spec:
restartPolicy: Always
containers:
- name: app
image: mcr.microsoft.com/dotnet/samples:aspnetapp-chiseled
imagePullPolicy: Always
env:
- name: DOTNET_DiagnosticPorts
value: /diag/dotnet-monitor.sock
volumeMounts:
- mountPath: /diag
name: diagvol
resources:
limits:
cpu: 250m
memory: 512Mi
- name: monitor
image: mcr.microsoft.com/dotnet/monitor:8
# DO NOT use the --no-auth argument for deployments in production; this argument is used for demonstration
# purposes only in this example. Please continue reading after this example for further details.
args: [ "collect", "--no-auth" ]
imagePullPolicy: Always
env:
- name: DOTNETMONITOR_DiagnosticPort__ConnectionMode
value: Listen
- name: DOTNETMONITOR_Storage__DefaultSharedPath
value: /diag
# ALWAYS use the HTTPS form of the URL for deployments in production; the removal of HTTPS is done for
# demonstration purposes only in this example. Please continue reading after this example for further details.
- name: DOTNETMONITOR_Urls
value: http://localhost:52323
# The metrics URL is set in the CMD instruction of the image by default. However, this deployment overrides that with the args setting; manually set the URL to the same value using configuration.
- name: DOTNETMONITOR_Metrics__Endpoints
value: http://+:52325
volumeMounts:
- mountPath: /diag
name: diagvol
resources:
requests:
cpu: 50m
memory: 32Mi
limits:
cpu: 250m
memory: 256Mi
volumes:
- name: diagvol
emptyDir: {}