Skip to content

Commit

Permalink
Use config flag instead of constant
Browse files Browse the repository at this point in the history
  • Loading branch information
ReToCode committed Oct 11, 2023
1 parent 13fcbd5 commit 9222267
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pkg/reconciler/ingress/resources/destinationrule.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,11 @@ import (
"knative.dev/networking/pkg/apis/networking"
"knative.dev/networking/pkg/apis/networking/v1alpha1"
"knative.dev/networking/pkg/certificates"
"knative.dev/networking/pkg/config"
"knative.dev/pkg/kmap"
"knative.dev/pkg/kmeta"
)

const (
// has to match config/700-istio-secret.yaml
knativeServingCertsSecret = "routing-serving-certs"
)

// MakeInternalEncryptionDestinationRule creates a DestinationRule that enables upstream TLS
// on for the specified host
func MakeInternalEncryptionDestinationRule(host string, ing *v1alpha1.Ingress, http2 bool) *v1beta1.DestinationRule {
Expand All @@ -47,7 +43,7 @@ func MakeInternalEncryptionDestinationRule(host string, ing *v1alpha1.Ingress, h
TrafficPolicy: &istiov1beta1.TrafficPolicy{
Tls: &istiov1beta1.ClientTLSSettings{
Mode: istiov1beta1.ClientTLSSettings_SIMPLE,
CredentialName: knativeServingCertsSecret,
CredentialName: config.ServingRoutingCertName,
SubjectAltNames: []string{
// SAN used by Activator
certificates.DataPlaneRoutingSAN,
Expand Down

0 comments on commit 9222267

Please sign in to comment.