-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upgrade to latest dependencies (#585)
bumping knative.dev/pkg 97c7258...ea6ea84: > ea6ea84 upgrade to latest dependencies (# 2901) > 23f3ee2 Bump google.golang.org/api from 0.150.0 to 0.151.0 (# 2899) > 703c8b0 Add consistent SECURITY.md (# 2900) bumping knative.dev/networking 3af9769...bb18aab: > bb18aab Add additional encryption config flags + labels (# 891) > a509117 upgrade to latest dependencies (# 895) > 25da91b Add consistent SECURITY.md (# 894) bumping google.golang.org/api 83b8a6c...df9c71c: > df9c71c chore(main): release 0.151.0 (# 2254) > 786dca6 feat(all): auto-regenerate discovery clients (# 2265) > 3e83ea6 feat(all): auto-regenerate discovery clients (# 2263) > 93f5a5b feat(all): auto-regenerate discovery clients (# 2262) > edb9d86 feat(all): auto-regenerate discovery clients (# 2261) > 33863bf feat(all): auto-regenerate discovery clients (# 2259) > efe3d6f feat(all): auto-regenerate discovery clients (# 2258) > b3fe441 feat(all): auto-regenerate discovery clients (# 2257) > 4024760 feat(all): auto-regenerate discovery clients (# 2256) > 10dbf2b feat(all): auto-regenerate discovery clients (# 2255) > 58f1c94 feat(all): auto-regenerate discovery clients (# 2253) bumping knative.dev/hack 5deadde...eb35242: > eb35242 Adding the variable `KNATIVE_EVENTING_RELEASE_TLS` to install latest eventing TLS (# 350) Signed-off-by: Knative Automation <automation@knative.team>
- Loading branch information
1 parent
7b3b24d
commit f9e2ce4
Showing
7 changed files
with
90 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/ingress_helpers.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
Copyright 2023 The Knative Authors | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package v1alpha1 | ||
|
||
import ( | ||
"slices" | ||
) | ||
|
||
// GetIngressTLSForVisibility returns a list of `Spec.TLS` where each host in the `Rules.Hosts` field is | ||
// present in `Spec.TLS.Hosts` and where the Rules have the defined ingress visibility. | ||
// This method can be used in net-* implementations to select the correct `IngressTLS` entries | ||
// for cluster-local and cluster-external gateways/listeners. | ||
func (i *Ingress) GetIngressTLSForVisibility(visibility IngressVisibility) []IngressTLS { | ||
ingressTLS := make([]IngressTLS, 0, len(i.Spec.TLS)) | ||
|
||
if i.Spec.TLS == nil || len(i.Spec.TLS) == 0 { | ||
return ingressTLS | ||
} | ||
|
||
for _, rule := range i.Spec.Rules { | ||
if rule.Visibility == visibility { | ||
if rule.Hosts == nil || len(rule.Hosts) == 0 { | ||
return ingressTLS | ||
} | ||
|
||
for _, tls := range i.Spec.TLS { | ||
containsAllRuleHosts := true | ||
for _, h := range rule.Hosts { | ||
if !slices.Contains(tls.Hosts, h) { | ||
containsAllRuleHosts = false | ||
} | ||
} | ||
if containsAllRuleHosts { | ||
ingressTLS = append(ingressTLS, tls) | ||
} | ||
} | ||
} | ||
} | ||
|
||
return ingressTLS | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters