Skip to content

Commit

Permalink
add CertificateType label and values
Browse files Browse the repository at this point in the history
  • Loading branch information
ReToCode committed Nov 13, 2023
1 parent 09d049f commit ecb0c23
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
4 changes: 4 additions & 0 deletions pkg/apis/networking/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ const (
// already using labels for domain, it probably best to keep this
// consistent.
VisibilityLabelKey = PublicGroupName + "/visibility"

// CertificateTypeLabelKey is the label to indicate the type of Knative certificate
// used for Knative Serving encryption functionality.
CertificateTypeLabelKey = PublicGroupName + "/certificate-type"
)

// Pseudo-constants
Expand Down
20 changes: 14 additions & 6 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,6 @@ const (
// Certificate reconciler.
CertManagerCertificateClassName = "cert-manager.certificate.networking.knative.dev"

// ServingInternalCertName is the name of secret contains certificates in serving
// system namespace.
//
// Deprecated: ServingInternalCertName is deprecated. Use ServingRoutingCertName instead.
ServingInternalCertName = "knative-serving-certs"

// ServingRoutingCertName is the name of secret contains certificates for Routing data in serving
// system namespace. (Used by Ingress GWs and Activator)
ServingRoutingCertName = "routing-serving-certs"
Expand Down Expand Up @@ -148,6 +142,20 @@ const (
SystemInternalTLSKey = "system-internal-tls"
)

// CertificateType indicates the type of Knative Certificate.
type CertificateType string

const (
// CertificateSystemInternal defines a certificate used for `system-internal-tls`
CertificateSystemInternal CertificateType = "system-internal"

// CertificateClusterLocalDomain defines a certificate used for `cluster-local-domain-tls`.
CertificateClusterLocalDomain CertificateType = "cluster-local-domain"

// CertificateExternalDomain defines a cerificate used for `external-domain-tls`.
CertificateExternalDomain CertificateType = "external-domain"
)

// EncryptionConfig indicates the encryption configuration
// used for TLS connections.
type EncryptionConfig string
Expand Down

0 comments on commit ecb0c23

Please sign in to comment.