v1alpha1

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API.

Index

Constants

View Source
const GroupName = "machine.flomesh.io"

GroupName specifies the group name used to register the objects.

Variables

View Source
var (
	// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
	SchemeBuilder runtime.SchemeBuilder

	// Deprecated: use Install instead
	AddToScheme = localSchemeBuilder.AddToScheme
	Install     = localSchemeBuilder.AddToScheme
)
View Source
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v1alpha1"}

GroupVersion specifies the group and the version used to register the objects.

View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects Deprecated: use GroupVersion instead.

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type ServiceSpec

type ServiceSpec struct {
	// Name defines the service's name
	ServiceName string `json:"serviceName"`

	// The name of this port within the service. This must be a DNS_LABEL.
	// All ports within a ServiceSpec must have unique names. When considering
	// the endpoints for a Service, this must match the 'name' field in the
	// EndpointPort.
	// Optional if only one ServicePort is defined on this service.
	// +optional
	PortName string `json:"portName,omitempty"`

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

	// The application protocol for this port.
	// This field follows standard Kubernetes label syntax.
	// Un-prefixed names are reserved for IANA standard service names (as per
	// RFC-6335 and https://www.iana.org/assignments/service-names).
	// Non-standard protocols should use prefixed names such as
	// mycompany.com/my-custom-protocol.
	// +optional
	AppProtocol *string `json:"appProtocol,omitempty"`

	// The port that will be exposed by this service.
	Port int32 `json:"port"`
}

ServiceSpec describes the attributes that a user creates on a service.

func (*ServiceSpec) DeepCopy

func (in *ServiceSpec) DeepCopy() *ServiceSpec

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

func (*ServiceSpec) DeepCopyInto

func (in *ServiceSpec) DeepCopyInto(out *ServiceSpec)

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

type VMSpec

type VMSpec struct {
	// MachineIP is the IP address of the vm
	MachineIP string `json:"machineIP"`

	// IPFamily is one of IP families (e.g. IPv4, IPv6) assigned to this vm
	// +optional
	IPFamily corev1.IPFamily `json:"ipFamily,omitempty"`

	// ServiceAccountName is the name of the ServiceAccount to use to run this VM.
	// +optional
	ServiceAccountName string `json:"serviceAccountName,omitempty"`

	// The list of services that are exposed by this vm.
	// +optional
	Services []ServiceSpec `json:"services,omitempty"`

	// Periodic probe of container liveness.
	// Container will be restarted if the probe fails.
	// Cannot be updated.
	// More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
	// +optional
	LivenessProbe *corev1.Probe `json:"livenessProbe,omitempty"`
	// Periodic probe of container service readiness.
	// Container will be removed from service endpoints if the probe fails.
	// Cannot be updated.
	// More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
	// +optional
	ReadinessProbe *corev1.Probe `json:"readinessProbe,omitempty"`
	// StartupProbe indicates that the Pod has successfully initialized.
	// If specified, no other probes are executed until this completes successfully.
	// If this probe fails, the Pod will be restarted, just as if the livenessProbe failed.
	// This can be used to provide different probe parameters at the beginning of a Pod's lifecycle,
	// when it might take a long time to load data or warm a cache, than during steady-state operation.
	// This cannot be updated.
	// More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
	// +optional
	StartupProbe *corev1.Probe `json:"startupProbe,omitempty"`
}

VMSpec is the type used to represent the VirtualMachine specification.

func (*VMSpec) DeepCopy

func (in *VMSpec) DeepCopy() *VMSpec

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

func (*VMSpec) DeepCopyInto

func (in *VMSpec) DeepCopyInto(out *VMSpec)

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

type VMStatus

type VMStatus struct {
	// CurrentStatus defines the current status of a VirtualMachine resource.
	// +optional
	CurrentStatus string `json:"currentStatus,omitempty"`

	// Reason defines the reason for the current status of a VirtualMachine resource.
	// +optional
	Reason string `json:"reason,omitempty"`
}

VMStatus is the type used to represent the status of a VirtualMachine resource.

func (*VMStatus) DeepCopy

func (in *VMStatus) DeepCopy() *VMStatus

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

func (*VMStatus) DeepCopyInto

func (in *VMStatus) DeepCopyInto(out *VMStatus)

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

type VirtualMachine

type VirtualMachine struct {
	// Object's type metadata
	metav1.TypeMeta `json:",inline"`

	// Object's metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec is the VirtualMachine specification
	Spec VMSpec `json:"spec"`

	// Status is the status of the VirtualMachine configuration.
	// +optional
	Status VMStatus `json:"status,omitempty"`
}

VirtualMachine is the type used to represent a VirtualMachine resource. +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:metadata:labels=app.kubernetes.io/name=flomesh.io +kubebuilder:resource:shortName=vm,scope=Namespaced

func (*VirtualMachine) DeepCopy

func (in *VirtualMachine) DeepCopy() *VirtualMachine

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

func (*VirtualMachine) DeepCopyInto

func (in *VirtualMachine) DeepCopyInto(out *VirtualMachine)

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

func (*VirtualMachine) DeepCopyObject

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

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

type VirtualMachineList

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

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

VirtualMachineList defines the list of VirtualMachine objects. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*VirtualMachineList) DeepCopy

func (in *VirtualMachineList) DeepCopy() *VirtualMachineList

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

func (*VirtualMachineList) DeepCopyInto

func (in *VirtualMachineList) DeepCopyInto(out *VirtualMachineList)

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

func (*VirtualMachineList) DeepCopyObject

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

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

Jump to

Keyboard shortcuts

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