v1alpha1

package
v0.0.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

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

View Source
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 DNSRule

type DNSRule struct {
	RuleName string `json:"name" yaml:"name"`
	Host     string `json:"host" yaml:"host"`
	Server   string `json:"server,omitempty" yaml:"server,omitempty"`
}

func (*DNSRule) DeepCopy

func (in *DNSRule) DeepCopy() *DNSRule

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSRule.

func (*DNSRule) DeepCopyInto

func (in *DNSRule) DeepCopyInto(out *DNSRule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (DNSRule) Name

func (r DNSRule) Name() string

type ICMPRule

type ICMPRule struct {
	RuleName string `json:"name" yaml:"name"`
	Host     string `json:"host" yaml:"host"`
}

func (*ICMPRule) DeepCopy

func (in *ICMPRule) DeepCopy() *ICMPRule

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ICMPRule.

func (*ICMPRule) DeepCopyInto

func (in *ICMPRule) DeepCopyInto(out *ICMPRule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (ICMPRule) Name

func (r ICMPRule) Name() string

type IPRangeRule

type IPRangeRule struct {
	RuleName string `json:"name" yaml:"name"`
	StartIP  string `json:"startIp" yaml:"startIp"`
	Length   int    `json:"length" yaml:"length"`
}

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

type MTURule

type MTURule struct {
	RuleName string `json:"name" yaml:"name"`
	Host     string `json:"host" yaml:"host"`
	MTU      int    `json:"mtu" yaml:"mtu"`
}

func (*MTURule) DeepCopy

func (in *MTURule) DeepCopy() *MTURule

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MTURule.

func (*MTURule) DeepCopyInto

func (in *MTURule) DeepCopyInto(out *MTURule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (MTURule) Name

func (r MTURule) Name() string

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

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"`
}

NetworkValidatorSpec defines the desired state of NetworkValidator

func (*NetworkValidatorSpec) DeepCopy

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

type NetworkValidatorStatus

type NetworkValidatorStatus struct{}

NetworkValidatorStatus defines the observed state of NetworkValidator

func (*NetworkValidatorStatus) DeepCopy

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 {
	RuleName string `json:"name" yaml:"name"`
	Host     string `json:"host" yaml:"host"`
	Ports    []int  `json:"ports" yaml:"ports"`
	// +kubebuilder:validation:Pattern=`^(4|5|connect)?$`
	ProxyProtocol string `json:"proxyProtocol,omitempty" yaml:"proxyProtocol,omitempty"`
	ProxyAddress  string `json:"proxyAddress,omitempty" yaml:"proxyAddress,omitempty"`
	ProxyPort     int    `json:"proxyPort,omitempty" yaml:"proxyPort,omitempty"`
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL