@@ -33,28 +33,108 @@ tests:
3333 value : hyperdx.example.com
3434 # Validate ingress annotations
3535 - equal :
36- path : metadata.annotations["nginx.ingress.kubernetes.io/proxy-body-size"]
37- value : " 100m"
38- - equal :
39- path : metadata.annotations["nginx.ingress.kubernetes.io/proxy-connect-timeout"]
40- value : " 60"
41- - equal :
42- path : metadata.annotations["nginx.ingress.kubernetes.io/proxy-read-timeout"]
43- value : " 60"
44- - equal :
45- path : metadata.annotations["nginx.ingress.kubernetes.io/proxy-send-timeout"]
46- value : " 60"
47- - equal :
48- path : metadata.annotations["nginx.ingress.kubernetes.io/rewrite-target"]
49- value : " /$1"
50- - equal :
51- path : metadata.annotations["nginx.ingress.kubernetes.io/use-regex"]
52- value : " true"
53- # Validate chart version format without exact match
36+ path : metadata.annotations
37+ value :
38+ nginx.ingress.kubernetes.io/proxy-body-size : 100m
39+ nginx.ingress.kubernetes.io/proxy-connect-timeout : " 60"
40+ nginx.ingress.kubernetes.io/proxy-read-timeout : " 60"
41+ nginx.ingress.kubernetes.io/proxy-send-timeout : " 60"
42+ nginx.ingress.kubernetes.io/rewrite-target : /$1
43+ nginx.ingress.kubernetes.io/use-regex : " true"
5444 - matchRegex :
5545 path : metadata.labels["helm.sh/chart"]
5646 pattern : ^hdx-oss-v2-\d+\.\d+\.\d+$
5747
48+ - it : should allow overriding the ingress class name
49+ set :
50+ hyperdx :
51+ ingress :
52+ enabled : true
53+ ingressClassName : custom-ingress
54+ host : hyperdx.example.com
55+ proxyBodySize : 100m
56+ proxyConnectTimeout : " 60"
57+ proxySendTimeout : " 60"
58+ proxyReadTimeout : " 60"
59+ tls :
60+ enabled : false
61+ asserts :
62+ - hasDocuments :
63+ count : 1
64+ - isKind :
65+ of : Ingress
66+ - equal :
67+ path : spec.ingressClassName
68+ value : custom-ingress
69+ - isEmpty :
70+ path : metadata.annotations
71+
72+ - it : should merge user defined annotations
73+ set :
74+ hyperdx :
75+ ingress :
76+ enabled : true
77+ annotations :
78+ a-test-annotation : " letter a"
79+ z-test-annotation : " letter z"
80+ host : hyperdx.example.com
81+ proxyBodySize : 100m
82+ proxyConnectTimeout : " 60"
83+ proxySendTimeout : " 60"
84+ proxyReadTimeout : " 60"
85+ tls :
86+ enabled : false
87+ asserts :
88+ - hasDocuments :
89+ count : 1
90+ - isKind :
91+ of : Ingress
92+ - equal :
93+ path : metadata.annotations
94+ value :
95+ a-test-annotation : letter a
96+ nginx.ingress.kubernetes.io/proxy-body-size : 100m
97+ nginx.ingress.kubernetes.io/proxy-connect-timeout : " 60"
98+ nginx.ingress.kubernetes.io/proxy-read-timeout : " 60"
99+ nginx.ingress.kubernetes.io/proxy-send-timeout : " 60"
100+ nginx.ingress.kubernetes.io/rewrite-target : /$1
101+ nginx.ingress.kubernetes.io/use-regex : " true"
102+ z-test-annotation : letter z
103+
104+ - it : should not allow user to override helm defined annotation values
105+ set :
106+ hyperdx :
107+ ingress :
108+ enabled : true
109+ annotations :
110+ nginx.ingress.kubernetes.io/proxy-body-size : 9999999999m
111+ nginx.ingress.kubernetes.io/proxy-connect-timeout : " 99999999"
112+ nginx.ingress.kubernetes.io/proxy-read-timeout : " 99999999"
113+ nginx.ingress.kubernetes.io/proxy-send-timeout : " 99999999"
114+ nginx.ingress.kubernetes.io/rewrite-target : /bad/value
115+ nginx.ingress.kubernetes.io/use-regex : " do not"
116+ host : hyperdx.example.com
117+ proxyBodySize : 100m
118+ proxyConnectTimeout : " 60"
119+ proxySendTimeout : " 60"
120+ proxyReadTimeout : " 60"
121+ tls :
122+ enabled : false
123+ asserts :
124+ - hasDocuments :
125+ count : 1
126+ - isKind :
127+ of : Ingress
128+ - equal :
129+ path : metadata.annotations
130+ value :
131+ nginx.ingress.kubernetes.io/proxy-body-size : 100m
132+ nginx.ingress.kubernetes.io/proxy-connect-timeout : " 60"
133+ nginx.ingress.kubernetes.io/proxy-read-timeout : " 60"
134+ nginx.ingress.kubernetes.io/proxy-send-timeout : " 60"
135+ nginx.ingress.kubernetes.io/rewrite-target : /$1
136+ nginx.ingress.kubernetes.io/use-regex : " true"
137+
58138 - it : should render the app ingress template with TLS when enabled
59139 set :
60140 hyperdx :
@@ -75,6 +155,11 @@ tests:
75155 - equal :
76156 path : spec.tls[0].secretName
77157 value : hyperdx-tls
158+ - isSubset :
159+ path : metadata.annotations
160+ content :
161+ nginx.ingress.kubernetes.io/ssl-redirect : " true"
162+ nginx.ingress.kubernetes.io/force-ssl-redirect : " true"
78163
79164 - it : should render additional ingress templates
80165 set :
0 commit comments