kubernetes

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Overview

+kubebuilder:object:generate=true

+kubebuilder:object:generate=true

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StripObjectMeta

func StripObjectMeta(meta *metav1.ObjectMeta)

StripObjectMeta clears all fields except Name, Namespace, UID, ResourceVersion, and Generation.

Types

type Adapter

type Adapter interface {
	client.Object

	GetComponentType() api.ComponentType
	Validate(data *api.Data) api.Problems
	Resolve(data *api.Data) error
}

+kubebuilder:object:generate=false

type ContainerSpec

type ContainerSpec struct {
	// Compute Resources required by this container. Cannot be updated. [More
	// info](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/).
	Resources *corev1.ResourceRequirements `json:"resources,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).
	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).
	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).
	StartupProbe *corev1.Probe `json:"startupProbe,omitempty"`
}

func (*ContainerSpec) DeepCopy

func (in *ContainerSpec) DeepCopy() *ContainerSpec

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

func (*ContainerSpec) DeepCopyInto

func (in *ContainerSpec) DeepCopyInto(out *ContainerSpec)

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

type GetAdapterFunc

type GetAdapterFunc func(name string, typ api.ComponentType) (Adapter, error)

+kubebuilder:object:generate=false

type LoggerSpec

type LoggerSpec struct {
	// +kubebuilder:validation:Enum=debug;info;warn;error
	Level string `json:"level,omitempty"`
	// +kubebuilder:validation:Enum=json;console
	Format string `json:"format,omitempty"`
}

func (*LoggerSpec) DeepCopy

func (in *LoggerSpec) DeepCopy() *LoggerSpec

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

func (*LoggerSpec) DeepCopyInto

func (in *LoggerSpec) DeepCopyInto(out *LoggerSpec)

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

type ObjectRef

type ObjectRef struct {
	Namespace string `json:"namespace,omitempty"`
	Name      string `json:"name,omitempty"`

	UID types.UID `json:"uid"`

	ResourceVersion string `json:"resourceVersion"`

	Generation int64 `json:"generation"`
}

func RefFromMeta

func RefFromMeta(meta metav1.ObjectMeta) ObjectRef

func (*ObjectRef) DeepCopy

func (in *ObjectRef) DeepCopy() *ObjectRef

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

func (*ObjectRef) DeepCopyInto

func (in *ObjectRef) DeepCopyInto(out *ObjectRef)

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

func (ObjectRef) ObjectMeta

func (r ObjectRef) ObjectMeta() metav1.ObjectMeta

func (ObjectRef) ObjectMetaWithName

func (r ObjectRef) ObjectMetaWithName(name string) metav1.ObjectMeta

type PodSpec

type PodSpec struct {
	// Map of string keys and values that can be used to organize and categorize
	// (scope and select) objects. May match selectors of replication
	// controllers and services. [More
	// info](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels).
	Labels map[string]string `json:"labels,omitempty"`
	// Annotations is an unstructured key value map stored with a resource that
	// may be set by external tools to store and retrieve arbitrary metadata.
	// They are not queryable and should be preserved when modifying objects.
	// [More
	// info](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations).
	Annotations map[string]string `json:"annotations,omitempty"`
	// NodeSelector is a selector which must be true for the pod to fit on a
	// node. Selector which must match a node's labels for the pod to be
	// scheduled on that node. [More
	// info](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/).
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
	// NodeName is a request to schedule this pod onto a specific node. If it is
	// non-empty, the scheduler simply schedules this pod onto that node,
	// assuming that it fits resource requirements.
	NodeName string `json:"nodeName,omitempty"`
	// If specified, the pod's scheduling constraints
	Affinity *corev1.Affinity `json:"affinity,omitempty"`
	// If specified, the pod's tolerations.
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
}

func (*PodSpec) DeepCopy

func (in *PodSpec) DeepCopy() *PodSpec

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

func (*PodSpec) DeepCopyInto

func (in *PodSpec) DeepCopyInto(out *PodSpec)

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

type Problem

type Problem struct {
	api.Problem `json:",inline"`

	// ObservedTime at which the problem was recorded.
	ObservedTime metav1.Time `json:"observedTime"`
}

ObservedTime is added here instead of api package to prevent k8s.io dependencies from getting pulled into Kit.

func (*Problem) DeepCopy

func (in *Problem) DeepCopy() *Problem

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

func (*Problem) DeepCopyInto

func (in *Problem) DeepCopyInto(out *Problem)

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

Directories

Path Synopsis
Package v1alpha1 contains API Schema definitions for the k8s v1alpha1 API group +kubebuilder:object:generate=true +groupName=kubefox.xigxog.io
Package v1alpha1 contains API Schema definitions for the k8s v1alpha1 API group +kubebuilder:object:generate=true +groupName=kubefox.xigxog.io

Jump to

Keyboard shortcuts

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