gomod: change projectcalico/calico to kubesphere/calico (#5557)
* chore(calico): update calico to 3.25.0 * chore(calico): replace projectcalico/calico to kubesphere/calico Signed-off-by: root <renyunkang@kubesphere.io> --------- Signed-off-by: root <renyunkang@kubesphere.io>
This commit is contained in:
81
vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/blockaffinity.go
generated
vendored
Normal file
81
vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/blockaffinity.go
generated
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
// Copyright (c) 2019 Tigera, Inc. All rights reserved.
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package v3
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
apiv3 "github.com/projectcalico/api/pkg/apis/projectcalico/v3"
|
||||
)
|
||||
|
||||
const (
|
||||
KindBlockAffinity = "BlockAffinity"
|
||||
KindBlockAffinityList = "BlockAffinityList"
|
||||
)
|
||||
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// BlockAffinity maintains a block affinity's state
|
||||
type BlockAffinity struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// Standard object's metadata.
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
// Specification of the BlockAffinity.
|
||||
Spec BlockAffinitySpec `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
// BlockAffinitySpec contains the specification for a BlockAffinity resource.
|
||||
type BlockAffinitySpec struct {
|
||||
State string `json:"state"`
|
||||
Node string `json:"node"`
|
||||
CIDR string `json:"cidr"`
|
||||
|
||||
// Deleted indicates that this block affinity is being deleted.
|
||||
// This field is a string for compatibility with older releases that
|
||||
// mistakenly treat this field as a string.
|
||||
Deleted string `json:"deleted"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// BlockAffinityList contains a list of BlockAffinity resources.
|
||||
type BlockAffinityList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata"`
|
||||
Items []BlockAffinity `json:"items"`
|
||||
}
|
||||
|
||||
// NewBlockAffinity creates a new (zeroed) BlockAffinity struct with the TypeMetadata initialised to the current
|
||||
// version.
|
||||
func NewBlockAffinity() *BlockAffinity {
|
||||
return &BlockAffinity{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
Kind: KindBlockAffinity,
|
||||
APIVersion: apiv3.GroupVersionCurrent,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// NewBlockAffinityList creates a new (zeroed) BlockAffinityList struct with the TypeMetadata initialised to the current
|
||||
// version.
|
||||
func NewBlockAffinityList() *BlockAffinityList {
|
||||
return &BlockAffinityList{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
Kind: KindBlockAffinityList,
|
||||
APIVersion: apiv3.GroupVersionCurrent,
|
||||
},
|
||||
}
|
||||
}
|
||||
26
vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/doc.go
generated
vendored
Normal file
26
vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/doc.go
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
// Copyright (c) 2017 Tigera, Inc. All rights reserved.
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
/*
|
||||
Package v3 implements the resource definitions used on the Calico client API.
|
||||
|
||||
The resource structures include the JSON tags for each exposed field. These are standard
|
||||
golang tags that define the JSON format of the structures as used by calicoctl. The YAML
|
||||
format also used by calicoctl is directly mapped from the JSON.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package,register
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
package v3
|
||||
121
vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/ipam_block.go
generated
vendored
Normal file
121
vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/ipam_block.go
generated
vendored
Normal file
@@ -0,0 +1,121 @@
|
||||
// Copyright (c) 2019 Tigera, Inc. All rights reserved.
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package v3
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
apiv3 "github.com/projectcalico/api/pkg/apis/projectcalico/v3"
|
||||
)
|
||||
|
||||
const (
|
||||
KindIPAMBlock = "IPAMBlock"
|
||||
KindIPAMBlockList = "IPAMBlockList"
|
||||
)
|
||||
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// IPAMBlock contains information about a block for IP address assignment.
|
||||
type IPAMBlock struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// Standard object's metadata.
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
// Specification of the IPAMBlock.
|
||||
Spec IPAMBlockSpec `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
// IPAMBlockSpec contains the specification for an IPAMBlock resource.
|
||||
type IPAMBlockSpec struct {
|
||||
// The block's CIDR.
|
||||
CIDR string `json:"cidr"`
|
||||
|
||||
// Affinity of the block, if this block has one. If set, it will be of the form
|
||||
// "host:<hostname>". If not set, this block is not affine to a host.
|
||||
Affinity *string `json:"affinity,omitempty"`
|
||||
|
||||
// Array of allocations in-use within this block. nil entries mean the allocation is free.
|
||||
// For non-nil entries at index i, the index is the ordinal of the allocation within this block
|
||||
// and the value is the index of the associated attributes in the Attributes array.
|
||||
Allocations []*int `json:"allocations"`
|
||||
|
||||
// Unallocated is an ordered list of allocations which are free in the block.
|
||||
Unallocated []int `json:"unallocated"`
|
||||
|
||||
// Attributes is an array of arbitrary metadata associated with allocations in the block. To find
|
||||
// attributes for a given allocation, use the value of the allocation's entry in the Allocations array
|
||||
// as the index of the element in this array.
|
||||
Attributes []AllocationAttribute `json:"attributes"`
|
||||
|
||||
// We store a sequence number that is updated each time the block is written.
|
||||
// Each allocation will also store the sequence number of the block at the time of its creation.
|
||||
// When releasing an IP, passing the sequence number associated with the allocation allows us
|
||||
// to protect against a race condition and ensure the IP hasn't been released and re-allocated
|
||||
// since the release request.
|
||||
//
|
||||
// +kubebuilder:default=0
|
||||
// +optional
|
||||
SequenceNumber uint64 `json:"sequenceNumber"`
|
||||
|
||||
// Map of allocated ordinal within the block to sequence number of the block at
|
||||
// the time of allocation. Kubernetes does not allow numerical keys for maps, so
|
||||
// the key is cast to a string.
|
||||
// +optional
|
||||
SequenceNumberForAllocation map[string]uint64 `json:"sequenceNumberForAllocation"`
|
||||
|
||||
// Deleted is an internal boolean used to workaround a limitation in the Kubernetes API whereby
|
||||
// deletion will not return a conflict error if the block has been updated. It should not be set manually.
|
||||
// +optional
|
||||
Deleted bool `json:"deleted"`
|
||||
|
||||
// StrictAffinity on the IPAMBlock is deprecated and no longer used by the code. Use IPAMConfig StrictAffinity instead.
|
||||
DeprecatedStrictAffinity bool `json:"strictAffinity"`
|
||||
}
|
||||
|
||||
type AllocationAttribute struct {
|
||||
AttrPrimary *string `json:"handle_id,omitempty"`
|
||||
AttrSecondary map[string]string `json:"secondary,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// IPAMBlockList contains a list of IPAMBlock resources.
|
||||
type IPAMBlockList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata"`
|
||||
Items []IPAMBlock `json:"items"`
|
||||
}
|
||||
|
||||
// NewIPAMBlock creates a new (zeroed) IPAMBlock struct with the TypeMetadata initialised to the current
|
||||
// version.
|
||||
func NewIPAMBlock() *IPAMBlock {
|
||||
return &IPAMBlock{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
Kind: KindIPAMBlock,
|
||||
APIVersion: apiv3.GroupVersionCurrent,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// NewIPAMBlockList creates a new (zeroed) IPAMBlockList struct with the TypeMetadata initialised to the current
|
||||
// version.
|
||||
func NewIPAMBlockList() *IPAMBlockList {
|
||||
return &IPAMBlockList{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
Kind: KindIPAMBlockList,
|
||||
APIVersion: apiv3.GroupVersionCurrent,
|
||||
},
|
||||
}
|
||||
}
|
||||
85
vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/ipam_config.go
generated
vendored
Normal file
85
vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/ipam_config.go
generated
vendored
Normal file
@@ -0,0 +1,85 @@
|
||||
// Copyright (c) 2019 Tigera, Inc. All rights reserved.
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package v3
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
apiv3 "github.com/projectcalico/api/pkg/apis/projectcalico/v3"
|
||||
)
|
||||
|
||||
const (
|
||||
KindIPAMConfig = "IPAMConfig"
|
||||
KindIPAMConfigList = "IPAMConfigList"
|
||||
GlobalIPAMConfigName = "default"
|
||||
)
|
||||
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// IPAMConfig contains information about a block for IP address assignment.
|
||||
type IPAMConfig struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
|
||||
// Standard object's metadata.
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
// Specification of the IPAMConfig.
|
||||
Spec IPAMConfigSpec `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
// IPAMConfigSpec contains the specification for an IPAMConfig resource.
|
||||
type IPAMConfigSpec struct {
|
||||
StrictAffinity bool `json:"strictAffinity"`
|
||||
AutoAllocateBlocks bool `json:"autoAllocateBlocks"`
|
||||
|
||||
// MaxBlocksPerHost, if non-zero, is the max number of blocks that can be
|
||||
// affine to each host.
|
||||
// +kubebuilder:validation:Minimum:=0
|
||||
// +kubebuilder:validation:Maximum:=2147483647
|
||||
// +optional
|
||||
MaxBlocksPerHost int `json:"maxBlocksPerHost,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// IPAMConfigList contains a list of IPAMConfig resources.
|
||||
type IPAMConfigList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata"`
|
||||
Items []IPAMConfig `json:"items"`
|
||||
}
|
||||
|
||||
// NewIPAMConfig creates a new (zeroed) IPAMConfig struct with the TypeMetadata initialised to the current
|
||||
// version.
|
||||
func NewIPAMConfig() *IPAMConfig {
|
||||
return &IPAMConfig{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
Kind: KindIPAMConfig,
|
||||
APIVersion: apiv3.GroupVersionCurrent,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// NewIPAMConfigList creates a new (zeroed) IPAMConfigList struct with the TypeMetadata initialised to the current
|
||||
// version.
|
||||
func NewIPAMConfigList() *IPAMConfigList {
|
||||
return &IPAMConfigList{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
Kind: KindIPAMConfigList,
|
||||
APIVersion: apiv3.GroupVersionCurrent,
|
||||
},
|
||||
}
|
||||
}
|
||||
78
vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/ipam_handle.go
generated
vendored
Normal file
78
vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/ipam_handle.go
generated
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
// Copyright (c) 2019 Tigera, Inc. All rights reserved.
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package v3
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
apiv3 "github.com/projectcalico/api/pkg/apis/projectcalico/v3"
|
||||
)
|
||||
|
||||
const (
|
||||
KindIPAMHandle = "IPAMHandle"
|
||||
KindIPAMHandleList = "IPAMHandleList"
|
||||
)
|
||||
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// IPAMHandle contains information about an IPAMHandle resource.
|
||||
type IPAMHandle struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// Standard object's metadata.
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
// Specification of the IPAMHandle.
|
||||
Spec IPAMHandleSpec `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
// IPAMHandleSpec contains the specification for an IPAMHandle resource.
|
||||
type IPAMHandleSpec struct {
|
||||
HandleID string `json:"handleID"`
|
||||
Block map[string]int `json:"block"`
|
||||
|
||||
// +optional
|
||||
Deleted bool `json:"deleted"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// IPAMHandleList contains a list of IPAMHandle resources.
|
||||
type IPAMHandleList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata"`
|
||||
Items []IPAMHandle `json:"items"`
|
||||
}
|
||||
|
||||
// NewIPAMHandle creates a new (zeroed) IPAMHandle struct with the TypeMetadata initialised to the current
|
||||
// version.
|
||||
func NewIPAMHandle() *IPAMHandle {
|
||||
return &IPAMHandle{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
Kind: KindIPAMHandle,
|
||||
APIVersion: apiv3.GroupVersionCurrent,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// NewIPAMHandleList creates a new (zeroed) IPAMHandleList struct with the TypeMetadata initialised to the current
|
||||
// version.
|
||||
func NewIPAMHandleList() *IPAMHandleList {
|
||||
return &IPAMHandleList{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
Kind: KindIPAMHandleList,
|
||||
APIVersion: apiv3.GroupVersionCurrent,
|
||||
},
|
||||
}
|
||||
}
|
||||
160
vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/node.go
generated
vendored
Normal file
160
vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/node.go
generated
vendored
Normal file
@@ -0,0 +1,160 @@
|
||||
// Copyright (c) 2017,2020 Tigera, Inc. All rights reserved.
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package v3
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
apiv3 "github.com/projectcalico/api/pkg/apis/projectcalico/v3"
|
||||
|
||||
"github.com/projectcalico/api/pkg/lib/numorstring"
|
||||
)
|
||||
|
||||
const (
|
||||
KindNode = "Node"
|
||||
KindNodeList = "NodeList"
|
||||
CalicoNodeIP = "CalicoNodeIP"
|
||||
InternalIP = "InternalIP"
|
||||
ExternalIP = "ExternalIP"
|
||||
)
|
||||
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// Node contains information about a Node resource.
|
||||
type Node struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// Standard object's metadata.
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
// Specification of the Node.
|
||||
Spec NodeSpec `json:"spec,omitempty"`
|
||||
// Status of the Node.
|
||||
Status NodeStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// NodeSpec contains the specification for a Node resource.
|
||||
type NodeSpec struct {
|
||||
// BGP configuration for this node.
|
||||
BGP *NodeBGPSpec `json:"bgp,omitempty" validate:"omitempty"`
|
||||
|
||||
// IPv4VXLANTunnelAddr is the IPv4 address of the VXLAN tunnel.
|
||||
IPv4VXLANTunnelAddr string `json:"ipv4VXLANTunnelAddr,omitempty" validate:"omitempty,ipv4"`
|
||||
|
||||
// VXLANTunnelMACAddr is the MAC address of the VXLAN tunnel.
|
||||
VXLANTunnelMACAddr string `json:"vxlanTunnelMACAddr,omitempty" validate:"omitempty,mac"`
|
||||
|
||||
// IPv6VXLANTunnelAddr is the address of the IPv6 VXLAN tunnel.
|
||||
IPv6VXLANTunnelAddr string `json:"ipv6VXLANTunnelAddr,omitempty" validate:"omitempty,ipv6"`
|
||||
|
||||
// VXLANTunnelMACAddrV6 is the MAC address of the IPv6 VXLAN tunnel.
|
||||
VXLANTunnelMACAddrV6 string `json:"vxlanTunnelMACAddrV6,omitempty" validate:"omitempty,mac"`
|
||||
|
||||
// OrchRefs for this node.
|
||||
OrchRefs []OrchRef `json:"orchRefs,omitempty" validate:"omitempty"`
|
||||
|
||||
// Wireguard configuration for this node.
|
||||
Wireguard *NodeWireguardSpec `json:"wireguard,omitempty" validate:"omitempty"`
|
||||
|
||||
// Addresses list address that a client can reach the node at.
|
||||
Addresses []NodeAddress `json:"addresses,omitempty" validate:"omitempty"`
|
||||
}
|
||||
|
||||
// NodeAddress represents an address assigned to a node.
|
||||
type NodeAddress struct {
|
||||
// Address is a string representation of the actual address.
|
||||
Address string `json:"address" validate:"net"`
|
||||
|
||||
// Type is the node IP type
|
||||
Type string `json:"type,omitempty" validate:"omitempty,ipType"`
|
||||
}
|
||||
|
||||
type NodeStatus struct {
|
||||
// WireguardPublicKey is the IPv4 Wireguard public-key for this node.
|
||||
// wireguardPublicKey validates if the string is a valid base64 encoded key.
|
||||
WireguardPublicKey string `json:"wireguardPublicKey,omitempty" validate:"omitempty,wireguardPublicKey"`
|
||||
|
||||
// WireguardPublicKeyV6 is the IPv6 Wireguard public-key for this node.
|
||||
// wireguardPublicKey validates if the string is a valid base64 encoded key.
|
||||
WireguardPublicKeyV6 string `json:"wireguardPublicKeyV6,omitempty" validate:"omitempty,wireguardPublicKey"`
|
||||
|
||||
// PodCIDR is a reflection of the Kubernetes node's spec.PodCIDRs field.
|
||||
PodCIDRs []string `json:"podCIDRs,omitempty" validate:"omitempty"`
|
||||
}
|
||||
|
||||
// OrchRef is used to correlate a Calico node to its corresponding representation in a given orchestrator
|
||||
type OrchRef struct {
|
||||
// NodeName represents the name for this node according to the orchestrator.
|
||||
NodeName string `json:"nodeName,omitempty" validate:"omitempty"`
|
||||
// Orchestrator represents the orchestrator using this node.
|
||||
Orchestrator string `json:"orchestrator"`
|
||||
}
|
||||
|
||||
// NodeBGPSpec contains the specification for the Node BGP configuration.
|
||||
type NodeBGPSpec struct {
|
||||
// The AS Number of the node. If this is not specified, the global
|
||||
// default value will be used.
|
||||
ASNumber *numorstring.ASNumber `json:"asNumber,omitempty"`
|
||||
// IPv4Address is the IPv4 address and network of this node. The IPv4 address
|
||||
// should always be specified if you are using BGP.
|
||||
IPv4Address string `json:"ipv4Address,omitempty" validate:"omitempty,cidrv4"`
|
||||
// IPv6Address is the IPv6 address and network of this node. Not required if you
|
||||
// are not using BGP or you do not require IPv6 routing.
|
||||
IPv6Address string `json:"ipv6Address,omitempty" validate:"omitempty,cidrv6"`
|
||||
// IPv4IPIPTunnelAddr is the IPv4 address of the IP in IP tunnel.
|
||||
IPv4IPIPTunnelAddr string `json:"ipv4IPIPTunnelAddr,omitempty" validate:"omitempty,ipv4"`
|
||||
// RouteReflectorClusterID enables this node as a route reflector within the given
|
||||
// cluster.
|
||||
RouteReflectorClusterID string `json:"routeReflectorClusterID,omitempty" validate:"omitempty,ipv4"`
|
||||
}
|
||||
|
||||
// NodeWireguardSpec contains the specification for the Node wireguard configuration.
|
||||
type NodeWireguardSpec struct {
|
||||
// InterfaceIPv4Address is the IP address for the IPv4 Wireguard interface.
|
||||
InterfaceIPv4Address string `json:"interfaceIPv4Address,omitempty" validate:"omitempty,ipv4"`
|
||||
|
||||
// InterfaceIPv6Address is the IP address for the IPv6 Wireguard interface.
|
||||
InterfaceIPv6Address string `json:"interfaceIPv6Address,omitempty" validate:"omitempty,ipv6"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// NodeList contains a list of Node resources.
|
||||
type NodeList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata"`
|
||||
Items []Node `json:"items"`
|
||||
}
|
||||
|
||||
// NewNode creates a new (zeroed) Node struct with the TypeMetadata initialised to the current
|
||||
// version.
|
||||
func NewNode() *Node {
|
||||
return &Node{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
Kind: KindNode,
|
||||
APIVersion: apiv3.GroupVersionCurrent,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// NewNodeList creates a new (zeroed) NodeList struct with the TypeMetadata initialised to the current
|
||||
// version.
|
||||
func NewNodeList() *NodeList {
|
||||
return &NodeList{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
Kind: KindNodeList,
|
||||
APIVersion: apiv3.GroupVersionCurrent,
|
||||
},
|
||||
}
|
||||
}
|
||||
3276
vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/openapi_generated.go
generated
vendored
Normal file
3276
vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/openapi_generated.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
45
vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/register.go
generated
vendored
Normal file
45
vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/register.go
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
// Copyright (c) 2016-2017 Tigera, Inc. All rights reserved.
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package v3
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
)
|
||||
|
||||
var SchemeGroupVersion = schema.GroupVersion{Group: "crd.projectcalico.org", Version: "v1"}
|
||||
|
||||
var (
|
||||
SchemeBuilder runtime.SchemeBuilder
|
||||
localSchemeBuilder = &SchemeBuilder
|
||||
AddToScheme = localSchemeBuilder.AddToScheme
|
||||
)
|
||||
|
||||
func init() {
|
||||
// We only register manually written functions here. The registration of the
|
||||
// generated functions takes place in the generated files. The separation
|
||||
// makes the code compile even when the generated files are missing.
|
||||
localSchemeBuilder.Register(addKnownTypes)
|
||||
}
|
||||
|
||||
// Resource takes an unqualified resource and returns a Group qualified GroupResource
|
||||
func Resource(resource string) schema.GroupResource {
|
||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
||||
}
|
||||
|
||||
// Adds the list of known types to api.Scheme.
|
||||
func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
return nil
|
||||
}
|
||||
134
vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/workloadendpoint.go
generated
vendored
Normal file
134
vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/workloadendpoint.go
generated
vendored
Normal file
@@ -0,0 +1,134 @@
|
||||
// Copyright (c) 2017 Tigera, Inc. All rights reserved.
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package v3
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
apiv3 "github.com/projectcalico/api/pkg/apis/projectcalico/v3"
|
||||
"github.com/projectcalico/api/pkg/lib/numorstring"
|
||||
)
|
||||
|
||||
const (
|
||||
KindWorkloadEndpoint = "WorkloadEndpoint"
|
||||
KindWorkloadEndpointList = "WorkloadEndpointList"
|
||||
)
|
||||
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// WorkloadEndpoint contains information about a WorkloadEndpoint resource that is a peer of a Calico
|
||||
// compute node.
|
||||
type WorkloadEndpoint struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// Standard object's metadata.
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
// Specification of the WorkloadEndpoint.
|
||||
Spec WorkloadEndpointSpec `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
// WorkloadEndpointMetadata contains the specification for a WorkloadEndpoint resource.
|
||||
type WorkloadEndpointSpec struct {
|
||||
// The name of the orchestrator.
|
||||
Orchestrator string `json:"orchestrator,omitempty" validate:"omitempty,name"`
|
||||
// The name of the workload.
|
||||
Workload string `json:"workload,omitempty" validate:"omitempty,name"`
|
||||
// The node name identifying the Calico node instance.
|
||||
Node string `json:"node,omitempty" validate:"omitempty,name"`
|
||||
// The container ID.
|
||||
ContainerID string `json:"containerID,omitempty" validate:"omitempty,containerID"`
|
||||
// The Pod name.
|
||||
Pod string `json:"pod,omitempty" validate:"omitempty,name"`
|
||||
// The Endpoint name.
|
||||
Endpoint string `json:"endpoint,omitempty" validate:"omitempty,name"`
|
||||
// ServiceAccountName, if specified, is the name of the k8s ServiceAccount for this pod.
|
||||
ServiceAccountName string `json:"serviceAccountName,omitempty" validate:"omitempty,name"`
|
||||
// IPNetworks is a list of subnets allocated to this endpoint. IP packets will only be
|
||||
// allowed to leave this interface if they come from an address in one of these subnets.
|
||||
// Currently only /32 for IPv4 and /128 for IPv6 networks are supported.
|
||||
IPNetworks []string `json:"ipNetworks,omitempty" validate:"omitempty,dive,net"`
|
||||
// IPNATs is a list of 1:1 NAT mappings to apply to the endpoint. Inbound connections
|
||||
// to the external IP will be forwarded to the internal IP. Connections initiated from the
|
||||
// internal IP will not have their source address changed, except when an endpoint attempts
|
||||
// to connect one of its own external IPs. Each internal IP must be associated with the same
|
||||
// endpoint via the configured IPNetworks.
|
||||
IPNATs []IPNAT `json:"ipNATs,omitempty" validate:"omitempty,dive"`
|
||||
// IPv4Gateway is the gateway IPv4 address for traffic from the workload.
|
||||
IPv4Gateway string `json:"ipv4Gateway,omitempty" validate:"omitempty,ipv4"`
|
||||
// IPv6Gateway is the gateway IPv6 address for traffic from the workload.
|
||||
IPv6Gateway string `json:"ipv6Gateway,omitempty" validate:"omitempty,ipv6"`
|
||||
// A list of security Profile resources that apply to this endpoint. Each profile is
|
||||
// applied in the order that they appear in this list. Profile rules are applied
|
||||
// after the selector-based security policy.
|
||||
Profiles []string `json:"profiles,omitempty" validate:"omitempty,dive,name"`
|
||||
// InterfaceName the name of the Linux interface on the host: for example, tap80.
|
||||
InterfaceName string `json:"interfaceName,omitempty" validate:"interface"`
|
||||
// MAC is the MAC address of the endpoint interface.
|
||||
MAC string `json:"mac,omitempty" validate:"omitempty,mac"`
|
||||
// Ports contains the endpoint's named ports, which may be referenced in security policy rules.
|
||||
Ports []WorkloadEndpointPort `json:"ports,omitempty" validate:"dive,omitempty"`
|
||||
// AllowSpoofedSourcePrefixes is a list of CIDRs that the endpoint should be able to send traffic from,
|
||||
// bypassing the RPF check.
|
||||
AllowSpoofedSourcePrefixes []string `json:"allowSpoofedSourcePrefixes,omitempty" validate:"omitempty,dive,cidr"`
|
||||
}
|
||||
|
||||
// WorkloadEndpointPort represents one endpoint's named or mapped port
|
||||
type WorkloadEndpointPort struct {
|
||||
Name string `json:"name" validate:"omitempty,portName"`
|
||||
Protocol numorstring.Protocol `json:"protocol"`
|
||||
Port uint16 `json:"port" validate:"gt=0"`
|
||||
HostPort uint16 `json:"hostPort"`
|
||||
HostIP string `json:"hostIP" validate:"omitempty,net"`
|
||||
}
|
||||
|
||||
// IPNat contains a single NAT mapping for a WorkloadEndpoint resource.
|
||||
type IPNAT struct {
|
||||
// The internal IP address which must be associated with the owning endpoint via the
|
||||
// configured IPNetworks for the endpoint.
|
||||
InternalIP string `json:"internalIP" validate:"omitempty,ip"`
|
||||
// The external IP address.
|
||||
ExternalIP string `json:"externalIP" validate:"omitempty,ip"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// WorkloadEndpointList contains a list of WorkloadEndpoint resources.
|
||||
type WorkloadEndpointList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata"`
|
||||
Items []WorkloadEndpoint `json:"items"`
|
||||
}
|
||||
|
||||
// NewWorkloadEndpoint creates a new (zeroed) WorkloadEndpoint struct with the TypeMetadata initialised to the current
|
||||
// version.
|
||||
func NewWorkloadEndpoint() *WorkloadEndpoint {
|
||||
return &WorkloadEndpoint{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
Kind: KindWorkloadEndpoint,
|
||||
APIVersion: apiv3.GroupVersionCurrent,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// NewWorkloadEndpointList creates a new (zeroed) WorkloadEndpointList struct with the TypeMetadata initialised to the current
|
||||
// version.
|
||||
func NewWorkloadEndpointList() *WorkloadEndpointList {
|
||||
return &WorkloadEndpointList{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
Kind: KindWorkloadEndpointList,
|
||||
APIVersion: apiv3.GroupVersionCurrent,
|
||||
},
|
||||
}
|
||||
}
|
||||
720
vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/zz_generated.deepcopy.go
generated
vendored
Normal file
720
vendor/github.com/projectcalico/calico/libcalico-go/lib/apis/v3/zz_generated.deepcopy.go
generated
vendored
Normal file
@@ -0,0 +1,720 @@
|
||||
//go:build !ignore_autogenerated
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
// Copyright (c) 2016-2021 Tigera, Inc. All rights reserved.
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by deepcopy-gen. DO NOT EDIT.
|
||||
|
||||
package v3
|
||||
|
||||
import (
|
||||
numorstring "github.com/projectcalico/api/pkg/lib/numorstring"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *AllocationAttribute) DeepCopyInto(out *AllocationAttribute) {
|
||||
*out = *in
|
||||
if in.AttrPrimary != nil {
|
||||
in, out := &in.AttrPrimary, &out.AttrPrimary
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
if in.AttrSecondary != nil {
|
||||
in, out := &in.AttrSecondary, &out.AttrSecondary
|
||||
*out = make(map[string]string, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllocationAttribute.
|
||||
func (in *AllocationAttribute) DeepCopy() *AllocationAttribute {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(AllocationAttribute)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *BlockAffinity) DeepCopyInto(out *BlockAffinity) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
out.Spec = in.Spec
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlockAffinity.
|
||||
func (in *BlockAffinity) DeepCopy() *BlockAffinity {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(BlockAffinity)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *BlockAffinity) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *BlockAffinityList) DeepCopyInto(out *BlockAffinityList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]BlockAffinity, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlockAffinityList.
|
||||
func (in *BlockAffinityList) DeepCopy() *BlockAffinityList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(BlockAffinityList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *BlockAffinityList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *BlockAffinitySpec) DeepCopyInto(out *BlockAffinitySpec) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlockAffinitySpec.
|
||||
func (in *BlockAffinitySpec) DeepCopy() *BlockAffinitySpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(BlockAffinitySpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *IPAMBlock) DeepCopyInto(out *IPAMBlock) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMBlock.
|
||||
func (in *IPAMBlock) DeepCopy() *IPAMBlock {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(IPAMBlock)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *IPAMBlock) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *IPAMBlockList) DeepCopyInto(out *IPAMBlockList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]IPAMBlock, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMBlockList.
|
||||
func (in *IPAMBlockList) DeepCopy() *IPAMBlockList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(IPAMBlockList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *IPAMBlockList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *IPAMBlockSpec) DeepCopyInto(out *IPAMBlockSpec) {
|
||||
*out = *in
|
||||
if in.Affinity != nil {
|
||||
in, out := &in.Affinity, &out.Affinity
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
if in.Allocations != nil {
|
||||
in, out := &in.Allocations, &out.Allocations
|
||||
*out = make([]*int, len(*in))
|
||||
for i := range *in {
|
||||
if (*in)[i] != nil {
|
||||
in, out := &(*in)[i], &(*out)[i]
|
||||
*out = new(int)
|
||||
**out = **in
|
||||
}
|
||||
}
|
||||
}
|
||||
if in.Unallocated != nil {
|
||||
in, out := &in.Unallocated, &out.Unallocated
|
||||
*out = make([]int, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.Attributes != nil {
|
||||
in, out := &in.Attributes, &out.Attributes
|
||||
*out = make([]AllocationAttribute, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.SequenceNumberForAllocation != nil {
|
||||
in, out := &in.SequenceNumberForAllocation, &out.SequenceNumberForAllocation
|
||||
*out = make(map[string]uint64, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMBlockSpec.
|
||||
func (in *IPAMBlockSpec) DeepCopy() *IPAMBlockSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(IPAMBlockSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *IPAMConfig) DeepCopyInto(out *IPAMConfig) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
out.Spec = in.Spec
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMConfig.
|
||||
func (in *IPAMConfig) DeepCopy() *IPAMConfig {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(IPAMConfig)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *IPAMConfig) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *IPAMConfigList) DeepCopyInto(out *IPAMConfigList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]IPAMConfig, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMConfigList.
|
||||
func (in *IPAMConfigList) DeepCopy() *IPAMConfigList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(IPAMConfigList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *IPAMConfigList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *IPAMConfigSpec) DeepCopyInto(out *IPAMConfigSpec) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMConfigSpec.
|
||||
func (in *IPAMConfigSpec) DeepCopy() *IPAMConfigSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(IPAMConfigSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *IPAMHandle) DeepCopyInto(out *IPAMHandle) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMHandle.
|
||||
func (in *IPAMHandle) DeepCopy() *IPAMHandle {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(IPAMHandle)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *IPAMHandle) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *IPAMHandleList) DeepCopyInto(out *IPAMHandleList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]IPAMHandle, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMHandleList.
|
||||
func (in *IPAMHandleList) DeepCopy() *IPAMHandleList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(IPAMHandleList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *IPAMHandleList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *IPAMHandleSpec) DeepCopyInto(out *IPAMHandleSpec) {
|
||||
*out = *in
|
||||
if in.Block != nil {
|
||||
in, out := &in.Block, &out.Block
|
||||
*out = make(map[string]int, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMHandleSpec.
|
||||
func (in *IPAMHandleSpec) DeepCopy() *IPAMHandleSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(IPAMHandleSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *IPNAT) DeepCopyInto(out *IPNAT) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPNAT.
|
||||
func (in *IPNAT) DeepCopy() *IPNAT {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(IPNAT)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Node) DeepCopyInto(out *Node) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
in.Status.DeepCopyInto(&out.Status)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Node.
|
||||
func (in *Node) DeepCopy() *Node {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(Node)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *Node) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *NodeAddress) DeepCopyInto(out *NodeAddress) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeAddress.
|
||||
func (in *NodeAddress) DeepCopy() *NodeAddress {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(NodeAddress)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *NodeBGPSpec) DeepCopyInto(out *NodeBGPSpec) {
|
||||
*out = *in
|
||||
if in.ASNumber != nil {
|
||||
in, out := &in.ASNumber, &out.ASNumber
|
||||
*out = new(numorstring.ASNumber)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeBGPSpec.
|
||||
func (in *NodeBGPSpec) DeepCopy() *NodeBGPSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(NodeBGPSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *NodeList) DeepCopyInto(out *NodeList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]Node, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeList.
|
||||
func (in *NodeList) DeepCopy() *NodeList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(NodeList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *NodeList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *NodeSpec) DeepCopyInto(out *NodeSpec) {
|
||||
*out = *in
|
||||
if in.BGP != nil {
|
||||
in, out := &in.BGP, &out.BGP
|
||||
*out = new(NodeBGPSpec)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.OrchRefs != nil {
|
||||
in, out := &in.OrchRefs, &out.OrchRefs
|
||||
*out = make([]OrchRef, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.Wireguard != nil {
|
||||
in, out := &in.Wireguard, &out.Wireguard
|
||||
*out = new(NodeWireguardSpec)
|
||||
**out = **in
|
||||
}
|
||||
if in.Addresses != nil {
|
||||
in, out := &in.Addresses, &out.Addresses
|
||||
*out = make([]NodeAddress, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeSpec.
|
||||
func (in *NodeSpec) DeepCopy() *NodeSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(NodeSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *NodeStatus) DeepCopyInto(out *NodeStatus) {
|
||||
*out = *in
|
||||
if in.PodCIDRs != nil {
|
||||
in, out := &in.PodCIDRs, &out.PodCIDRs
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeStatus.
|
||||
func (in *NodeStatus) DeepCopy() *NodeStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(NodeStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *NodeWireguardSpec) DeepCopyInto(out *NodeWireguardSpec) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeWireguardSpec.
|
||||
func (in *NodeWireguardSpec) DeepCopy() *NodeWireguardSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(NodeWireguardSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *OrchRef) DeepCopyInto(out *OrchRef) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrchRef.
|
||||
func (in *OrchRef) DeepCopy() *OrchRef {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(OrchRef)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *WorkloadEndpoint) DeepCopyInto(out *WorkloadEndpoint) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadEndpoint.
|
||||
func (in *WorkloadEndpoint) DeepCopy() *WorkloadEndpoint {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(WorkloadEndpoint)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *WorkloadEndpoint) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *WorkloadEndpointList) DeepCopyInto(out *WorkloadEndpointList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]WorkloadEndpoint, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadEndpointList.
|
||||
func (in *WorkloadEndpointList) DeepCopy() *WorkloadEndpointList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(WorkloadEndpointList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *WorkloadEndpointList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *WorkloadEndpointPort) DeepCopyInto(out *WorkloadEndpointPort) {
|
||||
*out = *in
|
||||
out.Protocol = in.Protocol
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadEndpointPort.
|
||||
func (in *WorkloadEndpointPort) DeepCopy() *WorkloadEndpointPort {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(WorkloadEndpointPort)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *WorkloadEndpointSpec) DeepCopyInto(out *WorkloadEndpointSpec) {
|
||||
*out = *in
|
||||
if in.IPNetworks != nil {
|
||||
in, out := &in.IPNetworks, &out.IPNetworks
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.IPNATs != nil {
|
||||
in, out := &in.IPNATs, &out.IPNATs
|
||||
*out = make([]IPNAT, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.Profiles != nil {
|
||||
in, out := &in.Profiles, &out.Profiles
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.Ports != nil {
|
||||
in, out := &in.Ports, &out.Ports
|
||||
*out = make([]WorkloadEndpointPort, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.AllowSpoofedSourcePrefixes != nil {
|
||||
in, out := &in.AllowSpoofedSourcePrefixes, &out.AllowSpoofedSourcePrefixes
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadEndpointSpec.
|
||||
func (in *WorkloadEndpointSpec) DeepCopy() *WorkloadEndpointSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(WorkloadEndpointSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
Reference in New Issue
Block a user