You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cross-namespace secrets have historically been problematic for Ambassador (it had first-party support for them in its own types/CRDs), so much so that they were eventually deprecated and I believe have now been removed. IMO they're not worth the trouble since the policy upstream (i.e., in Kubernetes itself) is that that mechanism of access is not supported
it's one of those things that when you run into it it falls more into the bucket of "surprising" instead of "useful"
Although we have a SecretNamespace field, is it really used?
If nobody uses it, we can remove the field or always sets the SecretNamespace to Ingress namespace.
So the side effect of removing SecretNamespace is currently DomainMapping has SecretNamespace which references the Kingress SecretNamespace.
So for DomainMapping do we really want to support the cross-namespace Secret reference? IMO, DomainMapping is for developer who probably should not have the permission to touch the resources under different namespace.
For the TLS delegation which is for Operator, I would say we may want to consider a different API for it.
Note that we haven't released the SecretNamespace of DomainMapping. So if we are not sure wether we support it or not, I would suggest we remove it first before cutting this release. We can add it back later if we think this is a valid use case.
I'm going to mark SecretNamespace as +optional and include a comment that it should be set to the same namespace as the Ingress otherwise the behaviour is undefined.
If upstream makes a decision about supporting cross-namespace secret then we can formally support or deprecate that field
Activity
dprotaso commentedon May 26, 2021
Some discussion: https://knative.slack.com/archives/CA9RHBGJX/p1622035644007800
from impl (Ambassador):
nak3 commentedon Jun 2, 2021
Although we have a SecretNamespace field, is it really used?
If nobody uses it, we can remove the field or always sets the SecretNamespace to Ingress namespace.
ZhiminXiang commentedon Jun 11, 2021
I think we may want to remove the SecretNamespace. I am wondering if Ingress V2 supports cross-namespace reference as from https://gateway-api.sigs.k8s.io/guides/tls/ I don't see a way to set Secret from different namespace.
So the side effect of removing SecretNamespace is currently DomainMapping has SecretNamespace which references the Kingress SecretNamespace.
So for DomainMapping do we really want to support the cross-namespace Secret reference? IMO, DomainMapping is for developer who probably should not have the permission to touch the resources under different namespace.
For the TLS delegation which is for Operator, I would say we may want to consider a different API for it.
ZhiminXiang commentedon Jun 11, 2021
Note that we haven't released the SecretNamespace of DomainMapping. So if we are not sure wether we support it or not, I would suggest we remove it first before cutting this release. We can add it back later if we think this is a valid use case.
dprotaso commentedon Jun 11, 2021
@shinigambit removed the
SecretNamespacefrom the DomainMapping TLS override option (when bringing your own certificate)I think @nak3 was referring to removing the
SecretNamespacefrom the KIngress or maybe at least deprecate it?ZhiminXiang commentedon Jun 11, 2021
Ah, I did not realize that we already delete
SecretNamespace. Thanks for the clarification.Then I don't have concern to deprecate
SecretNamespace. I don't think we have any use case for it.dprotaso commentedon Jun 14, 2021
Note there's some discussion happening upstream re: kubernetes-sigs/gateway-api#455
I'm going to mark
SecretNamespaceas+optionaland include a comment that it should be set to the same namespace as the Ingress otherwise the behaviour is undefined.If upstream makes a decision about supporting cross-namespace secret then we can formally support or deprecate that field
/assign @dprotaso