# Render-only overlay for ci/run-httproute-match-test.sh, applied LAST. # # Its one job is to put this chart into Gateway mode, because the convention # ships with httpRoute.enabled: false and the test would otherwise be green # over nothing. A chart that has an overlay here and still renders no # HTTPRoute FAILS the test - that is the whole point of the file existing. # # An overlay and not a change to ci/homeassistant/test-values.yaml, and here # that is more than the usual reason. This chart's ingress.enabled DEFAULT IS # false and the install-test fixture does not switch it on, so the install # exercises no routing object at all - as with garage. There is nothing to # trade away: this overlay ADDS coverage that the install-test never had, # rather than swapping one object for another. # # ingress.enabled: false is restated anyway. It is already the default, but the # two modes are mutually exclusive and the chart aborts its own render when # both are true, so writing it down here keeps this overlay correct if that # default ever changes. # # AND THIS OVERLAY HAS TO SUPPLY HOSTS, which no other overlay in the sweep # does. This chart is the DOCUMENTED INGRESS EXCEPTION: it has no # ingress.domain, so there is no httpRoute.hostnames either - the hostnames and # the paths come from ingress.hosts, and the chart renders ONE HTTPRoute PER # ENTRY there. The chart's default entry is the placeholder # "chart-example.local" with pathType ImplementationSpecific, which WOULD # render (the chart maps ImplementationSpecific to PathPrefix on "/"), but it # would exercise exactly one route with one rule and would leave the # interesting half of this chart's flexible style untested. # # So the list below is deliberate, and each entry earns its place: # # 1. ha.ci.local with "/" and pathType Prefix - the ordinary case, and the # clean Prefix -> PathPrefix mapping. # 2. ha-alt.ci.local with TWO paths, one Prefix and one Exact - this is the # part that cannot be expressed in a single HTTPRoute together with entry # 1, because an HTTPRoute's rules apply to EVERY hostname of the object. # It is therefore the test that the chart really renders one object per # host entry rather than one object with several hostnames, and it # exercises the Exact mapping and the multi-rule path at the same time. # # Both entries' rules are checked against the Service of the same render. The # reference is by PORT NUMBER (service.port) rather than by the name "http" the # Ingress uses, because backendRefs takes a PortNumber - so this overlay is # what holds that number against the Service's. # # NOT covered here, and it cannot be: # # - that either hostname answers. No Gateway controller runs in CI and no # route reaches "Accepted: True". # - the pathType ImplementationSpecific ABORT on a non-root path. That is a # render-failure path, and this test only runs renders it expects to # succeed; it was exercised by hand instead (see the PR). # - that Home Assistant accepts the Host header or reads X-Forwarded-For. # Both live in the application's own configuration, which arrives from # 1Password, and changing the data path changes the proxy address the # trusted_proxies list has to name. NOTES.txt says so; nothing can assert # it here. # # No URLRewrite filter is rendered by this chart in either mode, so the #118 # prefix/redirect assurance has no precondition to meet here. ingress: enabled: false hosts: - host: ha.ci.local paths: - path: / pathType: Prefix - host: ha-alt.ci.local paths: - path: / pathType: Prefix - path: /api/websocket pathType: Exact httpRoute: enabled: true parentRefs: - name: public namespace: gateway sectionName: https