contour: Contour should set a status message when an ingressroute references an invalid secret
What steps did you take and what happened:
- created a secret of type
kubernetes.io/dockerconfigjson
- referenced unexpected secret type in
Ingress
specification for TLS configuration - received error message in logs
contour-6bdd96f88-ftrfp envoy [2019-06-13 05:03:08.569][000001][warning][config] [bazel-out/k8-opt/bin/source/common/config/_virtual_includes/grpc_mux_subscription_lib/common/config/grpc_mux_subscription_impl.h:70] gRPC config for type.googleapis.com/envoy.api.v2.Listener rejected: Proto constraint validation failed (ListenerValidationError.FilterChains[i]: ["embedded message failed validation"] | caused by FilterChainValidationError.TlsContext: ["embedded message failed validation"] | caused by DownstreamTlsContextValidationError.CommonTlsContext: ["embedded message failed validation"] | caused by CommonTlsContextValidationError.TlsCertificates[i]: ["embedded message failed validation"] | caused by TlsCertificateValidationError.CertificateChain: ["embedded message failed validation"] | caused by field: "specifier", reason: is required): name: "ingress_https"
What did you expect to happen: Error message in logs
secret namespace/name was malformed and unable to be loaded as a TLS listener
Environment:
- Contour version:
v0.11.0
- Kubernetes version: (use
kubectl version
):v1.14.2
- Kubernetes installer & version:
kind v0.4.0-alpha
- Cloud provider or hardware configuration:
local
- OS (e.g. from
/etc/os-release
):osx
Blocked:
- All the issues we have about status
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 15 (11 by maintainers)
Commits related to this issue
- internal/e2e: assert that invalid certificates are not served via SDS Updates #1169 Signed-off-by: Dave Cheney <dave@cheney.net> — committed to davecheney/contour by davecheney 5 years ago
Thanks for the update.
The problem with reporting an error on a malformed secret is where to do so,
Logging to contour’s stdout is the obvious place but this has several drawbacks.
The better place to put this information would be in the status field of a k8s object. The problem is secret has no status field that I know of. This leaves the ingress or ingressroute object itself. I think this is the best place to report a malformed secret.
Sadly status updating has been a sore point for contour for a long time. We plan to fix it, but this is blocked on work scheduled for 0.14 so the soonest we could deliver this feature is 0.15.