Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func K3dCalicoBGPPeeringObjects ¶
func K3dCalicoBGPPeeringObjects(opts K3dCalicoBGPPeeringOptions) map[string][]Object
K3dCalicoBGPPeeringObjects returns the objects needed for connecting k3d clusters via BGP.
func RegisterCalicoGVK ¶
RegisterCalicoGVK is a helper method for adding calico objects returned by this package to the scheme.
Types ¶
type K3dCalicoBGPPeeringOptions ¶
type K3dCalicoBGPPeeringOptions struct {
ClusterConfig map[string]K3dClusterBGPConfig
}
K3dCalicoBGPPeeringOptions determines how to set up bpg peering among several k3d clusters.
type K3dClusterBGPConfig ¶
type K3dClusterBGPConfig struct {
// AddressAllocation determines the pod cidr, service cidr, asNumber
// as follows:
// PodCIDR: 10.<alloc>.0.0/17
// ServiceCIDR: 10.<alloc>.128.0/17
// ASNumber: 64512 + <alloc>
AddressAllocation int
PeeringNodes []string
}
K3dClusterBGPConfig describes the bgp config of a cluster.
func (*K3dClusterBGPConfig) GetASNumber ¶
func (c *K3dClusterBGPConfig) GetASNumber() uint32
GetASNumber returns the AS number for the cluster.
func (*K3dClusterBGPConfig) GetPodCIDR ¶
func (c *K3dClusterBGPConfig) GetPodCIDR() string
GetPodCIDR returns the pod cidr for the cluster.
func (*K3dClusterBGPConfig) GetServiceCIDR ¶
func (c *K3dClusterBGPConfig) GetServiceCIDR() string
GetServiceCIDR returns the service cidr for the cluster.
type Object ¶
func DecodeYAML ¶
DecodeYAML returns decoded Kubernetes YAML manifests from the internal/yaml directory. If asset cannot be found or if asset is invalid YAML, DecodeYAML panics.
func FromRuntime ¶
FromRuntime converts a runtime.Object into an Object. This may fail if the input object is an ObjectList.
func K3DCalicoCNI ¶
func K3DCalicoCNI(opts K3dClusterBGPConfig) []Object
K3DCalicoCNI returns objects that can be used for installing calico as the CNI plugin for the k8s cluster. This is *only* intended for use with k3d environment for local development or testing.