Fix broken template references in minio and s3proxy routes - #1334
Conversation
minio's HTTPRoute referenced service-backend helpers that do not exist
in that chart, and both charts resolved the backend Service name from
the range scope instead of the root, so `helm template` failed outright
whenever gateway.enabled was set.
The s3proxy BackendTLSPolicy also validated against gateway.hosts[0],
which is a {host, paths} map, not a string. Use the same hostname the
backend certificate is issued for (ace/templates/ingress/certificate.yaml),
following route-nats.yaml.
Signed-off-by: Arnob Kumar Saha <arnob@appscode.com>
s3proxy serves the same secret as nats (lib-selfhost picks ace-gw-cert for both when the gateway is enabled), so it needs the same CA. A letsencrypt-issued secret carries no usable ca.crt, which is why the ISRG root lives in a separate secret; mirror the switch route-nats.yaml already makes. Signed-off-by: Arnob Kumar Saha <arnob@appscode.com>
|
Pushed bd26b36, which closes the open question from the PR description — the Why nats' approach is the correct one: That also confirms the hostname change above: s3proxy serves Worth noting for review: this block is currently unreachable. Verified by rendering with |
Follow-up to #1333, which noted these while verifying that change. Both charts failed
helm templateon master whenevergateway.enabled=true.minio
$fullNamewas assigned fromservice-backend.fullnameand the labels fromservice-backend.labels— neither is defined in the minio chart (it has no parent chart; nothing depends on it). Both now use theminio.*helpers.minio.fullnamewith.while insiderange .paths, so the scope was a path map. It now uses$fullName, matching the service name incharts/minio/templates/service.yaml:4.s3proxy
include "s3proxy.fullname" $.BackendTLSPolicy.validation.hostnamewasindex .Values.gateway.hosts 0, which is a{host, paths}map, not a string. s3proxy is a subchart oface(charts/ace/Chart.yaml:39), and the backend certificate is issued for<ace.fullname>-s3proxyon an IP host and for the platform host on a domain host (charts/ace/templates/ingress/certificate.yaml:24-33). The hostname now follows that split, the same waycharts/ace/templates/gateway/route-nats.yaml:67-71does — so validation matches a SAN that is actually on the cert.Verification
helm templateon minio standalone, and on s3proxy with anace.fullnamestub (its parent's helper), for bothhostType: ipandhostType: domain: routes render, backendRefs resolve to the real service names, and the TLS hostname isace-s3proxy/ the platform host respectively.helm lintpasses on both.Not changed
s3proxy'scaCertificateRefshardcodes<ace.fullname>-gw-cert, whileroute-nats.yaml:56-66switches to-acme-ca-certwhen the issuer is letsencrypt. That looks like the same divergence, but it is out of scope here — happy to follow up.