v1alpha1

package
v0.14.0-rc1 Latest Latest
Warning

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

Go to latest
Published: May 3, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v1alpha1 defines version 1alpha1 of the worker-config CRD.

Usage:

import "github.com/go-vela/worker/runtime/kubernetes/apis/v1alpha1"

Index

Constants

This section is empty.

Variables

View Source
var (
	// SchemeBuilder initializes a scheme builder.
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme is a global function that registers this API group & version to a scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: vela.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 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 PipelineContainer

type PipelineContainer struct {
	// SecurityContext defines the security options the container should be run with.
	// If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext.
	// More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
	SecurityContext *PipelineContainerSecurityContext `json:"securityContext,omitempty"`
}

PipelineContainer has defaults for containers in a PipelinePodsTemplate.

func (*PipelineContainer) DeepCopy

func (in *PipelineContainer) DeepCopy() *PipelineContainer

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

func (*PipelineContainer) DeepCopyInto

func (in *PipelineContainer) DeepCopyInto(out *PipelineContainer)

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

type PipelineContainerSecurityContext

type PipelineContainerSecurityContext struct {
	// Capabilities contains the capabilities to add/drop when running containers.
	// Defaults to the default set of capabilities granted by the container runtime.
	// Note that this field cannot be set when spec.os.name is windows.
	Capabilities *v1.Capabilities `json:"capabilities,omitempty"`
}

PipelineContainerSecurityContext holds container-level security configuration.

func (*PipelineContainerSecurityContext) DeepCopy

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

func (*PipelineContainerSecurityContext) DeepCopyInto

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

type PipelinePodSecurityContext

type PipelinePodSecurityContext struct {
	// RunAsNonRoot indicates that the container must run as a non-root user.
	// If true, the Kubelet will validate the image at runtime to ensure that it
	// does not run as UID 0 (root) and fail to start the container if it does.
	// If unset or false, no such validation will be performed.
	RunAsNonRoot *bool `json:"runAsNonRoot,omitempty"`
	// Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported
	// sysctls (by the container runtime) might fail to launch.
	// Note that this field cannot be set when spec.os.name is windows.
	Sysctls []v1.Sysctl `json:"sysctls,omitempty"`
}

PipelinePodSecurityContext holds pod-level security attributes and common container settings.

func (*PipelinePodSecurityContext) DeepCopy

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

func (*PipelinePodSecurityContext) DeepCopyInto

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

type PipelinePodTemplate

type PipelinePodTemplate struct {
	// Metadata contains a subset of the standard object metadata (see: metav1.ObjectMeta).
	Metadata PipelinePodTemplateMeta `json:"metadata,omitempty"`

	// Spec contains a subset of the pod configuration options (see: v1.PodSpec).
	Spec PipelinePodTemplateSpec `json:"spec,omitempty"`
}

PipelinePodTemplate describes the data defaults to use when creating each pipeline pod.

func (*PipelinePodTemplate) DeepCopy

func (in *PipelinePodTemplate) DeepCopy() *PipelinePodTemplate

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

func (*PipelinePodTemplate) DeepCopyInto

func (in *PipelinePodTemplate) DeepCopyInto(out *PipelinePodTemplate)

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

type PipelinePodTemplateMeta

type PipelinePodTemplateMeta struct {
	// Labels is a key value map of strings to organize and categorize pods.
	// More info: http://kubernetes.io/docs/user-guide/labels
	Labels map[string]string `json:"labels,omitempty"`

	// Annotations is a key value map of strings to store additional info on pods.
	// More info: http://kubernetes.io/docs/user-guide/annotations
	Annotations map[string]string `json:"annotations,omitempty"`
}

PipelinePodTemplateMeta is a subset of metav1.ObjectMeta with meta defaults for pipeline pods.

func (*PipelinePodTemplateMeta) DeepCopy

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

func (*PipelinePodTemplateMeta) DeepCopyInto

func (in *PipelinePodTemplateMeta) DeepCopyInto(out *PipelinePodTemplateMeta)

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

type PipelinePodTemplateSpec

type PipelinePodTemplateSpec struct {
	// NodeSelector is a selector which must be true for the pipeline 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/
	// +mapType=atomic
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
	// Affinity specifies the pipeline pod's scheduling constraints, if any.
	Affinity *v1.Affinity `json:"affinity,omitempty"`
	// Affinity specifies the pipeline pod's tolerations, if any.
	Tolerations []v1.Toleration `json:"tolerations,omitempty"`

	// DNSPolicy sets DNS policy for the pipeline pod.
	// Defaults to "ClusterFirst".
	// Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'.
	// +kubebuilder:validation:Enum={"ClusterFirstWithHostNet","ClusterFirst","Default","None"}
	DNSPolicy v1.DNSPolicy `json:"dnsPolicy,omitempty"`
	// DNSConfig specifies the DNS parameters of a pod.
	// Parameters specified here will be merged to the generated DNS
	// configuration based on DNSPolicy.
	DNSConfig *v1.PodDNSConfig `json:"dnsConfig,omitempty"`

	// Container defines a limited set of defaults to apply to each PipelinePodsTemplate container.
	// This is analogous to one entry in v1.PodSpec.Containers.
	Container *PipelineContainer `json:"container,omitempty"`

	// SecurityContext holds pod-level security attributes and common container settings.
	// Optional: Defaults to empty.  See type description for default values of each field.
	SecurityContext *PipelinePodSecurityContext `json:"securityContext,omitempty"`
}

PipelinePodTemplateSpec is (loosely) a subset of v1.PodSpec with spec defaults for pipeline pods.

func (*PipelinePodTemplateSpec) DeepCopy

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

func (*PipelinePodTemplateSpec) DeepCopyInto

func (in *PipelinePodTemplateSpec) DeepCopyInto(out *PipelinePodTemplateSpec)

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

type PipelinePodsTemplate

type PipelinePodsTemplate struct {
	metav1.TypeMeta `json:",inline"`
	// Standard object's metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the PipelinePodsTemplate configuration for Vela Workers.
	Spec PipelinePodsTemplateSpec `json:"spec,omitempty"`
}

PipelinePodsTemplate defines the config for a given worker.

func (*PipelinePodsTemplate) DeepCopy

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

func (*PipelinePodsTemplate) DeepCopyInto

func (in *PipelinePodsTemplate) DeepCopyInto(out *PipelinePodsTemplate)

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

func (*PipelinePodsTemplate) DeepCopyObject

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

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

type PipelinePodsTemplateList

type PipelinePodsTemplateList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard list metadata.
	metav1.ListMeta `json:"metadata,omitempty"`

	// Items is the list of Deployments.
	// +kubebuilder:validation:Required
	Items []PipelinePodsTemplate `json:"items"`
}

PipelinePodsTemplateList is a list of Deployments.

func (*PipelinePodsTemplateList) DeepCopy

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

func (*PipelinePodsTemplateList) DeepCopyInto

func (in *PipelinePodsTemplateList) DeepCopyInto(out *PipelinePodsTemplateList)

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

func (*PipelinePodsTemplateList) DeepCopyObject

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

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

type PipelinePodsTemplateSpec

type PipelinePodsTemplateSpec struct {
	// Template defines defaults for Pipeline Pod creation in Vela Workers.
	// +kubebuilder:validation:Required
	Template PipelinePodTemplate `json:"template"`
}

PipelinePodsTemplateSpec configures creation of Pipeline Pods by Vela Workers.

func (*PipelinePodsTemplateSpec) DeepCopy

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

func (*PipelinePodsTemplateSpec) DeepCopyInto

func (in *PipelinePodsTemplateSpec) DeepCopyInto(out *PipelinePodsTemplateSpec)

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