-
Notifications
You must be signed in to change notification settings - Fork 689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow Contour to work with Opaque secret as long as it contains tls.crt and tls.key #3180
Comments
That seems OK to me, 👍. Note that there's another similar but different validity check for secrets that gets called before adding a secret to the Contour cache of Kubernetes objects. I'm not totally clear on why there are two separate functions for this; it'd be nice to de-dupe if possible. Perhaps another maintainer has more context than me :) |
Mixed feelings about this (since IIRC I added the check). If nothing looks at the type, what's the point of it? If the type id consistently used and required, maybe that's helpful for an auditing or access control, but OTOH if there's no enforcement then there's no way to get consistent behavior. |
When we talked about this originally, I'm pretty sure it was just because that was the standard way to represent TLS details in Kubernetes. I think I'm okay with allowing this as long as we're clear that Secrets of type |
Closes projectcontour#3180. Signed-off-by: Steve Kriss <[email protected]>
Closes projectcontour#3180. Signed-off-by: Steve Kriss <[email protected]>
Closes projectcontour#3180. Signed-off-by: Steve Kriss <[email protected]>
Closes projectcontour#3180. Signed-off-by: Steve Kriss <[email protected]>
Closes #3180. Signed-off-by: Steve Kriss <[email protected]>
Closes projectcontour#3180. Signed-off-by: Steve Kriss <[email protected]>
I would like Contour to accept secrets that are type
Opaque
as long as the secret has required fields:tls.crt
andtls.key
. Currently Contour checks for the validity of secrets by:tls.crt
andtls.key
type
field is set tokubernetes.io/tls
Having the
type
check (2) is not necessary for the secret to work - it is redundant and I would like to propose removing it. I do not propose any documentation changes - the typekubernetes.io/tls
should still be recommended. According to the good old robustness principle ("Be conservative in what you do, be liberal in what you accept from others") Contour could work with other types as well as long as it contains the required certificate and key fields checked in (1).The use case for this change is to allow referring to secret that was created as
Opaque
using something likekubectl create secret generic mycert --from-file=tls.crt --from-file=tls.key --from-file=ca.crt
. The secret is not exactly conforming to thekubernetes.io/tls
but would work if the additional check (2) was removed.The topic is also discussed at Slack https://kubernetes.slack.com/archives/C8XRH2R4J/p1607344706059900
The text was updated successfully, but these errors were encountered: