2019-06-21 15:18:05 +00:00
|
|
|
package v1alpha1
|
|
|
|
|
|
|
|
import (
|
|
|
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
|
|
)
|
|
|
|
|
|
|
|
// +genclient
|
|
|
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
2021-03-03 14:32:04 +00:00
|
|
|
// +kubebuilder:storageversion
|
2019-06-21 15:18:05 +00:00
|
|
|
|
2022-06-24 10:40:08 +00:00
|
|
|
// TLSOption is the CRD implementation of a Traefik TLS Option, allowing to configure some parameters of the TLS connection.
|
2022-12-05 15:58:04 +00:00
|
|
|
// More info: https://doc.traefik.io/traefik/v3.0/https/tls/#tls-options
|
2019-06-21 15:18:05 +00:00
|
|
|
type TLSOption struct {
|
2022-06-24 10:40:08 +00:00
|
|
|
metav1.TypeMeta `json:",inline"`
|
|
|
|
// Standard object's metadata.
|
|
|
|
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
2019-06-21 15:18:05 +00:00
|
|
|
metav1.ObjectMeta `json:"metadata"`
|
|
|
|
|
|
|
|
Spec TLSOptionSpec `json:"spec"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// +k8s:deepcopy-gen=true
|
|
|
|
|
2022-06-24 10:40:08 +00:00
|
|
|
// TLSOptionSpec defines the desired state of a TLSOption.
|
2019-06-21 15:18:05 +00:00
|
|
|
type TLSOptionSpec struct {
|
2022-06-24 10:40:08 +00:00
|
|
|
// MinVersion defines the minimum TLS version that Traefik will accept.
|
|
|
|
// Possible values: VersionTLS10, VersionTLS11, VersionTLS12, VersionTLS13.
|
|
|
|
// Default: VersionTLS10.
|
|
|
|
MinVersion string `json:"minVersion,omitempty"`
|
|
|
|
// MaxVersion defines the maximum TLS version that Traefik will accept.
|
|
|
|
// Possible values: VersionTLS10, VersionTLS11, VersionTLS12, VersionTLS13.
|
|
|
|
// Default: None.
|
|
|
|
MaxVersion string `json:"maxVersion,omitempty"`
|
|
|
|
// CipherSuites defines the list of supported cipher suites for TLS versions up to TLS 1.2.
|
2022-12-05 15:58:04 +00:00
|
|
|
// More info: https://doc.traefik.io/traefik/v3.0/https/tls/#cipher-suites
|
2022-06-24 10:40:08 +00:00
|
|
|
CipherSuites []string `json:"cipherSuites,omitempty"`
|
|
|
|
// CurvePreferences defines the preferred elliptic curves in a specific order.
|
2022-12-05 15:58:04 +00:00
|
|
|
// More info: https://doc.traefik.io/traefik/v3.0/https/tls/#curve-preferences
|
2022-06-24 10:40:08 +00:00
|
|
|
CurvePreferences []string `json:"curvePreferences,omitempty"`
|
|
|
|
// ClientAuth defines the server's policy for TLS Client Authentication.
|
|
|
|
ClientAuth ClientAuth `json:"clientAuth,omitempty"`
|
|
|
|
// SniStrict defines whether Traefik allows connections from clients connections that do not specify a server_name extension.
|
|
|
|
SniStrict bool `json:"sniStrict,omitempty"`
|
|
|
|
// ALPNProtocols defines the list of supported application level protocols for the TLS handshake, in order of preference.
|
2022-12-05 15:58:04 +00:00
|
|
|
// More info: https://doc.traefik.io/traefik/v3.0/https/tls/#alpn-protocols
|
2022-06-24 10:40:08 +00:00
|
|
|
ALPNProtocols []string `json:"alpnProtocols,omitempty"`
|
2019-06-21 15:18:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// +k8s:deepcopy-gen=true
|
|
|
|
|
2022-06-24 10:40:08 +00:00
|
|
|
// ClientAuth holds the TLS client authentication configuration.
|
2019-07-12 15:50:04 +00:00
|
|
|
type ClientAuth struct {
|
2022-06-24 10:40:08 +00:00
|
|
|
// SecretNames defines the names of the referenced Kubernetes Secret storing certificate details.
|
2021-03-03 14:32:04 +00:00
|
|
|
SecretNames []string `json:"secretNames,omitempty"`
|
2019-07-12 15:50:04 +00:00
|
|
|
// ClientAuthType defines the client authentication type to apply.
|
2022-06-24 10:40:08 +00:00
|
|
|
// +kubebuilder:validation:Enum=NoClientCert;RequestClientCert;RequireAnyClientCert;VerifyClientCertIfGiven;RequireAndVerifyClientCert
|
2021-03-03 14:32:04 +00:00
|
|
|
ClientAuthType string `json:"clientAuthType,omitempty"`
|
2019-06-21 15:18:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
|
|
|
2022-06-24 10:40:08 +00:00
|
|
|
// TLSOptionList is a collection of TLSOption resources.
|
2019-06-21 15:18:05 +00:00
|
|
|
type TLSOptionList struct {
|
|
|
|
metav1.TypeMeta `json:",inline"`
|
2022-06-24 10:40:08 +00:00
|
|
|
// Standard object's metadata.
|
|
|
|
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
2019-06-21 15:18:05 +00:00
|
|
|
metav1.ListMeta `json:"metadata"`
|
|
|
|
|
2022-06-24 10:40:08 +00:00
|
|
|
// Items is the list of TLSOption.
|
2019-06-21 15:18:05 +00:00
|
|
|
Items []TLSOption `json:"items"`
|
|
|
|
}
|