-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathhyperdx-deployment_test.yaml
More file actions
109 lines (103 loc) · 3 KB
/
hyperdx-deployment_test.yaml
File metadata and controls
109 lines (103 loc) · 3 KB
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
106
107
108
109
suite: Test HyperDX Deployment
templates:
- hyperdx-deployment.yaml
tests:
- it: should render deployment correctly with default values
asserts:
- isKind:
of: Deployment
- equal:
path: spec.replicas
value: 1
- matchRegex:
path: spec.template.spec.containers[0].image
pattern: ^docker\.hyperdx\.io/hyperdx/hyperdx:\d+\.\d+\.\d+$
- equal:
path: spec.template.spec.containers[0].ports[0].containerPort
value: 3000
- equal:
path: spec.template.spec.containers[0].ports[1].containerPort
value: 8000
- equal:
path: spec.template.spec.containers[0].ports[2].containerPort
value: 4320
- isSubset:
path: spec.template.spec.containers[0].envFrom[0]
content:
configMapRef:
name: RELEASE-NAME-hdx-oss-v2-app-config
- contains:
path: spec.template.spec.containers[0].env
content:
name: HYPERDX_API_KEY
valueFrom:
secretKeyRef:
key: api-key
name: RELEASE-NAME-hdx-oss-v2-app-secrets
- it: should set custom replicas when provided
set:
hyperdx:
replicas: 3
asserts:
- equal:
path: spec.replicas
value: 3
- it: should add custom annotations when provided
set:
hyperdx:
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "3000"
asserts:
- isSubset:
path: spec.template.metadata.annotations
content:
prometheus.io/scrape: "true"
prometheus.io/port: "3000"
- it: should add custom labels when provided
set:
hyperdx:
labels:
environment: production
team: platform
asserts:
- isSubset:
path: metadata.labels
content:
environment: production
team: platform
- it: should add custom environment variables when provided
set:
hyperdx:
env:
- name: CUSTOM_ENV
value: "test-value"
- name: ANOTHER_ENV
value: "another-value"
asserts:
- contains:
path: spec.template.spec.containers[0].env
content:
name: CUSTOM_ENV
value: "test-value"
- contains:
path: spec.template.spec.containers[0].env
content:
name: ANOTHER_ENV
value: "another-value"
- it: should expose OpAMP container port with default values
asserts:
- equal:
path: spec.template.spec.containers[0].ports[2].containerPort
value: 4320
- equal:
path: spec.template.spec.containers[0].ports[2].name
value: opamp-port
- it: should use custom OpAMP port when provided
set:
hyperdx:
opampPort: 5320
asserts:
- equal:
path: spec.template.spec.containers[0].ports[2].containerPort
value: 5320