v1alpha1

package
v0.21.2 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: Apache-2.0 Imports: 12 Imported by: 7

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the controller v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=controller.devfile.io

Package v1alpha1 contains API Schema definitions for the controller v1alpha1 API group +kubebuilder:object:generate=true +groupName=controller.devfile.io

Index

Constants

View Source
const (
	// TypeEndpointAttribute is an attribute used for devfile endpoints that specifies the endpoint type.
	// See EndpointType for respected values
	TypeEndpointAttribute EndpointAttribute = "type"

	// The value for `type` endpoint attribute that indicates that it should be exposed as mainUrl
	// in the workspace status
	MainEndpointType EndpointType = "main"

	// DiscoverableAttribute defines an endpoint as "discoverable", meaning that a service should be
	// created using the endpoint name (i.e. instead of generating a service name for all endpoints,
	// this endpoint should be statically accessible)
	DiscoverableAttribute EndpointAttribute = "discoverable"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "controller.devfile.io", Version: "v1alpha1"}

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

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type Attributes added in v0.12.0

type Attributes map[string]apiext.JSON

Attributes provides a way to add a map of arbitrary YAML/JSON objects. +kubebuilder:validation:Type=object +kubebuilder:validation:XPreserveUnknownFields

func (Attributes) AsInterface added in v0.12.0

func (attributes Attributes) AsInterface(errorHolder *error) interface{}

AsInterface allows returning the whole attributes map... as an interface. When the attributes are not empty, the returned interface will be a map of interfaces.

An optional error holder can be passed as an argument to receive any error that might have occured during the attributes decoding

func (Attributes) Booleans added in v0.12.0

func (attributes Attributes) Booleans(errorHolder *error) map[string]bool

Booleans allows returning only the attributes whose content is a JSON boolean.

An optional error holder can be passed as an argument to receive any error that might have be raised during the attribute decoding

func (Attributes) DeepCopy added in v0.12.0

func (in Attributes) DeepCopy() Attributes

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

func (Attributes) DeepCopyInto added in v0.12.0

func (in Attributes) DeepCopyInto(out *Attributes)

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

func (Attributes) Exists added in v0.12.0

func (attributes Attributes) Exists(key string) bool

Exists returns `true` if the attribute with the given key exists in the attributes map.

func (Attributes) FromBooleanMap added in v0.12.0

func (attributes Attributes) FromBooleanMap(strings map[string]bool) Attributes

FromBooleanMap allows adding into the current map of attributes all the attributes contained in the given map of booleans

func (Attributes) FromFloatMap added in v0.12.0

func (attributes Attributes) FromFloatMap(strings map[string]float64) Attributes

FromFloatMap allows adding into the current map of attributes all the attributes contained in the given map of floats

func (Attributes) FromIntegerMap added in v0.12.0

func (attributes Attributes) FromIntegerMap(strings map[string]int) Attributes

FromIntegerMap allows adding into the current map of attributes all the attributes contained in the given map of integers

func (Attributes) FromInterface added in v0.12.0

func (attributes Attributes) FromInterface(structure interface{}, errorHolder *error) Attributes

FromInterface allows completing the map of attributes from the given interface. The given interface, and can be any value that supports Json Marshaling and will be marshalled as a JSON object.

This is especially useful to create attributes from well-known, but implementation- dependent Go structures.

An optional error holder can be passed as an argument to receive any error that might have occured during the attributes decoding

func (Attributes) FromMap added in v0.12.0

func (attributes Attributes) FromMap(strings map[string]interface{}, errorHolder *error) Attributes

FromMap allows adding into the current map of attributes all the attributes contained in the given map of interfaces each attribute of the given map is provided as an interface, and can be any value that supports Json Marshaling.

An optional error holder can be passed as an argument to receive any error that might have occured during the attributes decoding

func (Attributes) FromStringMap added in v0.12.0

func (attributes Attributes) FromStringMap(strings map[string]string) Attributes

FromStringMap allows adding into the current map of attributes all the attributes contained in the given string map

func (Attributes) Get added in v0.12.0

func (attributes Attributes) Get(key string, errorHolder *error) interface{}

Get allows returning the attribute with the given key as an interface. The underlying type of the returned interface depends on the JSON/YAML content of the attribute. It can be either a simple type like a string, a float64 or a bool, either a structured type like a map of interfaces or an array of interfaces.

An optional error holder can be passed as an argument to receive any error that might have occurred during the attribute decoding

func (Attributes) GetBoolean added in v0.12.0

func (attributes Attributes) GetBoolean(key string, errorHolder *error) bool

GetBoolean allows returning the attribute with the given key as a bool. If the attribute JSON/YAML content is not a JSON boolean (or a JSON string that can be converted into a JSON boolean), then the result will be the `false` zero value and an error is raised.

String values can be converted to boolean values according to the following rules:

- strings "1", "t", "T", "TRUE", "true", and "True" will be converted to a `true` boolean

- strings "0, "f", "F", "FALSE", "false", "False" will be converted to a `false` boolean

- any other string value will raise an error.

An optional error holder can be passed as an argument to receive any error that might have be raised during the attribute decoding

func (Attributes) GetInto added in v0.12.0

func (attributes Attributes) GetInto(key string, into interface{}) error

GetInto allows decoding the attribute with the given key into a given interface. The provided interface should be a pointer to a struct, to an array, or to any simple type.

An error is returned if the provided interface type is not compatible with the attribute content

func (Attributes) GetNumber added in v0.12.0

func (attributes Attributes) GetNumber(key string, errorHolder *error) float64

GetNumber allows returning the attribute with the given key as a float64. If the attribute JSON/YAML content is not a JSON number (or a JSON string that can be converted into a JSON number), then the result will be the zero value and an error is raised.

An optional error holder can be passed as an argument to receive any error that might have be raised during the attribute decoding

func (Attributes) GetString added in v0.12.0

func (attributes Attributes) GetString(key string, errorHolder *error) string

GetString allows returning the attribute with the given key as a string. If the attribute JSON/YAML content is not a JSON string (or a primitive type that can be converted into a string), then the result will be the empty string and an error will be raised.

An optional error holder can be passed as an argument to receive any error that might have be raised during the attribute decoding

func (Attributes) Into added in v0.12.0

func (attributes Attributes) Into(into interface{}) error

Into allows decoding the whole attributes map into a given interface. The provided interface should be either a pointer to a struct, or to a map.

An error is returned if the provided interface type is not compatible with the structure of the attributes

func (Attributes) MarshalJSON added in v0.12.0

func (attributes Attributes) MarshalJSON() ([]byte, error)

MarshalJSON implements custom JSON marshaling to support free-form attributes

func (Attributes) Numbers added in v0.12.0

func (attributes Attributes) Numbers(errorHolder *error) map[string]float64

Numbers allows returning only the attributes whose content is a JSON number.

An optional error holder can be passed as an argument to receive any error that might have be raised during the attribute decoding

func (Attributes) Put added in v0.12.0

func (attributes Attributes) Put(key string, value interface{}, errorHolder *error) Attributes

Put allows adding an attribute to the current map of attributes. The attribute is provided as an interface, and can be any value that supports Json Marshaling.

An optional error holder can be passed as an argument to receive any error that might have occured during the attributes decoding

func (Attributes) PutBoolean added in v0.12.0

func (attributes Attributes) PutBoolean(key string, value bool) Attributes

PutBoolean allows adding a boolean attribute to the current map of attributes

func (Attributes) PutFloat added in v0.12.0

func (attributes Attributes) PutFloat(key string, value float64) Attributes

PutFloat allows adding a float attribute to the current map of attributes

func (Attributes) PutInteger added in v0.12.0

func (attributes Attributes) PutInteger(key string, value int) Attributes

PutInteger allows adding an integer attribute to the current map of attributes

func (Attributes) PutString added in v0.12.0

func (attributes Attributes) PutString(key string, value string) Attributes

PutString allows adding a string attribute to the current map of attributes

func (Attributes) Strings added in v0.12.0

func (attributes Attributes) Strings(errorHolder *error) map[string]string

Strings allows returning only the attributes whose content is a JSON string.

An optional error holder can be passed as an argument to receive any error that might have be raised during the attribute decoding

func (*Attributes) UnmarshalJSON added in v0.12.0

func (attributes *Attributes) UnmarshalJSON(data []byte) error

UnmarshalJSON implements custom JSON unmarshalling to support free-form attributes

type DevWorkspaceOperatorConfig added in v0.10.0

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

	Config *OperatorConfiguration `json:"config,omitempty"`
}

DevWorkspaceOperatorConfig is the Schema for the devworkspaceoperatorconfigs API +kubebuilder:object:root=true +kubebuilder:resource:path=devworkspaceoperatorconfigs,scope=Namespaced,shortName=dwoc

func (*DevWorkspaceOperatorConfig) DeepCopy added in v0.10.0

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

func (*DevWorkspaceOperatorConfig) DeepCopyInto added in v0.10.0

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

func (*DevWorkspaceOperatorConfig) DeepCopyObject added in v0.10.0

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

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

type DevWorkspaceOperatorConfigList added in v0.10.0

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

DevWorkspaceOperatorConfigList contains a list of DevWorkspaceOperatorConfig +kubebuilder:object:root=true

func (*DevWorkspaceOperatorConfigList) DeepCopy added in v0.10.0

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

func (*DevWorkspaceOperatorConfigList) DeepCopyInto added in v0.10.0

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

func (*DevWorkspaceOperatorConfigList) DeepCopyObject added in v0.10.0

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

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

type DevWorkspaceRouting added in v0.2.0

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

	Spec   DevWorkspaceRoutingSpec   `json:"spec,omitempty"`
	Status DevWorkspaceRoutingStatus `json:"status,omitempty"`
}

DevWorkspaceRouting is the Schema for the devworkspaceroutings API +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:resource:path=devworkspaceroutings,scope=Namespaced,shortName=dwr +kubebuilder:printcolumn:name="DevWorkspace ID",type="string",JSONPath=".spec.devworkspaceId",description="The owner DevWorkspace's unique id" +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="The current phase" +kubebuilder:printcolumn:name="Info",type="string",JSONPath=".status.message",description="Additional info about DevWorkspaceRouting state"

func (*DevWorkspaceRouting) DeepCopy added in v0.2.0

func (in *DevWorkspaceRouting) DeepCopy() *DevWorkspaceRouting

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

func (*DevWorkspaceRouting) DeepCopyInto added in v0.2.0

func (in *DevWorkspaceRouting) DeepCopyInto(out *DevWorkspaceRouting)

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

func (*DevWorkspaceRouting) DeepCopyObject added in v0.2.0

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

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

type DevWorkspaceRoutingClass added in v0.2.0

type DevWorkspaceRoutingClass string
const (
	DevWorkspaceRoutingBasic       DevWorkspaceRoutingClass = "basic"
	DevWorkspaceRoutingCluster     DevWorkspaceRoutingClass = "cluster"
	DevWorkspaceRoutingClusterTLS  DevWorkspaceRoutingClass = "cluster-tls"
	DevWorkspaceRoutingWebTerminal DevWorkspaceRoutingClass = "web-terminal"
)

type DevWorkspaceRoutingList added in v0.2.0

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

DevWorkspaceRoutingList contains a list of DevWorkspaceRouting

func (*DevWorkspaceRoutingList) DeepCopy added in v0.2.0

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

func (*DevWorkspaceRoutingList) DeepCopyInto added in v0.2.0

func (in *DevWorkspaceRoutingList) DeepCopyInto(out *DevWorkspaceRoutingList)

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

func (*DevWorkspaceRoutingList) DeepCopyObject added in v0.2.0

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

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

type DevWorkspaceRoutingPhase added in v0.2.0

type DevWorkspaceRoutingPhase string

Valid phases for devworkspacerouting

const (
	RoutingReady     DevWorkspaceRoutingPhase = "Ready"
	RoutingPreparing DevWorkspaceRoutingPhase = "Preparing"
	RoutingFailed    DevWorkspaceRoutingPhase = "Failed"
)

type DevWorkspaceRoutingSpec added in v0.2.0

type DevWorkspaceRoutingSpec struct {
	// Id for the DevWorkspace being routed
	DevWorkspaceId string `json:"devworkspaceId"`
	// Class of the routing: this drives which DevWorkspaceRouting controller will manage this routing
	RoutingClass DevWorkspaceRoutingClass `json:"routingClass,omitempty"`
	// Machines to endpoints map
	Endpoints map[string]EndpointList `json:"endpoints"`
	// Selector that should be used by created services to point to the devworkspace Pod
	PodSelector map[string]string `json:"podSelector"`
}

DevWorkspaceRoutingSpec defines the desired state of DevWorkspaceRouting +k8s:openapi-gen=true

func (*DevWorkspaceRoutingSpec) DeepCopy added in v0.2.0

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

func (*DevWorkspaceRoutingSpec) DeepCopyInto added in v0.2.0

func (in *DevWorkspaceRoutingSpec) DeepCopyInto(out *DevWorkspaceRoutingSpec)

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

type DevWorkspaceRoutingStatus added in v0.2.0

type DevWorkspaceRoutingStatus struct {
	// Additions to main devworkspace deployment
	PodAdditions *PodAdditions `json:"podAdditions,omitempty"`
	// Machine name to exposed endpoint map
	ExposedEndpoints map[string]ExposedEndpointList `json:"exposedEndpoints,omitempty"`
	// Routing reconcile phase
	Phase DevWorkspaceRoutingPhase `json:"phase,omitempty"`
	// Message is a user-readable message explaining the current phase (e.g. reason for failure)
	Message string `json:"message,omitempty"`
}

DevWorkspaceRoutingStatus defines the observed state of DevWorkspaceRouting +k8s:openapi-gen=true

func (*DevWorkspaceRoutingStatus) DeepCopy added in v0.2.0

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

func (*DevWorkspaceRoutingStatus) DeepCopyInto added in v0.2.0

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

type Endpoint

type Endpoint struct {
	// +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
	// +kubebuilder:validation:MaxLength=63
	Name string `json:"name"`

	TargetPort int `json:"targetPort"`

	// Describes how the endpoint should be exposed on the network.
	//
	// - `public` means that the endpoint will be exposed on the public network, typically through
	// a K8S ingress or an OpenShift route.
	//
	// - `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD,
	// typically by K8S services, to be consumed by other elements running
	// on the same cloud internal network.
	//
	// - `none` means that the endpoint will not be exposed and will only be accessible
	// inside the main devworkspace POD, on a local address.
	//
	// Default value is `public`
	// +optional
	// +kubebuilder:default=public
	Exposure EndpointExposure `json:"exposure,omitempty"`

	// Describes the application and transport protocols of the traffic that will go through this endpoint.
	//
	// - `http`: Endpoint will have `http` traffic, typically on a TCP connection.
	// It will be automaticaly promoted to `https` when the `secure` field is set to `true`.
	//
	// - `https`: Endpoint will have `https` traffic, typically on a TCP connection.
	//
	// - `ws`: Endpoint will have `ws` traffic, typically on a TCP connection.
	// It will be automaticaly promoted to `wss` when the `secure` field is set to `true`.
	//
	// - `wss`: Endpoint will have `wss` traffic, typically on a TCP connection.
	//
	// - `tcp`: Endpoint will have traffic on a TCP connection, without specifying an application protocol.
	//
	// - `udp`: Endpoint will have traffic on an UDP connection, without specifying an application protocol.
	//
	// Default value is `http`
	// +optional
	// +kubebuilder:default=http
	Protocol EndpointProtocol `json:"protocol,omitempty"`

	// Describes whether the endpoint should be secured and protected by some
	// authentication process. This requires a protocol of `https` or `wss`.
	// +optional
	// +devfile:default:value=false
	Secure bool `json:"secure,omitempty"`

	// Path of the endpoint URL
	// +optional
	Path string `json:"path,omitempty"`

	// Map of implementation-dependant string-based free-form attributes.
	//
	// Examples of Che-specific attributes:
	//
	// - cookiesAuthEnabled: "true" / "false",
	//
	// - type: "terminal" / "ide" / "ide-dev",
	// +optional
	// +kubebuilder:validation:Type=object
	// +kubebuilder:pruning:PreserveUnknownFields
	// +kubebuilder:validation:Schemaless
	Attributes Attributes `json:"attributes,omitempty"`
}

func (*Endpoint) DeepCopy

func (in *Endpoint) DeepCopy() *Endpoint

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

func (*Endpoint) DeepCopyInto

func (in *Endpoint) DeepCopyInto(out *Endpoint)

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

type EndpointAttribute

type EndpointAttribute string

type EndpointExposure added in v0.12.0

type EndpointExposure string

EndpointExposure describes the way an endpoint is exposed on the network. Only one of the following exposures may be specified: public, internal, none. +kubebuilder:validation:Enum=public;internal;none

const (
	// Endpoint will be exposed on the public network, typically through
	// a K8S ingress or an OpenShift route
	PublicEndpointExposure EndpointExposure = "public"
	// Endpoint will be exposed internally outside of the main devworkspace POD,
	// typically by K8S services, to be consumed by other elements running
	// on the same cloud internal network.
	InternalEndpointExposure EndpointExposure = "internal"
	// Endpoint will not be exposed and will only be accessible
	// inside the main devworkspace POD, on a local address.
	NoneEndpointExposure EndpointExposure = "none"
)

type EndpointList

type EndpointList []Endpoint

func (EndpointList) DeepCopy

func (in EndpointList) DeepCopy() EndpointList

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

func (EndpointList) DeepCopyInto

func (in EndpointList) DeepCopyInto(out *EndpointList)

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

type EndpointProtocol added in v0.12.0

type EndpointProtocol string

EndpointProtocol defines the application and transport protocols of the traffic that will go through this endpoint. Only one of the following protocols may be specified: http, ws, tcp, udp. +kubebuilder:validation:Enum=http;https;ws;wss;tcp;udp

type EndpointType added in v0.5.0

type EndpointType string

type ExposedEndpoint

type ExposedEndpoint struct {
	// Name of the exposed endpoint
	Name string `json:"name"`
	// Public URL of the exposed endpoint
	Url string `json:"url"`
	// Attributes of the exposed endpoint
	// +optional
	Attributes Attributes `json:"attributes,omitempty"`
}

func (*ExposedEndpoint) DeepCopy

func (in *ExposedEndpoint) DeepCopy() *ExposedEndpoint

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

func (*ExposedEndpoint) DeepCopyInto

func (in *ExposedEndpoint) DeepCopyInto(out *ExposedEndpoint)

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

type ExposedEndpointList

type ExposedEndpointList []ExposedEndpoint

func (ExposedEndpointList) DeepCopy

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

func (ExposedEndpointList) DeepCopyInto

func (in ExposedEndpointList) DeepCopyInto(out *ExposedEndpointList)

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

type KeyNotFoundError added in v0.12.0

type KeyNotFoundError struct {
	Key string
}

KeyNotFoundError returns an error if no key is found for the attribute

func (*KeyNotFoundError) DeepCopy added in v0.12.0

func (in *KeyNotFoundError) DeepCopy() *KeyNotFoundError

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

func (*KeyNotFoundError) DeepCopyInto added in v0.12.0

func (in *KeyNotFoundError) DeepCopyInto(out *KeyNotFoundError)

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

func (*KeyNotFoundError) Error added in v0.12.0

func (e *KeyNotFoundError) Error() string

type OperatorConfiguration added in v0.10.0

type OperatorConfiguration struct {
	// Routing defines configuration options related to DevWorkspace networking
	Routing *RoutingConfig `json:"routing,omitempty"`
	// Workspace defines configuration options related to how DevWorkspaces are
	// managed
	Workspace *WorkspaceConfig `json:"workspace,omitempty"`
	// EnableExperimentalFeatures turns on in-development features of the controller.
	// This option should generally not be enabled, as any capabilites are subject
	// to removal without notice.
	EnableExperimentalFeatures *bool `json:"enableExperimentalFeatures,omitempty"`
}

OperatorConfiguration defines configuration options for the DevWorkspace Operator.

func (*OperatorConfiguration) DeepCopy added in v0.10.0

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

func (*OperatorConfiguration) DeepCopyInto added in v0.10.0

func (in *OperatorConfiguration) DeepCopyInto(out *OperatorConfiguration)

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

type PodAdditions

type PodAdditions struct {
	// Annotations to be applied to devworkspace deployment
	// +optional
	// +patchMergeKey=name
	// +patchStrategy=merge
	Annotations map[string]string `json:"annotations,omitempty"`
	// Labels to be applied to devworkspace deployment
	// +optional
	// +patchMergeKey=name
	// +patchStrategy=merge
	Labels map[string]string `json:"labels,omitempty"`
	// Containers to add to devworkspace deployment
	// +optional
	// +patchMergeKey=name
	// +patchStrategy=merge
	Containers []v1.Container `json:"containers,omitempty"`
	// Init containers to add to devworkspace deployment
	// +optional
	// +patchMergeKey=name
	// +patchStrategy=merge
	InitContainers []v1.Container `json:"initContainers,omitempty"`
	// Volumes to add to devworkspace deployment
	// +optional
	// +patchMergeKey=name
	// +patchStrategy=merge
	Volumes []v1.Volume `json:"volumes,omitempty"`
	// VolumeMounts to add to all containers in a devworkspace deployment
	// +optional
	// +patchMergeKey=name
	// +patchStrategy=merge
	VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty"`
	// ImagePullSecrets to add to devworkspace deployment
	// +optional
	// +patchMergeKey=name
	// +patchStrategy=merge
	PullSecrets []v1.LocalObjectReference `json:"pullSecrets,omitempty"`
	// Annotations for the devworkspace service account, it might be used for e.g. OpenShift oauth with SA as auth client
	// +optional
	// +patchMergeKey=name
	// +patchStrategy=merge
	ServiceAccountAnnotations map[string]string `json:"serviceAccountAnnotations,omitempty"`
}

Summary of additions that are to be merged into the main devworkspace deployment

func (*PodAdditions) DeepCopy

func (in *PodAdditions) DeepCopy() *PodAdditions

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

func (*PodAdditions) DeepCopyInto

func (in *PodAdditions) DeepCopyInto(out *PodAdditions)

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

type ProjectCloneConfig added in v0.21.0

type ProjectCloneConfig struct {
	// Image is the container image to use for cloning projects
	Image string `json:"image,omitempty"`
	// ImagePullPolicy configures the imagePullPolicy for the project clone container.
	// If undefined, the general setting .config.workspace.imagePullPolicy is used instead.
	ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
	// Resources defines the resource (cpu, memory) limits and requests for the project
	// clone container. To explicitly not specify a limit or request, define the resource
	// quantity as zero ('0')
	Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
	// Env allows defining additional environment variables for the project clone container.
	Env []corev1.EnvVar `json:"env,omitempty"`
}

func (*ProjectCloneConfig) DeepCopy added in v0.21.0

func (in *ProjectCloneConfig) DeepCopy() *ProjectCloneConfig

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

func (*ProjectCloneConfig) DeepCopyInto added in v0.21.0

func (in *ProjectCloneConfig) DeepCopyInto(out *ProjectCloneConfig)

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

type Proxy added in v0.12.0

type Proxy struct {
	// HttpProxy is the URL of the proxy for HTTP requests, in the format http://USERNAME:PASSWORD@SERVER:PORT/
	HttpProxy string `json:"httpProxy,omitempty"`
	// HttpsProxy is the URL of the proxy for HTTPS requests, in the format http://USERNAME:PASSWORD@SERVER:PORT/
	HttpsProxy string `json:"httpsProxy,omitempty"`
	// NoProxy is a comma-separated list of hostnames and/or CIDRs for which the proxy should not be used. Ignored
	// when HttpProxy and HttpsProxy are unset
	NoProxy string `json:"noProxy,omitempty"`
}

func (*Proxy) DeepCopy added in v0.12.0

func (in *Proxy) DeepCopy() *Proxy

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

func (*Proxy) DeepCopyInto added in v0.12.0

func (in *Proxy) DeepCopyInto(out *Proxy)

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

type RoutingConfig added in v0.10.0

type RoutingConfig struct {
	// DefaultRoutingClass specifies the routingClass to be used when a DevWorkspace
	// specifies an empty `.spec.routingClass`. Supported routingClasses can be defined
	// in other controllers. If not specified, the default value of "basic" is used.
	DefaultRoutingClass string `json:"defaultRoutingClass,omitempty"`
	// ClusterHostSuffix is the hostname suffix to be used for DevWorkspace endpoints.
	// On OpenShift, the DevWorkspace Operator will attempt to determine the appropriate
	// value automatically. Must be specified on Kubernetes.
	ClusterHostSuffix string `json:"clusterHostSuffix,omitempty"`
	// ProxyConfig defines the proxy settings that should be used for all DevWorkspaces.
	// These values are propagated to workspace containers as environment variables.
	//
	// On OpenShift, the operator automatically reads values from the "cluster" proxies.config.openshift.io
	// object and this value only needs to be set to override those defaults. Values for httpProxy
	// and httpsProxy override the cluster configuration directly. Entries for noProxy are merged
	// with the noProxy values in the cluster configuration.
	//
	// Changes to the proxy configuration are detected by the DevWorkspace Operator and propagated to
	// DevWorkspaces. However, changing the proxy configuration for the DevWorkspace Operator itself
	// requires restarting the controller deployment.
	ProxyConfig *Proxy `json:"proxyConfig,omitempty"`
}

func (*RoutingConfig) DeepCopy added in v0.10.0

func (in *RoutingConfig) DeepCopy() *RoutingConfig

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

func (*RoutingConfig) DeepCopyInto added in v0.10.0

func (in *RoutingConfig) DeepCopyInto(out *RoutingConfig)

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

type ServiceAccountConfig added in v0.17.0

type ServiceAccountConfig struct {
	// ServiceAccountName defines a fixed name to be used for all DevWorkspaces. If set, the DevWorkspace
	// Operator will not generate a separate ServiceAccount for each DevWorkspace, and will instead create
	// a ServiceAccount with the specified name in each namespace where DevWorkspaces are created. If specified,
	// the created ServiceAccount will not be removed when DevWorkspaces are deleted and must be cleaned up manually.
	// +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
	// +kubebuilder:validation:MaxLength=63
	ServiceAccountName string `json:"serviceAccountName,omitempty"`
	// Disable creation of DevWorkspace ServiceAccounts by the DevWorkspace Operator. If set to true, the serviceAccountName
	// field must also be set. If ServiceAccount creation is disabled, it is assumed that the specified ServiceAccount already
	// exists in any namespace where a workspace is created. If a suitable ServiceAccount does not exist, starting DevWorkspaces
	// will fail.
	DisableCreation *bool `json:"disableCreation,omitempty"`
	// List of ServiceAccount tokens that will be mounted into workspace pods as projected volumes.
	ServiceAccountTokens []ServiceAccountToken `json:"serviceAccountTokens,omitempty"`
}

func (*ServiceAccountConfig) DeepCopy added in v0.17.0

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

func (*ServiceAccountConfig) DeepCopyInto added in v0.17.0

func (in *ServiceAccountConfig) DeepCopyInto(out *ServiceAccountConfig)

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

type ServiceAccountToken added in v0.20.0

type ServiceAccountToken struct {
	// Identifiable name of the ServiceAccount token.
	// If multiple ServiceAccount tokens use the same mount path, a generic name will be used
	// for the projected volume instead.
	// +kubebuilder:validation:Required
	Name string `json:"name"`
	// Path within the workspace container at which the token should be mounted.  Must
	// not contain ':'.
	// +kubebuilder:validation:Required
	MountPath string `json:"mountPath"`
	// Path is the path relative to the mount point of the file to project the
	// token into.
	// +kubebuilder:validation:Required
	Path string `json:"path"`
	// Audience is the intended audience of the token. A recipient of a token
	// must identify itself with an identifier specified in the audience of the
	// token, and otherwise should reject the token. The audience defaults to the
	// identifier of the apiserver.
	// +kubebuilder:validation:Optional
	Audience string `json:"audience,omitempty"`
	// ExpirationSeconds is the requested duration of validity of the service
	// account token. As the token approaches expiration, the kubelet volume
	// plugin will proactively rotate the service account token. The kubelet will
	// start trying to rotate the token if the token is older than 80 percent of
	// its time to live or if the token is older than 24 hours. Defaults to 1 hour
	// and must be at least 10 minutes.
	// +kubebuilder:validation:Minimum=600
	// +kubebuilder:default:=3600
	// +kubebuilder:validation:Optional
	ExpirationSeconds int64 `json:"expirationSeconds,omitempty"`
}

func (*ServiceAccountToken) DeepCopy added in v0.20.0

func (in *ServiceAccountToken) DeepCopy() *ServiceAccountToken

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

func (*ServiceAccountToken) DeepCopyInto added in v0.20.0

func (in *ServiceAccountToken) DeepCopyInto(out *ServiceAccountToken)

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

func (ServiceAccountToken) String added in v0.20.0

func (saToken ServiceAccountToken) String() string

type StorageSizes added in v0.15.0

type StorageSizes struct {
	// The default Persistent Volume Claim size for the "common" storage class.
	// Note that the "async" storage class also uses the PVC size set for the "common" storage class.
	// If not specified, the "common" and "async" Persistent Volume Claim sizes are set to 10Gi
	Common *resource.Quantity `json:"common,omitempty"`
	// The default Persistent Volume Claim size for the "per-workspace" storage class.
	// If not specified, the "per-workspace" Persistent Volume Claim size is set to 5Gi
	PerWorkspace *resource.Quantity `json:"perWorkspace,omitempty"`
}

func (*StorageSizes) DeepCopy added in v0.15.0

func (in *StorageSizes) DeepCopy() *StorageSizes

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

func (*StorageSizes) DeepCopyInto added in v0.15.0

func (in *StorageSizes) DeepCopyInto(out *StorageSizes)

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

type WorkspaceConfig added in v0.10.0

type WorkspaceConfig struct {
	// ProjectCloneConfig defines configuration related to the project clone init container
	// that is used to clone git projects into the DevWorkspace.
	ProjectCloneConfig *ProjectCloneConfig `json:"projectClone,omitempty"`
	// ImagePullPolicy defines the imagePullPolicy used for containers in a DevWorkspace
	// For additional information, see Kubernetes documentation for imagePullPolicy. If
	// not specified, the default value of "Always" is used.
	// +kubebuilder:validation:Enum=IfNotPresent;Always;Never
	ImagePullPolicy string `json:"imagePullPolicy,omitempty"`
	// DeploymentStrategy defines the deployment strategy to use to replace existing DevWorkspace pods
	// with new ones. The available deployment stragies are "Recreate" and "RollingUpdate".
	// With the "Recreate" deployment strategy, the existing workspace pod is killed before the new one is created.
	// With the "RollingUpdate" deployment strategy, a new workspace pod is created and the existing workspace pod is deleted
	// only when the new workspace pod is in a ready state.
	// If not specified, the default "Recreate" deployment strategy is used.
	// +kubebuilder:validation:Enum=Recreate;RollingUpdate
	DeploymentStrategy appsv1.DeploymentStrategyType `json:"deploymentStrategy,omitempty"`
	// PVCName defines the name used for the persistent volume claim created
	// to support workspace storage when the 'common' storage class is used.
	// If not specified, the default value of `claim-devworkspace` is used.
	// Note that changing this configuration value after workspaces have been
	// created will disconnect all existing workspaces from the previously-used
	// persistent volume claim, and will require manual removal of the old PVCs
	// in the cluster.
	// +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
	// +kubebuilder:validation:MaxLength=63
	PVCName string `json:"pvcName,omitempty"`
	// ServiceAccount defines configuration options for the ServiceAccount used for
	// DevWorkspaces.
	ServiceAccount *ServiceAccountConfig `json:"serviceAccount,omitempty"`
	// StorageClassName defines an optional storageClass to use for persistent
	// volume claims created to support DevWorkspaces
	StorageClassName *string `json:"storageClassName,omitempty"`
	// DefaultStorageSize defines an optional struct with fields to specify the sizes of Persistent Volume Claims for storage
	// classes used by DevWorkspaces.
	DefaultStorageSize *StorageSizes `json:"defaultStorageSize,omitempty"`
	// IdleTimeout determines how long a workspace should sit idle before being
	// automatically scaled down. Proper functionality of this configuration property
	// requires support in the workspace being started. If not specified, the default
	// value of "15m" is used.
	IdleTimeout string `json:"idleTimeout,omitempty"`
	// ProgressTimeout determines the maximum duration a DevWorkspace can be in
	// a "Starting" or "Failing" phase without progressing before it is automatically failed.
	// Duration should be specified in a format parseable by Go's time package, e.g.
	// "15m", "20s", "1h30m", etc. If not specified, the default value of "5m" is used.
	ProgressTimeout string `json:"progressTimeout,omitempty"`
	// IgnoredUnrecoverableEvents defines a list of Kubernetes event names that should
	// be ignored when deciding to fail a DevWorkspace startup. This option should be used
	// if a transient cluster issue is triggering false-positives (for example, if
	// the cluster occasionally encounters FailedScheduling events). Events listed
	// here will not trigger DevWorkspace failures.
	IgnoredUnrecoverableEvents []string `json:"ignoredUnrecoverableEvents,omitempty"`
	// CleanupOnStop governs how the Operator handles stopped DevWorkspaces. If set to
	// true, additional resources associated with a DevWorkspace (e.g. services, deployments,
	// configmaps, etc.) will be removed from the cluster when a DevWorkspace has
	// .spec.started = false. If set to false, resources will be scaled down (e.g. deployments
	// but the objects will be left on the cluster). The default value is false.
	CleanupOnStop *bool `json:"cleanupOnStop,omitempty"`
	// PodSecurityContext overrides the default PodSecurityContext used for all workspace-related
	// pods created by the DevWorkspace Operator. If set, defined values are merged into the default
	// configuration
	PodSecurityContext *corev1.PodSecurityContext `json:"podSecurityContext,omitempty"`
	// ContainerSecurityContext overrides the default ContainerSecurityContext used for all
	// workspace-related containers created by the DevWorkspace Operator. If set, defined
	// values are merged into the default configuration
	ContainerSecurityContext *corev1.SecurityContext `json:"containerSecurityContext,omitempty"`
	// DefaultTemplate defines an optional DevWorkspace Spec Template which gets applied to the workspace
	// if the workspace's Template Spec Components are not defined. The DefaultTemplate will overwrite the existing
	// Template Spec, with the exception of Projects (if any are defined).
	DefaultTemplate *dw.DevWorkspaceTemplateSpecContent `json:"defaultTemplate,omitempty"`
	// SchedulerName is the name of the pod scheduler for DevWorkspace pods.
	// If not specified, the pod scheduler is set to the default scheduler on the cluster.
	SchedulerName string `json:"schedulerName,omitempty"`
}

func (*WorkspaceConfig) DeepCopy added in v0.10.0

func (in *WorkspaceConfig) DeepCopy() *WorkspaceConfig

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

func (*WorkspaceConfig) DeepCopyInto added in v0.10.0

func (in *WorkspaceConfig) DeepCopyInto(out *WorkspaceConfig)

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