v1alpha1

package
v1.29.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

TODO: Change group name to discovery.k8s.io after approved Package v1alpha1 is the v1alpha1 version of the API. +groupName=networking.gke.io

Index

Constants

View Source
const (
	AddressTypeIPv4 = AddressType(api.IPv4Protocol)
	AddressTypeIPv6 = AddressType(api.IPv6Protocol)
)
View Source
const (
	// WorkloadConditionHeartbeat is the heartbeat from the external workload.
	// Heartbeat provides a simple liveness check.
	WorkloadConditionHeartbeat = "Heartbeat"
	// WorkloadConditionPing is the ping to the workload from the cluster.
	// Ping provides a simple reachability check.
	// Note: not implemented yet
	WorkloadConditionPing = "Ping"
	// WorkloadConditionReady indicates the workload is able to handle requests.
	// Note: not implemented yet
	WorkloadConditionReady = "Ready"
)

The following constants define the types of conditions of an external workload

View Source
const (
	ConditionStatusTrue    = ConditionStatus("True")
	ConditionStatusFalse   = ConditionStatus("False")
	ConditionStatusUnknown = ConditionStatus("Unknown")
)

Variables

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

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 back a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type AddressType

type AddressType string

AddressType represents the type of an external workload address. +k8s:openapi-gen=true

type Condition

type Condition struct {
	// Type of condition in CamelCase or in foo.example.com/CamelCase.
	// Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
	// useful (see .node.status.conditions), the ability to deconflict is important.
	// +required
	Type string `json:"type" protobuf:"bytes,1,opt,name=type"`
	// Status of the condition, one of True, False, Unknown.
	// +required
	Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status"`
	// If set, this represents the .metadata.generation that the condition was set based upon.
	// For instance, if .metadata.generation is currently 12, but the .status.condition[x].observedGeneration is 9, the condition is out of date
	// with respect to the current state of the instance.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,3,opt,name=observedGeneration"`
	// Last time the condition transitioned from one status to another.
	// This should be when the underlying condition changed.  If that is not known, then using the time when the API field changed is acceptable.
	// +required
	LastTransitionTime metav1.Time `json:"lastTransitionTime" protobuf:"bytes,4,opt,name=lastTransitionTime"`
	// The reason for the condition's last transition in CamelCase.
	// The specific API may choose whether or not this field is considered a guaranteed API.
	// This field may not be empty.
	// +required
	Reason string `json:"reason" protobuf:"bytes,5,opt,name=reason"`
	// A human readable message indicating details about the transition.
	// This field may be empty.
	// +required
	Message string `json:"message" protobuf:"bytes,6,opt,name=message"`
}

+k8s:openapi-gen=true

func (*Condition) DeepCopy

func (in *Condition) DeepCopy() *Condition

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

func (*Condition) DeepCopyInto

func (in *Condition) DeepCopyInto(out *Condition)

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

type ConditionStatus

type ConditionStatus string

+k8s:openapi-gen=true

type ExternalWorkloadAddress

type ExternalWorkloadAddress struct {
	// Address is the address of the workload exposed to the cluster.
	Address string `json:"address"`
	// AddressType specifies the address type of the external workload.
	AddressType AddressType `json:"addressType"`
}

ExternalWorkloadAddress represents an address used by an ExternalWorkload +k8s:openapi-gen=true

func (*ExternalWorkloadAddress) DeepCopy

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

func (*ExternalWorkloadAddress) DeepCopyInto

func (in *ExternalWorkloadAddress) DeepCopyInto(out *ExternalWorkloadAddress)

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

type Workload

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

	Spec   WorkloadSpec   `json:"spec,omitempty"`
	Status WorkloadStatus `json:"status,omitempty"`
}

+genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

+k8s:openapi-gen=true +kubebuilder:subresource:status

func (*Workload) DeepCopy

func (in *Workload) DeepCopy() *Workload

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

func (*Workload) DeepCopyInto

func (in *Workload) DeepCopyInto(out *Workload)

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

func (*Workload) DeepCopyObject

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

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

type WorkloadList

type WorkloadList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []Workload `json:"items"`
}

WorkloadList is a list of Workload resources

func (*WorkloadList) DeepCopy

func (in *WorkloadList) DeepCopy() *WorkloadList

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

func (*WorkloadList) DeepCopyInto

func (in *WorkloadList) DeepCopyInto(out *WorkloadList)

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

func (*WorkloadList) DeepCopyObject

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

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

type WorkloadSpec

type WorkloadSpec struct {
	// EnableHeartbeat indicates whether Heartbeat condition is enabled on this ExternalWorkload.
	EnableHeartbeat bool `json:"enableHeartbeat"`
	// EnablePing indicates whether Ping condition is enabled on this ExternalWorkload.
	EnablePing bool `json:"enablePing"`
	// Hostname is the hostname of this workload.
	Hostname *string `json:"hostname,omitempty"`
	// Addresses specifies the addresses that can be used to access the workload from the cluster.
	// +listType=atomic
	Addresses []ExternalWorkloadAddress `json:"addresses"`
}

WorkloadSpec is the spec for a Workload resource +k8s:openapi-gen=true

func (*WorkloadSpec) DeepCopy

func (in *WorkloadSpec) DeepCopy() *WorkloadSpec

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

func (*WorkloadSpec) DeepCopyInto

func (in *WorkloadSpec) DeepCopyInto(out *WorkloadSpec)

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

type WorkloadStatus

type WorkloadStatus struct {
	// TODO: Use standardized conditions (KEP-1623)
	// +optional
	// +listType=map
	// +listMapKey=type
	Conditions []Condition `json:"conditions"`
}

WorkloadStatus is the status for a Workload resource +k8s:openapi-gen=true

func (*WorkloadStatus) DeepCopy

func (in *WorkloadStatus) DeepCopy() *WorkloadStatus

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

func (*WorkloadStatus) DeepCopyInto

func (in *WorkloadStatus) DeepCopyInto(out *WorkloadStatus)

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