v1beta1

package
v0.0.0-...-3509752 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package v1beta1 contains API Schema definitions for the maegus v1beta1 API group +k8s:deepcopy-gen=package,register +groupName=maegus.com

Package v1beta1 contains API Schema definitions for the maegus v1beta1 API group +k8s:deepcopy-gen=package,register +groupName=maegus.com

Index

Constants

View Source
const (
	// ConfigMapHashAnnotationKey is the name of an annotation which detects the update of
	// proxier corresponding config map.
	ConfigMapHashAnnotationKey = "proxier.maegus.com/configmap-hash"
)
View Source
const (
	// ProxierKeyLabel is the key of proxier name
	ProxierKeyLabel = "maegus.com/proxier-name"
)

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: "maegus.com", Version: "v1beta1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}

	// AddToScheme .
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

func GetProxierName

func GetProxierName(labels map[string]string) string

GetProxierName returns proxier name from labels.

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns a Group qualified GroupKind

func RegisterDefaults

func RegisterDefaults(scheme *runtime.Scheme) error

RegisterDefaults adds defaulters functions to the given scheme. Public to allow building arbitrary schemes. All generated defaulters are covering - they call all nested defaulters.

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type BackendSpec

type BackendSpec struct {
	// +kubebuilder:validation:MinLength=1
	Name string `json:"name"`

	// +kubebuilder:validation:Minimum=1
	Weight int32 `json:"weight"`

	Selector map[string]string `json:"selector,omitempty"`
}

BackendSpec defines the target backend of Proxier

func (*BackendSpec) DeepCopy

func (in *BackendSpec) DeepCopy() *BackendSpec

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

func (*BackendSpec) DeepCopyInto

func (in *BackendSpec) DeepCopyInto(out *BackendSpec)

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

type Protocol

type Protocol string

Protocol defines network protocols supported for things like container ports.

const (
	// ProtocolTCP is the TCP protocol.
	ProtocolTCP Protocol = "TCP"
	// ProtocolUDP is the UDP protocol.
	ProtocolUDP Protocol = "UDP"
)

type Proxier

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

	Spec   ProxierSpec   `json:"spec,omitempty"`
	Status ProxierStatus `json:"status,omitempty"`
}

Proxier is the Schema for the proxiers API +genclient +k8s:openapi-gen=true +kubebuilder:subresource:status

func (*Proxier) DeepCopy

func (in *Proxier) DeepCopy() *Proxier

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

func (*Proxier) DeepCopyInto

func (in *Proxier) DeepCopyInto(out *Proxier)

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

func (*Proxier) DeepCopyObject

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

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

type ProxierList

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

ProxierList contains a list of Proxier

func (*ProxierList) DeepCopy

func (in *ProxierList) DeepCopy() *ProxierList

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

func (*ProxierList) DeepCopyInto

func (in *ProxierList) DeepCopyInto(out *ProxierList)

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

func (*ProxierList) DeepCopyObject

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

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

type ProxierPort

type ProxierPort struct {
	// The name of this port within the proxier. This must be a DNS_LABEL.
	// All ports within a ServiceSpec must have unique names. This maps to
	// the 'Name' field in EndpointPort objects.
	// Optional if only one ProxierPort is defined on this service.
	// +required
	Name string `json:"name,omitempty"`

	// The IP protocol for this port. Supports "TCP", "UDP".
	// Default is TCP.
	// +optional
	Protocol Protocol `json:"protocol,omitempty"`

	// The port that will be exposed by this proxier
	Port int32 `json:"port"`

	// +optional
	TargetPort intstr.IntOrString `json:"targetPort,omitempty"`
}

ProxierPort contains information on proxier's port.

func (*ProxierPort) DeepCopy

func (in *ProxierPort) DeepCopy() *ProxierPort

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

func (*ProxierPort) DeepCopyInto

func (in *ProxierPort) DeepCopyInto(out *ProxierPort)

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

type ProxierSpec

type ProxierSpec struct {
	// +kubebuilder:validation:MinItems=1
	Backends []BackendSpec `json:"backends"`

	Selector map[string]string `json:"selector,omitempty"`

	Ports []ProxierPort `json:"ports"`
}

ProxierSpec defines the desired state of Proxier +k8s:openapi-gen=true

func (*ProxierSpec) DeepCopy

func (in *ProxierSpec) DeepCopy() *ProxierSpec

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

func (*ProxierSpec) DeepCopyInto

func (in *ProxierSpec) DeepCopyInto(out *ProxierSpec)

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

type ProxierStatus

type ProxierStatus struct {
	// ActiveBackends stores the count of current active services, which are required by the current
	// proxier spec.
	// +optional
	ActiveBackends int32 `json:"activeBackends,omitempty"`

	// ObsoleteBackends stores the count of obsolete services, which should be removed in controller
	// +optional
	ObsoleteBackends int32 `json:"obsoleteBackends,omitempty"`
}

ProxierStatus defines the observed state of Proxier +k8s:openapi-gen=true

func (*ProxierStatus) DeepCopy

func (in *ProxierStatus) DeepCopy() *ProxierStatus

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

func (*ProxierStatus) DeepCopyInto

func (in *ProxierStatus) DeepCopyInto(out *ProxierStatus)

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