-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmonitoring.cue
78 lines (72 loc) · 2.25 KB
/
monitoring.cue
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
"monitoring": {
annotations: {}
attributes: {
appliesToWorkloads: []
conflictsWith: []
podDisruptive: false
workloadRefPath: ""
}
description: "My ingress route trait."
labels: {}
type: "trait"
}
template: {
parameter: {
type: string
monitoringSettingsSecret: string
}
// +patchStrategy=retainKeys
patch: {
spec: template: spec: {
// +patchKey=name
containers: [{
name: context.name
// +patchKey=name
volumeMounts: [
{
mountPath: "/app-insights/agents/settings"
name: "monitoringsettings-default-vol"
},
{
mountPath: "/app-insights/agents"
name: "app-insights-agents-vol"
readOnly: true
}
]
}]
// +patchKey=name
volumes: [
{
name: "monitoringsettings-default-vol"
secret: {
optional: true
secretName: parameter.monitoringSettingsSecret
}
},
{
emptyDir: medium: "Memory"
name: "app-insights-agents-vol"
}
]
// +patchKey=name
initContainers: [{
name: "ai"
if parameter.type == "ApplicationInsights" {
image: "mcr.microsoft.com/azurespringapps/apm/applicationinsights:3.4.18-1.0.02521.1209-33689-2023-11-27"
}
imagePullPolicy: "IfNotPresent"
command: ["sh", "-c", "/azure-spring-apps/apm/setup.sh"]
volumeMounts: [
{
mountPath: "/app-insights/agents/settings"
name: "monitoringsettings-default-vol"
},
{
mountPath: "/app-insights/agents",
name: "app-insights-agents-vol"
}
]
}]
}
}
}