federation

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const ClusterNameAnnotation = "federation.alpha.kubernetes.io/cluster-name"

ClusterNameAnnotation is the annotation which holds the name of the cluster that an object is associated with. If the object is not associated with any cluster, then this annotation is not required.

View Source
const FederationNameAnnotation = "federation.alpha.kubernetes.io/federation-name"

FederationNameAnnotation is the annotation which holds the name of the federation that a federation control plane component is associated with. It must be applied to all the API types that represent that federations control plane's components in the host cluster and in joining clusters.

View Source
const GroupName = "federation"

GroupName is the group name use in this package

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns a Group qualified GroupKind

func RegisterDeepCopies deprecated added in v1.4.0

func RegisterDeepCopies(scheme *runtime.Scheme) error

RegisterDeepCopies adds deep-copy functions to the given scheme. Public to allow building arbitrary schemes.

Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type Cluster

type Cluster struct {
	metav1.TypeMeta
	// Standard object's metadata.
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
	// +optional
	metav1.ObjectMeta

	// Spec defines the behavior of the Cluster.
	// +optional
	Spec ClusterSpec
	// Status describes the current status of a Cluster
	// +optional
	Status ClusterStatus
}

Information about a registered cluster in a federated kubernetes setup. Clusters are not namespaced and have unique names in the federation.

func (*Cluster) DeepCopy added in v1.8.0

func (in *Cluster) DeepCopy() *Cluster

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

func (*Cluster) DeepCopyInto added in v1.8.0

func (in *Cluster) DeepCopyInto(out *Cluster)

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

func (*Cluster) DeepCopyObject added in v1.8.0

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

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

type ClusterCondition

type ClusterCondition struct {
	// Type of cluster condition, Complete or Failed.
	Type ClusterConditionType
	// Status of the condition, one of True, False, Unknown.
	Status api.ConditionStatus
	// Last time the condition was checked.
	// +optional
	LastProbeTime metav1.Time
	// Last time the condition transit from one status to another.
	// +optional
	LastTransitionTime metav1.Time
	// (brief) reason for the condition's last transition.
	// +optional
	Reason string
	// Human readable message indicating details about last transition.
	// +optional
	Message string
}

ClusterCondition describes current state of a cluster.

func (*ClusterCondition) DeepCopy added in v1.8.0

func (in *ClusterCondition) DeepCopy() *ClusterCondition

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

func (*ClusterCondition) DeepCopyInto added in v1.8.0

func (in *ClusterCondition) DeepCopyInto(out *ClusterCondition)

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

type ClusterConditionType

type ClusterConditionType string
const (
	// ClusterReady means the cluster is ready to accept workloads.
	ClusterReady ClusterConditionType = "Ready"
	// ClusterOffline means the cluster is temporarily down or not reachable
	ClusterOffline ClusterConditionType = "Offline"
)

These are valid conditions of a cluster.

type ClusterList

type ClusterList struct {
	metav1.TypeMeta
	// Standard list metadata.
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
	// +optional
	metav1.ListMeta

	// List of Cluster objects.
	Items []Cluster
}

A list of all the kubernetes clusters registered to the federation

func (*ClusterList) DeepCopy added in v1.8.0

func (in *ClusterList) DeepCopy() *ClusterList

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

func (*ClusterList) DeepCopyInto added in v1.8.0

func (in *ClusterList) DeepCopyInto(out *ClusterList)

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

func (*ClusterList) DeepCopyObject added in v1.8.0

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

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

type ClusterPreferences added in v1.7.0

type ClusterPreferences struct {
	// Minimum number of replicas that should be assigned to this cluster workload object. 0 by default.
	// +optional
	MinReplicas int64

	// Maximum number of replicas that should be assigned to this cluster workload object.
	// Unbounded if no value provided (default).
	// +optional
	MaxReplicas *int64

	// A number expressing the preference to put an additional replica to this cluster workload object.
	// 0 by default.
	Weight int64
}

Preferences regarding number of replicas assigned to a cluster workload object (dep, rs, ..) within a federated workload object.

func (*ClusterPreferences) DeepCopy added in v1.8.0

func (in *ClusterPreferences) DeepCopy() *ClusterPreferences

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

func (*ClusterPreferences) DeepCopyInto added in v1.8.0

func (in *ClusterPreferences) DeepCopyInto(out *ClusterPreferences)

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

type ClusterServiceIngress added in v1.7.0

type ClusterServiceIngress struct {
	// Cluster is the name of the federated cluster
	Cluster string `json:"cluster"`
	// List of loadbalancer ingresses of a federated service within a federated cluster
	Items []v1.LoadBalancerIngress `json:"items"`
}

Loadbalancer ingresses of a service within a federated cluster

func (*ClusterServiceIngress) DeepCopy added in v1.8.0

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

func (*ClusterServiceIngress) DeepCopyInto added in v1.8.0

func (in *ClusterServiceIngress) DeepCopyInto(out *ClusterServiceIngress)

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

type ClusterSpec

type ClusterSpec struct {
	// A map of client CIDR to server address.
	// This is to help clients reach servers in the most network-efficient way possible.
	// Clients can use the appropriate server address as per the CIDR that they match.
	// In case of multiple matches, clients should use the longest matching CIDR.
	ServerAddressByClientCIDRs []ServerAddressByClientCIDR
	// Name of the secret containing kubeconfig to access this cluster.
	// The secret is read from the kubernetes cluster that is hosting federation control plane.
	// Admin needs to ensure that the required secret exists. Secret should be in the same namespace where federation control plane is hosted and it should have kubeconfig in its data with key "kubeconfig".
	// This will later be changed to a reference to secret in federation control plane when the federation control plane supports secrets.
	// This can be left empty if the cluster allows insecure access.
	// +optional
	SecretRef *api.LocalObjectReference
}

ClusterSpec describes the attributes of a kubernetes cluster.

func (*ClusterSpec) DeepCopy added in v1.8.0

func (in *ClusterSpec) DeepCopy() *ClusterSpec

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

func (*ClusterSpec) DeepCopyInto added in v1.8.0

func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec)

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

type ClusterStatus

type ClusterStatus struct {
	// Conditions is an array of current cluster conditions.
	// +optional
	Conditions []ClusterCondition
	// Zones is the list of availability zones in which the nodes of the cluster exist, e.g. 'us-east1-a'.
	// These will always be in the same region.
	// +optional
	Zones []string
	// Region is the name of the region in which all of the nodes in the cluster exist.  e.g. 'us-east1'.
	// +optional
	Region string
}

ClusterStatus is information about the current status of a cluster updated by cluster controller periodically.

func (*ClusterStatus) DeepCopy added in v1.8.0

func (in *ClusterStatus) DeepCopy() *ClusterStatus

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

func (*ClusterStatus) DeepCopyInto added in v1.8.0

func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus)

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

type FederatedServiceIngress added in v1.7.0

type FederatedServiceIngress struct {
	// List of loadbalancer ingress of a service in all federated clusters
	// +optional
	Items []ClusterServiceIngress `json:"items,omitempty"`
}

Annotation for a federated service to keep record of service loadbalancer ingresses in federated cluster

func (*FederatedServiceIngress) DeepCopy added in v1.8.0

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

func (*FederatedServiceIngress) DeepCopyInto added in v1.8.0

func (in *FederatedServiceIngress) DeepCopyInto(out *FederatedServiceIngress)

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

type ReplicaAllocationPreferences added in v1.7.0

type ReplicaAllocationPreferences struct {
	// If set to true then already scheduled and running replicas may be moved to other clusters
	// in order to match current state to the specified preferences. Otherwise, if set to false,
	// up and running replicas will not be moved.
	// +optional
	Rebalance bool

	// A mapping between cluster names and preferences regarding a local workload object (dep, rs, .. ) in
	// these clusters.
	// "*" (if provided) applies to all clusters if an explicit mapping is not provided.
	// If omitted, clusters without explicit preferences should not have any replicas scheduled.
	// +optional
	Clusters map[string]ClusterPreferences
}

A set of preferences that can be added to federated version of workloads (deployments, replicasets, ..) as a json-serialized annotation. The preferences allow the users to express in which clusters they want to put their replicas within the mentioned workload objects.

func (*ReplicaAllocationPreferences) DeepCopy added in v1.8.0

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

func (*ReplicaAllocationPreferences) DeepCopyInto added in v1.8.0

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

type ServerAddressByClientCIDR

type ServerAddressByClientCIDR struct {
	// The CIDR with which clients can match their IP to figure out the server address that they should use.
	ClientCIDR string
	// Address of this server, suitable for a client that matches the above CIDR.
	// This can be a hostname, hostname:port, IP or IP:port.
	ServerAddress string
}

ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.

func (*ServerAddressByClientCIDR) DeepCopy added in v1.8.0

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

func (*ServerAddressByClientCIDR) DeepCopyInto added in v1.8.0

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

Directories

Path Synopsis
+k8s:deepcopy-gen=package,register +k8s:conversion-gen=k8s.io/kubernetes/federation/apis/federation +k8s:openapi-gen=true +k8s:defaulter-gen=TypeMeta Package v1beta1 is a generated protocol buffer package.
+k8s:deepcopy-gen=package,register +k8s:conversion-gen=k8s.io/kubernetes/federation/apis/federation +k8s:openapi-gen=true +k8s:defaulter-gen=TypeMeta Package v1beta1 is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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