v1alpha1

package
v0.0.0-...-5a253b8 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the policy v1 API group +kubebuilder:object:generate=true +groupName=config.liqo.io

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "config.liqo.io", Version: "v1alpha1"}

	GroupResource = schema.GroupResource{Group: GroupVersion.Group, Resource: "clusterconfigs"}

	// 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

func CreateClusterConfigClient

func CreateClusterConfigClient(kubeconfig string) (*crdClient.CRDClient, error)

create a client for ClusterConfig CR using a provided kubeconfig

func Keyer

func Keyer(obj runtime.Object) (string, error)

Types

type AcceptPolicy

type AcceptPolicy string

AcceptPolicy defines the policy to accept/refuse an Advertisement

const (
	// AutoAcceptMax means all the Advertisement received will be accepted until the MaxAcceptableAdvertisement limit is reached
	// AutoAcceptAll can be achieved by setting MaxAcceptableAdvertisement to 1000000
	// AutoRefuseAll can be achieved by setting MaxAcceptableAdvertisement to 0
	AutoAcceptMax AcceptPolicy = "AutoAcceptMax"
	// ManualAccept means every Advertisement received will need a manual accept/refuse, which can be done by updating its status
	ManualAccept AcceptPolicy = "Manual"
)

type AdvOperatorConfig

type AdvOperatorConfig struct {
	// MaxAcceptableAdvertisement defines the maximum number of Advertisements that can be accepted over time.
	// The maximum value for this field is set to 1000000, a symbolic value that implements the AcceptAll policy.
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:Maximum=1000000
	MaxAcceptableAdvertisement int32 `json:"maxAcceptableAdvertisement"`
	// AcceptPolicy defines the policy to accept/refuse an Advertisement.
	// Possible values are AutoAcceptMax and Manual.
	// AutoAcceptMax means all the Advertisement received will be accepted until the MaxAcceptableAdvertisement limit is reached;
	// Manual means every Advertisement received will need a manual accept/refuse, which can be done by updating its status.
	// +kubebuilder:validation:Enum="AutoAcceptMax";"Manual"
	AcceptPolicy AcceptPolicy `json:"acceptPolicy"`
}

func (*AdvOperatorConfig) DeepCopy

func (in *AdvOperatorConfig) DeepCopy() *AdvOperatorConfig

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

func (*AdvOperatorConfig) DeepCopyInto

func (in *AdvOperatorConfig) DeepCopyInto(out *AdvOperatorConfig)

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

type AdvertisementConfig

type AdvertisementConfig struct {
	//OutgoingConfig defines the behaviour for the creation of Advertisements on other clusters
	OutgoingConfig BroadcasterConfig `json:"outgoingConfig"`
	//IngoingConfig defines the behaviour for the acceptance of Advertisements from other clusters
	IngoingConfig AdvOperatorConfig `json:"ingoingConfig"`
	//KeepaliveThreshold defines the number of failed attempts to contact the foreign cluster your cluster will tolerate before deleting it.
	// +kubebuilder:validation:Minimum=0
	KeepaliveThreshold int32 `json:"keepaliveThreshold,omitempty"`
	//After establishing a sharing with a foreign cluster, a keepalive mechanism starts, in order to know if the foreign cluster is reachable or not.
	//KeepaliveRetryTime defines the time between an attempt to contact the foreign cluster and the next one.
	// +kubebuilder:validation:Minimum=0
	KeepaliveRetryTime int32 `json:"keepaliveRetryTime,omitempty"`
}

AdvertisementConfig defines the configuration for the advertisement protocol

func (*AdvertisementConfig) DeepCopy

func (in *AdvertisementConfig) DeepCopy() *AdvertisementConfig

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

func (*AdvertisementConfig) DeepCopyInto

func (in *AdvertisementConfig) DeepCopyInto(out *AdvertisementConfig)

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

type BroadcasterConfig

type BroadcasterConfig struct {
	//ResourceSharingPercentage defines the percentage of your cluster resources that you will share with foreign clusters.
	// +kubebuilder:validation:Maximum=100
	// +kubebuilder:validation:Minimum=0
	ResourceSharingPercentage int32 `json:"resourceSharingPercentage"`
	//EnableBroadcaster flag allows you to enable/disable the broadcasting of your Advertisement to the foreign clusters.
	//When EnableBroadcaster is set to false, the home cluster notifies to the foreign he wants to stop sharing resources
	//by setting the Advertisement status to Deleting. This will trigger the deletion of the virtual-kubelet and, after that, of the Advertisement,
	EnableBroadcaster bool `json:"enableBroadcaster"`
}

func (*BroadcasterConfig) DeepCopy

func (in *BroadcasterConfig) DeepCopy() *BroadcasterConfig

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

func (*BroadcasterConfig) DeepCopyInto

func (in *BroadcasterConfig) DeepCopyInto(out *BroadcasterConfig)

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

type ClusterConfig

type ClusterConfig struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ClusterConfigSpec   `json:"spec,omitempty"`
	Status ClusterConfigStatus `json:"status,omitempty"`
}

ClusterConfig is the Schema for the clusterconfigs API

func (*ClusterConfig) DeepCopy

func (in *ClusterConfig) DeepCopy() *ClusterConfig

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

func (*ClusterConfig) DeepCopyInto

func (in *ClusterConfig) DeepCopyInto(out *ClusterConfig)

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

func (*ClusterConfig) DeepCopyObject

func (in *ClusterConfig) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ClusterConfigList

type ClusterConfigList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ClusterConfig `json:"items"`
}

ClusterConfigList contains a list of ClusterConfig

func (*ClusterConfigList) DeepCopy

func (in *ClusterConfigList) DeepCopy() *ClusterConfigList

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

func (*ClusterConfigList) DeepCopyInto

func (in *ClusterConfigList) DeepCopyInto(out *ClusterConfigList)

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

func (*ClusterConfigList) DeepCopyObject

func (in *ClusterConfigList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ClusterConfigSpec

type ClusterConfigSpec struct {
	//AdvertisementConfig defines the configuration for the advertisement protocol
	AdvertisementConfig AdvertisementConfig `json:"advertisementConfig"`
	DiscoveryConfig     DiscoveryConfig     `json:"discoveryConfig"`
	LiqonetConfig       LiqonetConfig       `json:"liqonetConfig"`
	DispatcherConfig    DispatcherConfig    `json:"dispatcherConfig,omitempty"`
}

ClusterConfigSpec defines the desired state of ClusterConfig

func (*ClusterConfigSpec) DeepCopy

func (in *ClusterConfigSpec) DeepCopy() *ClusterConfigSpec

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

func (*ClusterConfigSpec) DeepCopyInto

func (in *ClusterConfigSpec) DeepCopyInto(out *ClusterConfigSpec)

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

type ClusterConfigStatus

type ClusterConfigStatus struct {
}

ClusterConfigStatus defines the observed state of ClusterConfig

func (*ClusterConfigStatus) DeepCopy

func (in *ClusterConfigStatus) DeepCopy() *ClusterConfigStatus

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

func (*ClusterConfigStatus) DeepCopyInto

func (in *ClusterConfigStatus) DeepCopyInto(out *ClusterConfigStatus)

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

type DiscoveryConfig

type DiscoveryConfig struct {
	Name    string `json:"name"`
	Service string `json:"service"`
	Domain  string `json:"domain"`
	// +kubebuilder:validation:Maximum=65355
	// +kubebuilder:validation:Minimum=1
	Port int `json:"port"`

	// +kubebuilder:validation:Minimum=1
	WaitTime int `json:"waitTime"`
	// +kubebuilder:validation:Minimum=2
	UpdateTime int `json:"updateTime"`

	EnableDiscovery     bool `json:"enableDiscovery"`
	EnableAdvertisement bool `json:"enableAdvertisement"`

	AutoJoin          bool `json:"autojoin"`
	AutoJoinUntrusted bool `json:"autojoinUntrusted"`

	DnsServer string `json:"dnsServer"`

	AllowUntrustedCA bool `json:"allowUntrustedCA"`
}

func (*DiscoveryConfig) DeepCopy

func (in *DiscoveryConfig) DeepCopy() *DiscoveryConfig

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

func (*DiscoveryConfig) DeepCopyInto

func (in *DiscoveryConfig) DeepCopyInto(out *DiscoveryConfig)

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

type DispatcherConfig

type DispatcherConfig struct {
	ResourcesToReplicate []Resource `json:"resourcesToReplicate,omitempty"`
}

func (*DispatcherConfig) DeepCopy

func (in *DispatcherConfig) DeepCopy() *DispatcherConfig

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

func (*DispatcherConfig) DeepCopyInto

func (in *DispatcherConfig) DeepCopyInto(out *DispatcherConfig)

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

type LiqonetConfig

type LiqonetConfig struct {
	//this field is used by the IPAM embedded in the tunnelEndpointCreator
	//if the podCIDR of a peering cluster needs to be NATed a new subnet from the 10.0.0.0/8
	//is used. if subnets belonging to that range are used in the local cluster then it is necessary to
	//declare them as a list in CIDR notation. ex. [10.1.0.0/16, 10.200.1.0/24]
	ReservedSubnets []string `json:"reservedSubnets"`
	//the subnet used by the cluster for the pods, in CIDR notation
	PodCIDR string `json:"podCIDR"`
	//the subnet used by the cluster for the services, in CIDR notation
	ServiceCIDR string `json:"serviceCIDR"`
	//the configuration for the VXLAN overlay network which handles the traffic in the local cluster destined to remote peering clusters
	VxlanNetConfig liqonet.VxlanNetConfig `json:"vxlanNetConfig,omitempty"`
}

func (*LiqonetConfig) DeepCopy

func (in *LiqonetConfig) DeepCopy() *LiqonetConfig

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

func (*LiqonetConfig) DeepCopyInto

func (in *LiqonetConfig) DeepCopyInto(out *LiqonetConfig)

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

type Resource

type Resource struct {
	Group    string `json:"group"`
	Version  string `json:"version"`
	Resource string `json:"resource"`
}

contains a list of resources identified by their GVR

func (*Resource) DeepCopy

func (in *Resource) DeepCopy() *Resource

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

func (*Resource) DeepCopyInto

func (in *Resource) DeepCopyInto(out *Resource)

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

Jump to

Keyboard shortcuts

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