Documentation ¶
Index ¶
- func IsMissingResource(err error) bool
- type BGPConfiguration
- type BGPConfigurationSpec
- type BGPPeer
- type BGPPeerSpec
- type Calico
- func (c *Calico) CreateBGPPeer(peer *BGPPeer, config *rest.Config) error
- func (c *Calico) DeleteBGPPeer(peer *BGPPeer, config *rest.Config) error
- func (c *Calico) GenerateBGPPeer(name, namespace, ip string, asn int) *BGPPeer
- func (c *Calico) GetBGPConfiguration(config *rest.Config) ([]*BGPConfiguration, error)
- func (c *Calico) GetBGPPeer(name string, config *rest.Config) (*BGPPeer, error)
- func (c *Calico) GetBGPPeers(config *rest.Config) ([]*BGPPeer, error)
- func (c *Calico) GetIPPool(config *rest.Config) ([]*IPPool, error)
- func (c *Calico) UpdateBGPConfiguration(bgpConf *BGPConfiguration, config *rest.Config) error
- func (c *Calico) UpdateBGPPeer(peer *BGPPeer, config *rest.Config) error
- type IPIPConfiguration
- type IPIPMode
- type IPPool
- type IPPoolSpec
- type Options
- type ServiceClusterIPBlock
- type ServiceExternalIPBlock
- type VXLANMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsMissingResource ¶ added in v1.3.1
IsMissingResource error message parser for missing calico case.
Types ¶
type BGPConfiguration ¶
type BGPConfiguration struct { Name string `json:"name"` metav1.TypeMeta `json:",inline"` // Standard object's metadata. Metadata metav1.ObjectMeta `json:"metadata"` // Specification of the BGPConfiguration. Spec BGPConfigurationSpec `json:"spec,omitempty"` }
BGPConfiguration .
type BGPConfigurationSpec ¶
type BGPConfigurationSpec struct { // NodeToNodeMeshEnabled sets whether full node to node BGP mesh is enabled. [Default: true] NodeToNodeMeshEnabled *bool `json:"nodeToNodeMeshEnabled" validate:"omitempty" confignamev1:"node_mesh"` // ASNumber is the default AS number used by a node. [Default: 64512] ASNumber int `json:"asNumber,omitempty" validate:"omitempty" confignamev1:"as_num"` // ServiceExternalIPs are the CIDR blocks for Kubernetes Service External IPs. // Kubernetes Service ExternalIPs will only be advertised if they are within one of these blocks. ServiceExternalIPs []ServiceExternalIPBlock `json:"serviceExternalIPs,omitempty" validate:"omitempty,dive" confignamev1:"svc_external_ips"` // ServiceClusterIPs are the CIDR blocks from which service cluster IPs are allocated. // If specified, Calico will advertise these blocks, as well as any cluster IPs within them. ServiceClusterIPs []ServiceClusterIPBlock `json:"serviceClusterIPs,omitempty" validate:"omitempty,dive" confignamev1:"svc_cluster_ips"` }
BGPConfigurationSpec contains the values of the BGP configuration.
type BGPPeer ¶
type BGPPeer struct { Name string `json:"name"` metav1.TypeMeta `json:",inline"` // Metadata for a BGPPeer. Metadata metav1.ObjectMeta `json:"metadata,omitempty"` // Specification for a BGPPeer. Spec BGPPeerSpec `json:"spec,omitempty"` }
BGPPeer contains information about a BGP peer resource that is a peer of a Calico compute node.
type BGPPeerSpec ¶
type BGPPeerSpec struct { // The AS Number of the peer. ASNumber int `json:"asNumber"` // The IP address of the peer. PeerIP string `json:"peerIP" validate:"omitempty"` }
BGPPeerSpec contains the specification for a BGPPeer resource.
type Calico ¶
type Calico struct {
// contains filtered or unexported fields
}
Calico .
func (*Calico) CreateBGPPeer ¶
CreateBGPPeer .
func (*Calico) DeleteBGPPeer ¶
DeleteBGPPeer .
func (*Calico) GenerateBGPPeer ¶
GenerateBGPPeer .
func (*Calico) GetBGPConfiguration ¶
func (c *Calico) GetBGPConfiguration(config *rest.Config) ([]*BGPConfiguration, error)
GetBGPConfiguration .
func (*Calico) GetBGPPeer ¶
GetBGPPeer .
func (*Calico) GetBGPPeers ¶
GetBGPPeers .
func (*Calico) UpdateBGPConfiguration ¶
func (c *Calico) UpdateBGPConfiguration(bgpConf *BGPConfiguration, config *rest.Config) error
UpdateBGPConfiguration .
type IPIPConfiguration ¶
type IPIPConfiguration struct { // When enabled is true, ipip tunneling will be used to deliver packets to // destinations within this pool. Enabled bool `json:"enabled,omitempty"` // The IPIP mode. This can be one of "always" or "cross-subnet". A mode // of "always" will also use IPIP tunneling for routing to destination IP // addresses within this pool. A mode of "cross-subnet" will only use IPIP // tunneling when the destination node is on a different subnet to the // originating node. The default value (if not specified) is "always". Mode string `json:"mode,omitempty" validate:"ipIpMode"` }
IPIPConfiguration .
type IPPool ¶
type IPPool struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. metav1.ObjectMeta `json:"metadata,omitempty"` // Specification of the IPPool. Spec IPPoolSpec `json:"spec,omitempty"` }
IPPool contains information about an IPPool resource.
type IPPoolSpec ¶
type IPPoolSpec struct { // The pool CIDR. CIDR string `json:"cidr" validate:"net"` // Contains configuration for VXLAN tunneling for this pool. If not specified, // then this is defaulted to "Never" (i.e. VXLAN tunneling is disabled). VXLANMode VXLANMode `json:"vxlanMode,omitempty" validate:"omitempty,vxlanMode"` // Contains configuration for IPIP tunneling for this pool. If not specified, // then this is defaulted to "Never" (i.e. IPIP tunneling is disabled). IPIPMode IPIPMode `json:"ipipMode,omitempty" validate:"omitempty,ipIpMode"` // When nat-outgoing is true, packets sent from Calico networked containers in // this pool to destinations outside of this pool will be masqueraded. NATOutgoing bool `json:"natOutgoing,omitempty"` // When disabled is true, Calico IPAM will not assign addresses from this pool. Disabled bool `json:"disabled,omitempty"` // The block size to use for IP address assignments from this pool. Defaults to 26 for IPv4 and 112 for IPv6. BlockSize int `json:"blockSize,omitempty"` // Allows IPPool to allocate for a specific node by label selector. NodeSelector string `json:"nodeSelector,omitempty" validate:"omitempty,selector"` // Deprecated: this field is only used for APIv1 backwards compatibility. // Setting this field is not allowed, this field is for internal use only. IPIP *IPIPConfiguration `json:"ipip,omitempty" validate:"omitempty,mustBeNil"` // Deprecated: this field is only used for APIv1 backwards compatibility. // Setting this field is not allowed, this field is for internal use only. NATOutgoingV1 bool `json:"nat-outgoing,omitempty" validate:"omitempty,mustBeFalse"` }
IPPoolSpec contains the specification for an IPPool resource.
type ServiceClusterIPBlock ¶
type ServiceClusterIPBlock struct {
CIDR string `json:"cidr,omitempty" validate:"omitempty,net"`
}
ServiceClusterIPBlock represents a single whitelisted CIDR block for ClusterIPs.
type ServiceExternalIPBlock ¶
type ServiceExternalIPBlock struct {
CIDR string `json:"cidr,omitempty" validate:"omitempty,net"`
}
ServiceExternalIPBlock represents a single whitelisted CIDR External IP block.