Documentation ¶
Overview ¶
Package v2 contains API Schema definitions for the coil v2 API group +kubebuilder:object:generate=true +groupName=coil.cybozu.com
Index ¶
- Variables
- type AddressBlock
- type AddressBlockList
- type AddressPool
- func (in *AddressPool) DeepCopy() *AddressPool
- func (in *AddressPool) DeepCopyInto(out *AddressPool)
- func (in *AddressPool) DeepCopyObject() runtime.Object
- func (r *AddressPool) Default()
- func (r *AddressPool) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (r *AddressPool) ValidateCreate() (warnings admission.Warnings, err error)
- func (r *AddressPool) ValidateDelete() (warnings admission.Warnings, err error)
- func (r *AddressPool) ValidateUpdate(old runtime.Object) (warnings admission.Warnings, err error)
- type AddressPoolList
- type AddressPoolSpec
- type BlockRequest
- type BlockRequestCondition
- type BlockRequestConditionType
- type BlockRequestList
- type BlockRequestSpec
- type BlockRequestStatus
- type Egress
- func (in *Egress) DeepCopy() *Egress
- func (in *Egress) DeepCopyInto(out *Egress)
- func (in *Egress) DeepCopyObject() runtime.Object
- func (r *Egress) Default()
- func (r *Egress) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (r *Egress) ValidateCreate() (warnings admission.Warnings, err error)
- func (r *Egress) ValidateDelete() (warnings admission.Warnings, err error)
- func (r *Egress) ValidateUpdate(old runtime.Object) (warnings admission.Warnings, err error)
- type EgressList
- type EgressPDBSpec
- type EgressPodTemplate
- type EgressSpec
- type EgressStatus
- type Metadata
- type SubnetSet
- func (in *SubnetSet) DeepCopy() *SubnetSet
- func (in *SubnetSet) DeepCopyInto(out *SubnetSet)
- func (ss SubnetSet) Equal(x SubnetSet) bool
- func (ss SubnetSet) GetBlock(n uint, sizeBits int) (ipv4 *net.IPNet, ipv6 *net.IPNet)
- func (ss SubnetSet) IsDualStack() bool
- func (ss SubnetSet) IsIPv4() bool
- func (ss SubnetSet) IsIPv6() bool
- func (ss SubnetSet) Validate(minSize int) error
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "coil.cybozu.com", Version: "v2"} // 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 AddressBlock ¶
type AddressBlock struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Index indicates the index of this block from the origin pool // +kubebuilder:validation:Minimum=0 Index int32 `json:"index"` // IPv4 is an IPv4 subnet address IPv4 *string `json:"ipv4,omitempty"` // IPv6 is an IPv6 subnet address IPv6 *string `json:"ipv6,omitempty"` }
AddressBlock is the Schema for the addressblocks API
The ownerReferences field contains the AddressPool where the block is carved from.
func (*AddressBlock) DeepCopy ¶
func (in *AddressBlock) DeepCopy() *AddressBlock
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddressBlock.
func (*AddressBlock) DeepCopyInto ¶
func (in *AddressBlock) DeepCopyInto(out *AddressBlock)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AddressBlock) DeepCopyObject ¶
func (in *AddressBlock) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AddressBlockList ¶
type AddressBlockList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []AddressBlock `json:"items"` }
AddressBlockList contains a list of AddressBlock
func (*AddressBlockList) DeepCopy ¶
func (in *AddressBlockList) DeepCopy() *AddressBlockList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddressBlockList.
func (*AddressBlockList) DeepCopyInto ¶
func (in *AddressBlockList) DeepCopyInto(out *AddressBlockList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AddressBlockList) DeepCopyObject ¶
func (in *AddressBlockList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AddressPool ¶
type AddressPool struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec AddressPoolSpec `json:"spec,omitempty"` }
AddressPool is the Schema for the addresspools API
func (*AddressPool) DeepCopy ¶
func (in *AddressPool) DeepCopy() *AddressPool
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddressPool.
func (*AddressPool) DeepCopyInto ¶
func (in *AddressPool) DeepCopyInto(out *AddressPool)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AddressPool) DeepCopyObject ¶
func (in *AddressPool) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*AddressPool) Default ¶ added in v2.0.10
func (r *AddressPool) Default()
Default implements webhook.Defaulter so a webhook will be registered for the type
func (*AddressPool) SetupWebhookWithManager ¶
func (r *AddressPool) SetupWebhookWithManager(mgr ctrl.Manager) error
SetupWebhookWithManager registers webhooks for AddressPool
func (*AddressPool) ValidateCreate ¶
func (r *AddressPool) ValidateCreate() (warnings admission.Warnings, err error)
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*AddressPool) ValidateDelete ¶
func (r *AddressPool) ValidateDelete() (warnings admission.Warnings, err error)
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (*AddressPool) ValidateUpdate ¶
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
type AddressPoolList ¶
type AddressPoolList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []AddressPool `json:"items"` }
AddressPoolList contains a list of AddressPool
func (*AddressPoolList) DeepCopy ¶
func (in *AddressPoolList) DeepCopy() *AddressPoolList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddressPoolList.
func (*AddressPoolList) DeepCopyInto ¶
func (in *AddressPoolList) DeepCopyInto(out *AddressPoolList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AddressPoolList) DeepCopyObject ¶
func (in *AddressPoolList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AddressPoolSpec ¶
type AddressPoolSpec struct { // BlockSizeBits specifies the size of the address blocks carved from this pool. // If this is 5, a block will have 2^5 = 32 addresses. Default is 5. // +kubebuilder:default=5 // +kubebuilder:validation:Minimum=0 // +optional BlockSizeBits int32 `json:"blockSizeBits"` // Subnets is a list of IPv4, or IPv6, or dual stack IPv4/IPv6 subnets in this pool. // All items in the list should be consistent to have the same set of subnets. // For example, if the first item is an IPv4 subnet, the other items must also be // an IPv4 subnet. // // This field can be updated only by adding subnets to the list. // +kubebuilder:validation:MinItems=1 Subnets []SubnetSet `json:"subnets"` }
AddressPoolSpec defines the desired state of AddressPool
func (*AddressPoolSpec) DeepCopy ¶
func (in *AddressPoolSpec) DeepCopy() *AddressPoolSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddressPoolSpec.
func (*AddressPoolSpec) DeepCopyInto ¶
func (in *AddressPoolSpec) DeepCopyInto(out *AddressPoolSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BlockRequest ¶
type BlockRequest struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec BlockRequestSpec `json:"spec,omitempty"` Status BlockRequestStatus `json:"status,omitempty"` }
BlockRequest is the Schema for the blockrequests API
The ownerReferences field contains the Node on which coild that created this run.
func (*BlockRequest) DeepCopy ¶
func (in *BlockRequest) DeepCopy() *BlockRequest
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlockRequest.
func (*BlockRequest) DeepCopyInto ¶
func (in *BlockRequest) DeepCopyInto(out *BlockRequest)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BlockRequest) DeepCopyObject ¶
func (in *BlockRequest) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (BlockRequest) GetResult ¶
func (br BlockRequest) GetResult() (string, error)
GetResult returns the request result
type BlockRequestCondition ¶
type BlockRequestCondition struct { // Type of condition, Complete or Failed. Type BlockRequestConditionType `json:"type"` // Status of the condition, one of True, False, Unknown. Status corev1.ConditionStatus `json:"status"` // Last time the condition was checked. // +optional LastProbeTime metav1.Time `json:"lastProbeTime,omitempty"` // Last time the condition transit from one status to another. // +optional LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` // Reason for the condition's last transition. // +optional Reason string `json:"reason,omitempty"` // Human readable message indicating details about last transition. // +optional Message string `json:"message,omitempty"` }
BlockRequestCondition defines the condition of a BlockRequest
func (*BlockRequestCondition) DeepCopy ¶
func (in *BlockRequestCondition) DeepCopy() *BlockRequestCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlockRequestCondition.
func (*BlockRequestCondition) DeepCopyInto ¶
func (in *BlockRequestCondition) DeepCopyInto(out *BlockRequestCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BlockRequestConditionType ¶
type BlockRequestConditionType string
BlockRequestConditionType is to enumerate condition types.
const ( BlockRequestComplete BlockRequestConditionType = "Complete" BlockRequestFailed BlockRequestConditionType = "Failed" )
Valid values for BlockRequestConditionType
type BlockRequestList ¶
type BlockRequestList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []BlockRequest `json:"items"` }
BlockRequestList contains a list of BlockRequest
func (*BlockRequestList) DeepCopy ¶
func (in *BlockRequestList) DeepCopy() *BlockRequestList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlockRequestList.
func (*BlockRequestList) DeepCopyInto ¶
func (in *BlockRequestList) DeepCopyInto(out *BlockRequestList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BlockRequestList) DeepCopyObject ¶
func (in *BlockRequestList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type BlockRequestSpec ¶
type BlockRequestSpec struct { // NodeName is the requesting node name. NodeName string `json:"nodeName"` // PoolName is the target AddressPool name. PoolName string `json:"poolName"` }
BlockRequestSpec defines the desired state of BlockRequest
func (*BlockRequestSpec) DeepCopy ¶
func (in *BlockRequestSpec) DeepCopy() *BlockRequestSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlockRequestSpec.
func (*BlockRequestSpec) DeepCopyInto ¶
func (in *BlockRequestSpec) DeepCopyInto(out *BlockRequestSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BlockRequestStatus ¶
type BlockRequestStatus struct { // AddressBlockName is the allocated address block name. AddressBlockName string `json:"addressBlockName,omitempty"` // Conditions is the list of conditions. Conditions []BlockRequestCondition `json:"conditions,omitempty"` }
BlockRequestStatus defines the observed state of BlockRequest
func (*BlockRequestStatus) DeepCopy ¶
func (in *BlockRequestStatus) DeepCopy() *BlockRequestStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlockRequestStatus.
func (*BlockRequestStatus) DeepCopyInto ¶
func (in *BlockRequestStatus) DeepCopyInto(out *BlockRequestStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Egress ¶
type Egress struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec EgressSpec `json:"spec,omitempty"` Status EgressStatus `json:"status,omitempty"` }
Egress is the Schema for the egresses API
func (*Egress) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Egress.
func (*Egress) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Egress) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Egress) Default ¶
func (r *Egress) Default()
Default implements webhook.Defaulter so a webhook will be registered for the type
func (*Egress) SetupWebhookWithManager ¶
SetupWebhookWithManager setups the webhook for Egress
func (*Egress) ValidateCreate ¶
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*Egress) ValidateDelete ¶
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
type EgressList ¶
type EgressList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Egress `json:"items"` }
EgressList contains a list of Egress
func (*EgressList) DeepCopy ¶
func (in *EgressList) DeepCopy() *EgressList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EgressList.
func (*EgressList) DeepCopyInto ¶
func (in *EgressList) DeepCopyInto(out *EgressList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*EgressList) DeepCopyObject ¶
func (in *EgressList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type EgressPDBSpec ¶ added in v2.6.0
type EgressPDBSpec struct { // MinAvailable is the minimum number of pods that must be available at any given time. // +optional MinAvailable *intstr.IntOrString `json:"minAvailable,omitempty"` // +optional MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` }
EgressPDB defines PDB for Egress
func (*EgressPDBSpec) DeepCopy ¶ added in v2.6.0
func (in *EgressPDBSpec) DeepCopy() *EgressPDBSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EgressPDBSpec.
func (*EgressPDBSpec) DeepCopyInto ¶ added in v2.6.0
func (in *EgressPDBSpec) DeepCopyInto(out *EgressPDBSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EgressPodTemplate ¶
type EgressPodTemplate struct { // Metadata defines optional labels and annotations // +optional Metadata `json:"metadata,omitempty"` // Spec defines the pod template spec. // +optional Spec corev1.PodSpec `json:"spec,omitempty"` }
EgressPodTemplate defines pod template for Egress
This is almost the same as corev1.PodTemplate but is simplified to workaround JSON patch issues.
func (*EgressPodTemplate) DeepCopy ¶
func (in *EgressPodTemplate) DeepCopy() *EgressPodTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EgressPodTemplate.
func (*EgressPodTemplate) DeepCopyInto ¶
func (in *EgressPodTemplate) DeepCopyInto(out *EgressPodTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EgressSpec ¶
type EgressSpec struct { // Destinations is a list of IP networks in CIDR format. // +kubebuilder:validation:MinItems=1 Destinations []string `json:"destinations"` // Replicas is the desired number of egress (SNAT) pods. // Defaults to 1. // +kubebuilder:default=1 // +kubebuilder:validation:Minimum=1 // +optional Replicas int32 `json:"replicas"` // Strategy describes how to replace existing pods with new ones. // Ref. https://pkg.go.dev/k8s.io/api/apps/v1?tab=doc#DeploymentStrategy // +optional Strategy *appsv1.DeploymentStrategy `json:"strategy,omitempty"` // Template is an optional template for egress pods. // A container named "egress" is special. It is the main container of // egress pods and usually is not meant to be modified. // +optional Template *EgressPodTemplate `json:"template,omitempty"` // SessionAffinity is to specify the same field of Service for the Egress. // However, the default is changed from None to ClientIP. // Ref. https://pkg.go.dev/k8s.io/api/core/v1?tab=doc#ServiceSpec // +kubebuilder:validation:Enum=ClientIP;None // +kubebuilder:default=ClientIP // +optional SessionAffinity corev1.ServiceAffinity `json:"sessionAffinity,omitempty"` // SessionAffinityConfig is to specify the same field of Service for Egress. // Ref. https://pkg.go.dev/k8s.io/api/core/v1?tab=doc#ServiceSpec // +optional SessionAffinityConfig *corev1.SessionAffinityConfig `json:"sessionAffinityConfig,omitempty"` // FouSourcePortAuto indicates that the source port number in foo-over-udp encapsulation // should be chosen automatically. // If set to true, the kernel picks a flow based on the flow hash of the encapsulated packet. // The default is false. // +optional FouSourcePortAuto bool `json:"fouSourcePortAuto,omitempty"` // PodDisruptionBudget is an optional PodDisruptionBudget for Egress NAT pods. // +optional PodDisruptionBudget *EgressPDBSpec `json:"podDisruptionBudget,omitempty"` }
EgressSpec defines the desired state of Egress
func (*EgressSpec) DeepCopy ¶
func (in *EgressSpec) DeepCopy() *EgressSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EgressSpec.
func (*EgressSpec) DeepCopyInto ¶
func (in *EgressSpec) DeepCopyInto(out *EgressSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EgressStatus ¶
type EgressStatus struct { // Replicas is copied from the underlying Deployment's status.replicas. // +optional Replicas int32 `json:"replicas,omitempty"` // Selector is a serialized label selector in string form. Selector string `json:"selector,omitempty"` }
EgressStatus defines the observed state of Egress
func (*EgressStatus) DeepCopy ¶
func (in *EgressStatus) DeepCopy() *EgressStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EgressStatus.
func (*EgressStatus) DeepCopyInto ¶
func (in *EgressStatus) DeepCopyInto(out *EgressStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Metadata ¶
type Metadata struct { // Annotations are optional annotations // +optional Annotations map[string]string `json:"annotations,omitempty"` // Labels are optional labels // +optional Labels map[string]string `json:"labels,omitempty"` }
Metadata defines a simplified version of ObjectMeta.
func (*Metadata) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Metadata.
func (*Metadata) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SubnetSet ¶
type SubnetSet struct { // IPv4 is an IPv4 subnet like "10.2.0.0/16" IPv4 *string `json:"ipv4,omitempty"` // IPv6 is an IPv6 subnet like "fd00:0200::/112" IPv6 *string `json:"ipv6,omitempty"` }
SubnetSet defines a IPv4-only or IPv6-only or IPv4/v6 dual stack subnet A dual stack subnet must has the same size subnet of IPv4 and IPv6.
func (*SubnetSet) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetSet.
func (*SubnetSet) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (SubnetSet) IsDualStack ¶
IsDualStack returns true if ss represents IPv4/v6 dual stack subnet