@@ -481,3 +481,131 @@ tests:
481481 asserts :
482482 - failedTemplate :
483483 errorMessage : " Each path in additional ingress must contain path, pathType, and port properties"
484+
485+ - it : should use custom path and pathType when provided
486+ set :
487+ hyperdx :
488+ ingress :
489+ enabled : true
490+ host : hyperdx.example.com
491+ path : /api/(.*)
492+ pathType : Prefix
493+ tls :
494+ enabled : false
495+ asserts :
496+ - hasDocuments :
497+ count : 1
498+ - isKind :
499+ of : Ingress
500+ - equal :
501+ path : spec.rules[0].http.paths[0].path
502+ value : /api/(.*)
503+ - equal :
504+ path : spec.rules[0].http.paths[0].pathType
505+ value : Prefix
506+
507+ - it : should use default path and pathType when not provided
508+ set :
509+ hyperdx :
510+ ingress :
511+ enabled : true
512+ host : hyperdx.example.com
513+ tls :
514+ enabled : false
515+ asserts :
516+ - hasDocuments :
517+ count : 1
518+ - isKind :
519+ of : Ingress
520+ - equal :
521+ path : spec.rules[0].http.paths[0].path
522+ value : /(.*)
523+ - equal :
524+ path : spec.rules[0].http.paths[0].pathType
525+ value : ImplementationSpecific
526+
527+ - it : should allow Exact pathType
528+ set :
529+ hyperdx :
530+ ingress :
531+ enabled : true
532+ host : hyperdx.example.com
533+ path : /hyperdx
534+ pathType : Exact
535+ tls :
536+ enabled : false
537+ asserts :
538+ - hasDocuments :
539+ count : 1
540+ - isKind :
541+ of : Ingress
542+ - equal :
543+ path : spec.rules[0].http.paths[0].path
544+ value : /hyperdx
545+ - equal :
546+ path : spec.rules[0].http.paths[0].pathType
547+ value : Exact
548+
549+ - it : should use service name suffix when name is provided in additional ingress paths
550+ set :
551+ hyperdx :
552+ ingress :
553+ enabled : true
554+ host : hyperdx.example.com
555+ additionalIngresses :
556+ - name : custom-service
557+ ingressClassName : nginx
558+ hosts :
559+ - host : custom.example.com
560+ paths :
561+ - path : /api
562+ pathType : Prefix
563+ port : 8080
564+ name : api-service
565+ - path : /metrics
566+ pathType : Exact
567+ port : 9090
568+ name : metrics
569+ asserts :
570+ - hasDocuments :
571+ count : 2
572+ # Check the additional ingress (document 1)
573+ - isKind :
574+ of : Ingress
575+ documentIndex : 1
576+ - equal :
577+ path : spec.rules[0].http.paths[0].backend.service.name
578+ value : RELEASE-NAME-hdx-oss-v2-api-service
579+ documentIndex : 1
580+ - equal :
581+ path : spec.rules[0].http.paths[1].backend.service.name
582+ value : RELEASE-NAME-hdx-oss-v2-metrics
583+ documentIndex : 1
584+
585+ - it : should use default service name when name is not provided in additional ingress paths
586+ set :
587+ hyperdx :
588+ ingress :
589+ enabled : true
590+ host : hyperdx.example.com
591+ additionalIngresses :
592+ - name : default-service
593+ ingressClassName : nginx
594+ hosts :
595+ - host : default.example.com
596+ paths :
597+ - path : /
598+ pathType : Prefix
599+ port : 8080
600+ # name field is not provided
601+ asserts :
602+ - hasDocuments :
603+ count : 2
604+ # Check the additional ingress (document 1)
605+ - isKind :
606+ of : Ingress
607+ documentIndex : 1
608+ - equal :
609+ path : spec.rules[0].http.paths[0].backend.service.name
610+ value : RELEASE-NAME-hdx-oss-v2
611+ documentIndex : 1
0 commit comments