v1alpha1

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2021 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"}

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

	ClusterConfigGroupVersionResource = schema.GroupVersionResource{
		Group:    GroupVersion.Group,
		Resource: "clusterconfigs",
		Version:  GroupVersion.Version,
	}

	// 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, watchResources bool) (*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"`
	// LabelPolicies contains the policies for each label to be added to remote virtual nodes
	LabelPolicies []LabelPolicy `json:"labelPolicies,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 AgentConfig

type AgentConfig struct {
	//DashboardConfig contains the parameters required by LiqoAgent
	//to provide access to LiqoDash (https://github.com/liqotech/dashboard).
	DashboardConfig DashboardConfig `json:"dashboardConfig"`
}

func (*AgentConfig) DeepCopy

func (in *AgentConfig) DeepCopy() *AgentConfig

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

func (*AgentConfig) DeepCopyInto

func (in *AgentConfig) DeepCopyInto(out *AgentConfig)

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

type ApiServerConfig

type ApiServerConfig struct {
	Address   string `json:"address,omitempty"`
	Port      string `json:"port,omitempty"`
	TrustedCA bool   `json:"trustedCA,omitempty"`
}

func (*ApiServerConfig) DeepCopy

func (in *ApiServerConfig) DeepCopy() *ApiServerConfig

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

func (*ApiServerConfig) DeepCopyInto

func (in *ApiServerConfig) DeepCopyInto(out *ApiServerConfig)

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

type AuthConfig

type AuthConfig struct {
	// Allow remote clusters to get an identity with an empty token
	// +kubebuilder:default=false
	AllowEmptyToken bool `json:"allowEmptyToken,omitempty"`
}

func (*AuthConfig) DeepCopy

func (in *AuthConfig) DeepCopy() *AuthConfig

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

func (*AuthConfig) DeepCopyInto

func (in *AuthConfig) DeepCopyInto(out *AuthConfig)

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

type CIDR string

+kubebuilder:validation:Pattern="^([0-9]{1,3}.){3}[0-9]{1,3}(/([0-9]|[1-2][0-9]|3[0-2]))$"

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 {
	ApiServerConfig ApiServerConfig `json:"apiServerConfig,omitempty"`
	//AdvertisementConfig defines the configuration for the advertisement protocol
	AdvertisementConfig AdvertisementConfig `json:"advertisementConfig"`
	DiscoveryConfig     DiscoveryConfig     `json:"discoveryConfig"`
	AuthConfig          AuthConfig          `json:"authConfig"`
	LiqonetConfig       LiqonetConfig       `json:"liqonetConfig"`
	DispatcherConfig    DispatcherConfig    `json:"dispatcherConfig,omitempty"`
	//AgentConfig defines the configuration required by the LiqoAgent app to enable some features on
	//a Liqo cluster.
	//
	//LiqoAgent (https://github.com/liqotech/liqo-agent) is an external desktop application that
	//allows the user to interact more easily with a Liqo cluster.
	AgentConfig AgentConfig `json:"agentConfig"`
}

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 DashboardConfig

type DashboardConfig struct {
	// Namespace defines the namespace LiqoDash resources belongs to.
	Namespace string `json:"namespace"`
	// AppLabel defines the value of the 'app' label. All LiqoDash
	// related resources are labelled with it.
	AppLabel string `json:"appLabel"`
}

func (*DashboardConfig) DeepCopy

func (in *DashboardConfig) DeepCopy() *DashboardConfig

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

func (*DashboardConfig) DeepCopyInto

func (in *DashboardConfig) DeepCopyInto(out *DashboardConfig)

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

type DiscoveryConfig

type DiscoveryConfig struct {
	// ClusterName is a nickname for your cluster that can be easily understood by a user
	ClusterName string `json:"clusterName,omitempty"`

	Name    string `json:"name"`
	Service string `json:"service"`
	// +kubebuilder:default="_liqo_auth._tcp"
	AuthService string `json:"authService,omitempty"`
	Domain      string `json:"domain"`
	// +kubebuilder:validation:Maximum=65355
	// +kubebuilder:validation:Minimum=1
	Port int `json:"port"`
	// +kubebuilder:validation:Minimum=30
	Ttl uint32 `json:"ttl"`

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

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

	AuthServiceAddress string `json:"authServiceAddress,omitempty"`
	AuthServicePort    string `json:"authServicePort,omitempty"`
}

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 LabelPolicy

type LabelPolicy struct {
	// Label Key to be aggregated in new virtual nodes
	Key string `json:"key"`
	// Merge labels Policy
	// +kubebuilder:validation:Enum="LabelPolicyAnyTrue";"LabelPolicyAllTrue";"LabelPolicyAnyTrueNoLabelIfFalse";"LabelPolicyAllTrueNoLabelIfFalse"
	// +kubebuilder:default="LabelPolicyAnyTrue"
	Policy labelPolicy.LabelPolicyType `json:"policy,omitempty"`
}

LabelPolicy define a key-value structure to indicate which keys have to be aggregated and with which policy

func (*LabelPolicy) DeepCopy

func (in *LabelPolicy) DeepCopy() *LabelPolicy

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

func (*LabelPolicy) DeepCopyInto

func (in *LabelPolicy) DeepCopyInto(out *LabelPolicy)

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.
	//Subnets listed in this field are excluded from the list of possible subnets used for natting POD CIDR.
	//Add here the subnets already used in your environment as a list in CIDR notation (e.g. [10.1.0.0/16, 10.200.1.0/24]).
	ReservedSubnets []CIDR `json:"reservedSubnets"`
	//the subnet used by the cluster for the pods, in CIDR notation
	// +kubebuilder:validation:Pattern="^([0-9]{1,3}.){3}[0-9]{1,3}(/([0-9]|[1-2][0-9]|3[0-2]))$"
	PodCIDR string `json:"podCIDR"`
	//the subnet used by the cluster for the services, in CIDR notation
	// +kubebuilder:validation:Pattern="^([0-9]{1,3}.){3}[0-9]{1,3}(/([0-9]|[1-2][0-9]|3[0-2]))$"
	ServiceCIDR string `json:"serviceCIDR"`
	//set this flag to true if you are using GKE, default value is "false"
	// +kubebuilder:default=false
	GKEProvider bool `json:"GKEProvider"`
	// Set of additional user-defined network pools. Default set of network pools is: [192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12]
	AdditionalPools []CIDR `json:"additionalPools"`
}

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