Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the validation v1alpha1 API group +kubebuilder:object:generate=true +groupName=validation.spectrocloud.labs
Index ¶
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 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 secret references to use. // +kubebuilder:validation:MaxItems=500 SecretRefs []SecretReference `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.
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 { // 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 { // 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"` // 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.
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 a HTTPFileRule.
type ICMPRule ¶
type ICMPRule struct { // 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 { // 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 an IPRangeRule.
type MTURule ¶
type MTURule struct { // 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.
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 publicly available via HTTP // +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) 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 SecretReference ¶ added in v0.0.18
type SecretReference 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"` }
SecretReference is a secret's name and the key to use to get the data.
func (*SecretReference) DeepCopy ¶ added in v0.0.18
func (in *SecretReference) DeepCopy() *SecretReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretReference.
func (*SecretReference) DeepCopyInto ¶ added in v0.0.18
func (in *SecretReference) DeepCopyInto(out *SecretReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TCPConnRule ¶
type TCPConnRule struct { // 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 a TCPConnRule.