optimize destinationRule generate (#782)

This commit is contained in:
澄潭
2024-01-19 18:06:19 +08:00
committed by GitHub
parent b8a01113e3
commit d3d000753d
3 changed files with 25 additions and 1 deletions

View File

@@ -65,7 +65,12 @@ func (u upstreamTLS) Parse(annotations Annotations, config *Ingress, _ *GlobalCo
}
defer func() {
config.UpstreamTLS = upstreamTLSConfig
if upstreamTLSConfig.BackendProtocol == defaultBackendProtocol {
// no need destination rule when use HTTP protocol
config.UpstreamTLS = nil
} else {
config.UpstreamTLS = upstreamTLSConfig
}
}()
if proto, err := annotations.ParseStringASAP(backendProtocol); err == nil {