@@ -33,28 +33,106 @@ 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+
70+ - it : should merge user defined annotations
71+ set :
72+ hyperdx :
73+ ingress :
74+ enabled : true
75+ annotations :
76+ a-test-annotation : " letter a"
77+ z-test-annotation : " letter z"
78+ host : hyperdx.example.com
79+ proxyBodySize : 100m
80+ proxyConnectTimeout : " 60"
81+ proxySendTimeout : " 60"
82+ proxyReadTimeout : " 60"
83+ tls :
84+ enabled : false
85+ asserts :
86+ - hasDocuments :
87+ count : 1
88+ - isKind :
89+ of : Ingress
90+ - equal :
91+ path : metadata.annotations
92+ value :
93+ a-test-annotation : letter a
94+ nginx.ingress.kubernetes.io/proxy-body-size : 100m
95+ nginx.ingress.kubernetes.io/proxy-connect-timeout : " 60"
96+ nginx.ingress.kubernetes.io/proxy-read-timeout : " 60"
97+ nginx.ingress.kubernetes.io/proxy-send-timeout : " 60"
98+ nginx.ingress.kubernetes.io/rewrite-target : /$1
99+ nginx.ingress.kubernetes.io/use-regex : " true"
100+ z-test-annotation : letter z
101+
102+ - it : should not allow user to override helm defined annotation values
103+ set :
104+ hyperdx :
105+ ingress :
106+ enabled : true
107+ annotations :
108+ nginx.ingress.kubernetes.io/proxy-body-size : 9999999999m
109+ nginx.ingress.kubernetes.io/proxy-connect-timeout : " 99999999"
110+ nginx.ingress.kubernetes.io/proxy-read-timeout : " 99999999"
111+ nginx.ingress.kubernetes.io/proxy-send-timeout : " 99999999"
112+ nginx.ingress.kubernetes.io/rewrite-target : /bad/value
113+ nginx.ingress.kubernetes.io/use-regex : " do not"
114+ host : hyperdx.example.com
115+ proxyBodySize : 100m
116+ proxyConnectTimeout : " 60"
117+ proxySendTimeout : " 60"
118+ proxyReadTimeout : " 60"
119+ tls :
120+ enabled : false
121+ asserts :
122+ - hasDocuments :
123+ count : 1
124+ - isKind :
125+ of : Ingress
126+ - equal :
127+ path : metadata.annotations
128+ value :
129+ nginx.ingress.kubernetes.io/proxy-body-size : 100m
130+ nginx.ingress.kubernetes.io/proxy-connect-timeout : " 60"
131+ nginx.ingress.kubernetes.io/proxy-read-timeout : " 60"
132+ nginx.ingress.kubernetes.io/proxy-send-timeout : " 60"
133+ nginx.ingress.kubernetes.io/rewrite-target : /$1
134+ nginx.ingress.kubernetes.io/use-regex : " true"
135+
58136 - it : should render the app ingress template with TLS when enabled
59137 set :
60138 hyperdx :
@@ -75,6 +153,11 @@ tests:
75153 - equal :
76154 path : spec.tls[0].secretName
77155 value : hyperdx-tls
156+ - isSubset :
157+ path : metadata.annotations
158+ content :
159+ nginx.ingress.kubernetes.io/ssl-redirect : " true"
160+ nginx.ingress.kubernetes.io/force-ssl-redirect : " true"
78161
79162 - it : should render additional ingress templates
80163 set :
0 commit comments