Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the validation v1alpha1 API group +kubebuilder:object:generate=true +groupName=validation.spectrocloud.labs
Index ¶
- Variables
- type Auth
- type BasicAuth
- type BasicAuthSecretReference
- type CACertificates
- type CASecretReference
- type Certificate
- type DNSRule
- type HTTPFileRule
- type ICMPRule
- type IPRangeRule
- type MTURule
- type NetworkValidator
- func (in *NetworkValidator) DeepCopy() *NetworkValidator
- func (in *NetworkValidator) DeepCopyInto(out *NetworkValidator)
- func (in *NetworkValidator) DeepCopyObject() runtime.Object
- func (v NetworkValidator) GetKind() string
- func (v NetworkValidator) PluginCode() string
- func (v NetworkValidator) ResultCount() int
- type NetworkValidatorList
- type NetworkValidatorSpec
- func (in *NetworkValidatorSpec) DeepCopy() *NetworkValidatorSpec
- func (in *NetworkValidatorSpec) DeepCopyInto(out *NetworkValidatorSpec)
- func (s *NetworkValidatorSpec) HTTPFileAuthBytesDirect() map[string][]string
- func (s NetworkValidatorSpec) PluginCode() string
- func (s NetworkValidatorSpec) ResultCount() int
- type NetworkValidatorStatus
- type TCPConnRule
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "validation.spectrocloud.labs", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type Auth ¶ added in v0.1.0
type Auth struct { // SecretRef is an optional basic auth secret reference. SecretRef *BasicAuthSecretReference `json:"secretRef,omitempty" yaml:"secretRef,omitempty"` // Basic provides optional basic auth credentials inline. Basic *BasicAuth `json:"basic,omitempty" yaml:"basic,omitempty"` }
Auth contains optional basic authentication details.
func (*Auth) DeepCopy ¶ added in v0.1.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Auth.
func (*Auth) DeepCopyInto ¶ added in v0.1.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BasicAuth ¶ added in v0.1.0
type BasicAuth struct { // Username is the username used to authenticate to the OCI Registry. // +kubebuilder:validation:MinLength=1 Username string `json:"username" yaml:"username"` // Password is the password used to authenticate to the OCI Registry. // +kubebuilder:validation:MinLength=1 Password string `json:"password" yaml:"password"` }
BasicAuth contains basic authentication credentials.
func (*BasicAuth) DeepCopy ¶ added in v0.1.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BasicAuth.
func (*BasicAuth) DeepCopyInto ¶ added in v0.1.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BasicAuthSecretReference ¶ added in v0.0.21
type BasicAuthSecretReference struct { // Name is the name of the secret. // +kubebuilder:validation:MinLength=1 Name string `json:"name" yaml:"name"` // UsernameKey is the username key in the secret data. // +kubebuilder:validation:MinLength=1 UsernameKey string `json:"usernameKey" yaml:"usernameKey"` // PasswordKey is the password key in the secret data. // +kubebuilder:validation:MinLength=1 PasswordKey string `json:"passwordKey" yaml:"passwordKey"` }
BasicAuthSecretReference is a reference to a secret containing HTTP basic authentication credentials.
func (*BasicAuthSecretReference) DeepCopy ¶ added in v0.0.21
func (in *BasicAuthSecretReference) DeepCopy() *BasicAuthSecretReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BasicAuthSecretReference.
func (*BasicAuthSecretReference) DeepCopyInto ¶ added in v0.0.21
func (in *BasicAuthSecretReference) DeepCopyInto(out *BasicAuthSecretReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (BasicAuthSecretReference) Keys ¶ added in v0.0.21
func (r BasicAuthSecretReference) Keys() []string
Keys returns the keys in a BasicAuthSecretReference.
type CACertificates ¶ added in v0.0.18
type CACertificates struct { // Certs is a list of certificates to use. // +kubebuilder:validation:MaxItems=500 Certs []Certificate `json:"certs,omitempty" yaml:"certs,omitempty"` // SecretRefs is a list of CA secret references to use. // +kubebuilder:validation:MaxItems=500 SecretRefs []CASecretReference `json:"secretRefs,omitempty" yaml:"secretRefs,omitempty"` }
CACertificates contains configuration for additional CA certificates to use for TLS. Can be certs provided inline or secret references. Secrets are assumed to be in the same namespace as the NetworkValidator.
func (*CACertificates) DeepCopy ¶ added in v0.0.18
func (in *CACertificates) DeepCopy() *CACertificates
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CACertificates.
func (*CACertificates) DeepCopyInto ¶ added in v0.0.18
func (in *CACertificates) DeepCopyInto(out *CACertificates)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (CACertificates) RawCerts ¶ added in v0.0.22
func (c CACertificates) RawCerts() [][]byte
RawCerts returns the raw certificates included in a CACertificates. SecretRefs are not included.
type CASecretReference ¶ added in v0.0.21
type CASecretReference struct { // Name is the name of the secret. // +kubebuilder:validation:MinLength=1 Name string `json:"name" yaml:"name"` // Key is the key in the secret data. // +kubebuilder:validation:MinLength=1 Key string `json:"key" yaml:"key"` }
CASecretReference is a reference to a secret containing a CA certificate.
func (*CASecretReference) DeepCopy ¶ added in v0.0.21
func (in *CASecretReference) DeepCopy() *CASecretReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CASecretReference.
func (*CASecretReference) DeepCopyInto ¶ added in v0.0.21
func (in *CASecretReference) DeepCopyInto(out *CASecretReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (CASecretReference) Keys ¶ added in v0.0.21
func (r CASecretReference) Keys() []string
Keys returns the keys in a CASecretReference.
type Certificate ¶ added in v0.0.18
type Certificate string
Certificate is a certificate specified inline. +kubebuilder:validation:MinLength=1
type DNSRule ¶
type DNSRule struct { validationrule.ManuallyNamed `json:",inline" yaml:",omitempty"` // RuleName is a unique identifier for the rule in the validator. Used to ensure conditions do not overwrite each other. // +kubebuilder:validation:MaxLength=500 RuleName string `json:"name" yaml:"name"` Host string `json:"host" yaml:"host"` Server string `json:"server,omitempty" yaml:"server,omitempty"` }
DNSRule defines a DNS validation rule.
func (*DNSRule) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSRule.
func (*DNSRule) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HTTPFileRule ¶ added in v0.0.18
type HTTPFileRule struct { validationrule.ManuallyNamed `json:",inline" yaml:",omitempty"` // RuleName is a unique identifier for the rule in the validator. Used to ensure conditions do not overwrite each other. // +kubebuilder:validation:MaxLength=500 RuleName string `json:"name" yaml:"name"` // Paths is a list of file paths to check. When performing HTTP requests, if any of the paths result in a non-200 OK response code, the rule fails validation. // +kubebuilder:validation:MaxItems=1000 Paths []string `json:"paths" yaml:"paths"` // Auth contains optional basic authentication details. // If a SecretRef is provided, the secret is used to retrieve the credentials and the inline auth is ignored. // If a SecretRef is not provided but Basic is, the inline credentials within Basic are used directly. Auth Auth `json:"auth,omitempty" yaml:"auth,omitempty"` // InsecureSkipTLSVerify controls whether the HTTP client used validate the rule skips TLS certificate verification. // Defaults to false. InsecureSkipTLSVerify bool `json:"insecureSkipTlsVerify,omitempty" yaml:"insecureSkipTlsVerify,omitempty"` }
HTTPFileRule defines an HTTP file rule. A unique rule must be created for each host requiring HTTP basic authentication.
func (*HTTPFileRule) DeepCopy ¶ added in v0.0.18
func (in *HTTPFileRule) DeepCopy() *HTTPFileRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPFileRule.
func (*HTTPFileRule) DeepCopyInto ¶ added in v0.0.18
func (in *HTTPFileRule) DeepCopyInto(out *HTTPFileRule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (HTTPFileRule) Name ¶ added in v0.0.18
func (r HTTPFileRule) Name() string
Name returns the name of the HTTPFileRule.
func (*HTTPFileRule) SetName ¶ added in v0.0.24
func (r *HTTPFileRule) SetName(name string)
SetName sets the name of the HTTPFileRule.
type ICMPRule ¶
type ICMPRule struct { validationrule.ManuallyNamed `json:",inline" yaml:",omitempty"` // RuleName is a unique identifier for the rule in the validator. Used to ensure conditions do not overwrite each other. // +kubebuilder:validation:MaxLength=500 RuleName string `json:"name" yaml:"name"` Host string `json:"host" yaml:"host"` }
ICMPRule defines an ICMP validation rule.
func (*ICMPRule) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ICMPRule.
func (*ICMPRule) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IPRangeRule ¶
type IPRangeRule struct { validationrule.ManuallyNamed `json:",inline" yaml:",omitempty"` // RuleName is a unique identifier for the rule in the validator. Used to ensure conditions do not overwrite each other. // +kubebuilder:validation:MaxLength=500 RuleName string `json:"name" yaml:"name"` StartIP string `json:"startIp" yaml:"startIp"` Length int `json:"length" yaml:"length"` }
IPRangeRule defines an IP range validation rule.
func (*IPRangeRule) DeepCopy ¶
func (in *IPRangeRule) DeepCopy() *IPRangeRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPRangeRule.
func (*IPRangeRule) DeepCopyInto ¶
func (in *IPRangeRule) DeepCopyInto(out *IPRangeRule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (IPRangeRule) Name ¶
func (r IPRangeRule) Name() string
Name returns the name of the IPRangeRule.
func (*IPRangeRule) SetName ¶ added in v0.0.24
func (r *IPRangeRule) SetName(name string)
SetName sets the name of the IPRangeRule.
type MTURule ¶
type MTURule struct { validationrule.ManuallyNamed `json:",inline" yaml:",omitempty"` // RuleName is a unique identifier for the rule in the validator. Used to ensure conditions do not overwrite each other. // +kubebuilder:validation:MaxLength=500 RuleName string `json:"name" yaml:"name"` Host string `json:"host" yaml:"host"` MTU int `json:"mtu" yaml:"mtu"` // Optionally specify the size in bytes of the packet headers for the MTU ping packet. // This varies by medium, e.g. Ethernet, WiFi, etc.) and defaults to 28 bytes // (20 bytes IP header + 8 bytes ICMP header) PacketHeadersSize int `json:"packetHeadersSize,omitempty" yaml:"packetHeadersSize,omitempty"` }
MTURule defines an MTU validation rule.
func (*MTURule) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MTURule.
func (*MTURule) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NetworkValidator ¶
type NetworkValidator struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec NetworkValidatorSpec `json:"spec,omitempty"` Status NetworkValidatorStatus `json:"status,omitempty"` }
NetworkValidator is the Schema for the networkvalidators API
func (*NetworkValidator) DeepCopy ¶
func (in *NetworkValidator) DeepCopy() *NetworkValidator
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkValidator.
func (*NetworkValidator) DeepCopyInto ¶
func (in *NetworkValidator) DeepCopyInto(out *NetworkValidator)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NetworkValidator) DeepCopyObject ¶
func (in *NetworkValidator) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (NetworkValidator) GetKind ¶ added in v0.0.23
func (v NetworkValidator) GetKind() string
GetKind returns the Network validator's kind.
func (NetworkValidator) PluginCode ¶ added in v0.0.22
func (v NetworkValidator) PluginCode() string
PluginCode returns the Network validator's plugin code.
func (NetworkValidator) ResultCount ¶ added in v0.0.22
func (v NetworkValidator) ResultCount() int
ResultCount returns the number of validation results expected for a NetworkValidator.
type NetworkValidatorList ¶
type NetworkValidatorList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []NetworkValidator `json:"items"` }
NetworkValidatorList contains a list of NetworkValidator
func (*NetworkValidatorList) DeepCopy ¶
func (in *NetworkValidatorList) DeepCopy() *NetworkValidatorList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkValidatorList.
func (*NetworkValidatorList) DeepCopyInto ¶
func (in *NetworkValidatorList) DeepCopyInto(out *NetworkValidatorList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NetworkValidatorList) DeepCopyObject ¶
func (in *NetworkValidatorList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NetworkValidatorSpec ¶
type NetworkValidatorSpec struct { // DNSRules validate DNS name resolution of network hosts // +kubebuilder:validation:MaxItems=5 // +kubebuilder:validation:XValidation:message="DNSRules must have unique names",rule="self.all(e, size(self.filter(x, x.name == e.name)) == 1)" DNSRules []DNSRule `json:"dnsRules,omitempty" yaml:"dnsRules,omitempty"` // ICMPRules validate ICMP pings to network hosts // +kubebuilder:validation:MaxItems=5 // +kubebuilder:validation:XValidation:message="ICMPRules must have unique names",rule="self.all(e, size(self.filter(x, x.name == e.name)) == 1)" ICMPRules []ICMPRule `json:"icmpRules,omitempty" yaml:"icmpRules,omitempty"` // IPRangeRules validate that all IPs in a given CIDR range are free (unallocated) // +kubebuilder:validation:MaxItems=5 // +kubebuilder:validation:XValidation:message="IPRangeRules must have unique names",rule="self.all(e, size(self.filter(x, x.name == e.name)) == 1)" IPRangeRules []IPRangeRule `json:"ipRangeRules,omitempty" yaml:"ipRangeRules,omitempty"` // MTURules validate that the default NIC has an MTU of at least X, where X is the provided MTU // +kubebuilder:validation:MaxItems=5 // +kubebuilder:validation:XValidation:message="MTURules must have unique names",rule="self.all(e, size(self.filter(x, x.name == e.name)) == 1)" MTURules []MTURule `json:"mtuRules,omitempty" yaml:"mtuRules,omitempty"` // TCPConnRules validate arbitrary TCP connections, including proxied connections // +kubebuilder:validation:MaxItems=5 // +kubebuilder:validation:XValidation:message="TCPConnRules must have unique names",rule="self.all(e, size(self.filter(x, x.name == e.name)) == 1)" TCPConnRules []TCPConnRule `json:"tcpConnRules,omitempty" yaml:"tcpConnRules,omitempty"` // HTTPFileRules validate that files are available via HTTP HEAD requests // +kubebuilder:validation:MaxItems=5 // +kubebuilder:validation:XValidation:message="HTTPFileRules must have unique names",rule="self.all(e, size(self.filter(x, x.name == e.name)) == 1)" HTTPFileRules []HTTPFileRule `json:"httpFileRules,omitempty" yaml:"httpFileRules,omitempty"` // CACerts allow additional CA certificates to be used for TLS. Applies to TCPConnRules and HTTPFileRules. CACerts CACertificates `json:"caCerts,omitempty" yaml:"caCerts,omitempty"` }
NetworkValidatorSpec defines the desired state of NetworkValidator
func (*NetworkValidatorSpec) DeepCopy ¶
func (in *NetworkValidatorSpec) DeepCopy() *NetworkValidatorSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkValidatorSpec.
func (*NetworkValidatorSpec) DeepCopyInto ¶
func (in *NetworkValidatorSpec) DeepCopyInto(out *NetworkValidatorSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NetworkValidatorSpec) HTTPFileAuthBytesDirect ¶ added in v0.1.0
func (s *NetworkValidatorSpec) HTTPFileAuthBytesDirect() map[string][]string
HTTPFileAuthBytesDirect converts all of the inline basic authentication details in a NetworkValidatorSpec to a map of rule names to basic auth details.
func (NetworkValidatorSpec) PluginCode ¶ added in v0.0.22
func (s NetworkValidatorSpec) PluginCode() string
PluginCode returns the network validator's plugin code.
func (NetworkValidatorSpec) ResultCount ¶
func (s NetworkValidatorSpec) ResultCount() int
ResultCount returns the number of validation results expected for a NetworkValidatorSpec.
type NetworkValidatorStatus ¶
type NetworkValidatorStatus struct{}
NetworkValidatorStatus defines the observed state of NetworkValidator
func (*NetworkValidatorStatus) DeepCopy ¶
func (in *NetworkValidatorStatus) DeepCopy() *NetworkValidatorStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkValidatorStatus.
func (*NetworkValidatorStatus) DeepCopyInto ¶
func (in *NetworkValidatorStatus) DeepCopyInto(out *NetworkValidatorStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TCPConnRule ¶
type TCPConnRule struct { validationrule.ManuallyNamed `json:",inline" yaml:",omitempty"` // RuleName is a unique identifier for the rule in the validator. Used to ensure conditions do not overwrite each other. // +kubebuilder:validation:MaxLength=500 RuleName string `json:"name" yaml:"name"` Host string `json:"host" yaml:"host"` Ports []int `json:"ports" yaml:"ports"` // InsecureSkipTLSVerify controls whether the HTTP client used validate the rule skips TLS certificate verification. // Defaults to false. InsecureSkipTLSVerify bool `json:"insecureSkipTlsVerify,omitempty" yaml:"insecureSkipTlsVerify,omitempty"` // Timeout is the duration to wait, in seconds, for a connection to be established. Defaults to 5 seconds. // +kubebuilder:default=5 Timeout int `json:"timeout,omitempty" yaml:"timeout,omitempty"` }
TCPConnRule defines a TCP connection validation rule.
func (*TCPConnRule) DeepCopy ¶
func (in *TCPConnRule) DeepCopy() *TCPConnRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TCPConnRule.
func (*TCPConnRule) DeepCopyInto ¶
func (in *TCPConnRule) DeepCopyInto(out *TCPConnRule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (TCPConnRule) Name ¶
func (r TCPConnRule) Name() string
Name returns the name of the TCPConnRule.
func (*TCPConnRule) SetName ¶ added in v0.0.24
func (r *TCPConnRule) SetName(name string)
SetName sets the name of the TCPConnRule.