v1alpha2

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package v1alpha2 contains API Schema definitions for the kode v1alpha2 API group +kubebuilder:object:generate=true +groupName=kode.jacero.io

Index

Constants

This section is empty.

Variables

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

	// 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 AuthSpec

type AuthSpec struct {
	// The Envoy Gateway SecurityPolicy to use for the authentication. Can be either "none", "basicAuth", "oidc", "extAuth". Reference: https://gateway.envoyproxy.io/contributions/design/security-policy/
	// +kubebuilder:validation:Enum=none;basicAuth;extAuth
	// +kubebuilder:default=none
	AuthType AuthType `json:"authType" yaml:"authType"`

	// Defines the SecurityPolicies to be applied to the Route. Reference: https://gateway.envoyproxy.io/contributions/design/security-policy/
	// +kubebuilder:validation:Optional
	SecurityPolicySpec *SecurityPolicySpec `json:"securityPolicySpec,omitempty" yaml:"securityPolicySpec,omitempty"`

	// Reference to a field in the JWT token of OIDC or JWT. It will influence the controller on how to route the request and authorize the user.
	// +kubebuilder:validation:Optional
	IdentityReference *IdentityReference `json:"identityReference,omitempty" yaml:"identityReference,omitempty"`
}

func (*AuthSpec) DeepCopy

func (in *AuthSpec) DeepCopy() *AuthSpec

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

func (*AuthSpec) DeepCopyInto

func (in *AuthSpec) DeepCopyInto(out *AuthSpec)

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

type AuthType

type AuthType string

AuthType is the type of authentication to use for the EntryPoint. +kubebuilder:validation:Enum=none;basicAuth;jwt;oidc;extAuth

const (
	AuthTypeNone          AuthType = "none"
	AuthTypeBasicAuth     AuthType = "basicAuth"
	AuthTypeJWT           AuthType = "jwt"
	AuthTypeOIDC          AuthType = "oidc"
	AuthTypeExtAuth       AuthType = "extAuth"
	AuthTypeAuthorization AuthType = "authorization"
)

type BaseDomain

type BaseDomain string

BaseDomain is the domain name to use either as a suffix in the case of Type=domain or as a prefix/domain in the case of Type=path. TODO: Add validation pattern: "^([a-zA-Z0-9_]+\.)*[a-zA-Z0-9_]+$"

type ClusterContainerTemplate added in v0.6.0

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

	Spec   ClusterContainerTemplateSpec   `json:"spec,omitempty"`
	Status ClusterContainerTemplateStatus `json:"status,omitempty"`
}

ClusterContainerTemplate is the Schema for the clusterContainerTemplates API

func (*ClusterContainerTemplate) DeepCopy added in v0.6.0

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

func (*ClusterContainerTemplate) DeepCopyInto added in v0.6.0

func (in *ClusterContainerTemplate) DeepCopyInto(out *ClusterContainerTemplate)

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

func (*ClusterContainerTemplate) DeepCopyObject added in v0.6.0

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

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

type ClusterContainerTemplateList added in v0.6.0

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

ClusterContainerTemplateList contains a list of ClusterContainerTemplate

func (*ClusterContainerTemplateList) DeepCopy added in v0.6.0

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

func (*ClusterContainerTemplateList) DeepCopyInto added in v0.6.0

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

func (*ClusterContainerTemplateList) DeepCopyObject added in v0.6.0

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

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

type ClusterContainerTemplateSpec added in v0.6.0

type ClusterContainerTemplateSpec struct {
	ContainerTemplateSharedSpec `json:",inline" yaml:",inline"`
}

ClusterContainerTemplateSpec defines the desired state of ClusterKodeContainer

func (*ClusterContainerTemplateSpec) DeepCopy added in v0.6.0

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

func (*ClusterContainerTemplateSpec) DeepCopyInto added in v0.6.0

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

type ClusterContainerTemplateStatus added in v0.6.0

type ClusterContainerTemplateStatus struct {
	ContainerTemplateSharedStatus `json:",inline" yaml:",inline"`
}

ClusterContainerTemplateStatus defines the observed state of ClusterKodeContainer

func (*ClusterContainerTemplateStatus) DeepCopy added in v0.6.0

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

func (*ClusterContainerTemplateStatus) DeepCopyInto added in v0.6.0

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

type CommonSpec added in v0.6.0

type CommonSpec struct {
	// Credentials specifies the credentials for the service.
	Credentials *CredentialsSpec `json:"credentials,omitempty" yaml:"credentials,omitempty"`

	// EntryPointSpec defines the desired state of the entrypoint.
	EntryPointRef *CrossNamespaceObjectReference `json:"entryPointRef,omitempty" yaml:"entryPointRef,omitempty"`

	// Specifies the period before controller inactive the resource (delete all resources except volume).
	// +kubebuilder:default=600
	InactiveAfterSeconds *int64 `json:"inactiveAfterSeconds,omitempty" yaml:"inactiveAfterSeconds,omitempty"`

	// Specifies the period before controller recycle the resource (delete all resources).
	// +kubebuilder:default=28800
	RecycleAfterSeconds *int64 `json:"recycleAfterSeconds,omitempty" yaml:"recycleAfterSeconds,omitempty"`

	// Port is the port for the service process. Used by EnvoyProxy to expose the kode.
	// +kubebuilder:default=8000
	Port Port `json:"port,omitempty" yaml:"port,omitempty"`
}

CommonSpec defines the common fields for both Container and Virtualization specs

func (*CommonSpec) DeepCopy added in v0.6.0

func (in *CommonSpec) DeepCopy() *CommonSpec

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

func (*CommonSpec) DeepCopyInto added in v0.6.0

func (in *CommonSpec) DeepCopyInto(out *CommonSpec)

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

type CommonStatus added in v0.6.0

type CommonStatus struct {
	// ObservedGeneration is the last observed generation of the resource.
	ObservedGeneration int64 `json:"observedGeneration,omitempty" yaml:"observedGeneration,omitempty"`

	// Conditions reflect the current state of the resource
	ConditionedStatus `json:",inline" yaml:",inline"`

	// Contains the last error message encountered during reconciliation.
	LastError *string `json:"lastError,omitempty" yaml:"lastError,omitempty"`

	// The timestamp when the last error occurred.
	LastErrorTime *metav1.Time `json:"lastErrorTime,omitempty" yaml:"lastErrorTime,omitempty"`

	// Phase is the current state of the resource.
	Phase Phase `json:"phase,omitempty" yaml:"phase,omitempty"`
}

CommonStatus defines the common observed state

func (*CommonStatus) DeepCopy added in v0.6.0

func (in *CommonStatus) DeepCopy() *CommonStatus

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

func (*CommonStatus) DeepCopyInto added in v0.6.0

func (in *CommonStatus) DeepCopyInto(out *CommonStatus)

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

type ConditionedStatus added in v0.6.0

type ConditionedStatus struct {
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

func (*ConditionedStatus) DeepCopy added in v0.6.0

func (in *ConditionedStatus) DeepCopy() *ConditionedStatus

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

func (*ConditionedStatus) DeepCopyInto added in v0.6.0

func (in *ConditionedStatus) DeepCopyInto(out *ConditionedStatus)

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

func (*ConditionedStatus) DeleteCondition added in v0.6.0

func (s *ConditionedStatus) DeleteCondition(conditionType constant.ConditionType)

func (*ConditionedStatus) GetCondition added in v0.6.0

func (s *ConditionedStatus) GetCondition(conditionType constant.ConditionType) *metav1.Condition

func (*ConditionedStatus) SetCondition added in v0.6.0

func (s *ConditionedStatus) SetCondition(conditionType constant.ConditionType, status metav1.ConditionStatus, reason, message string)

type ContainerTemplate added in v0.6.0

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

	Spec   ContainerTemplateSpec   `json:"spec,omitempty"`
	Status ContainerTemplateStatus `json:"status,omitempty"`
}

ContainerTemplate is the Schema for the ContainerTemplates API

func (*ContainerTemplate) DeepCopy added in v0.6.0

func (in *ContainerTemplate) DeepCopy() *ContainerTemplate

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

func (*ContainerTemplate) DeepCopyInto added in v0.6.0

func (in *ContainerTemplate) DeepCopyInto(out *ContainerTemplate)

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

func (*ContainerTemplate) DeepCopyObject added in v0.6.0

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

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

type ContainerTemplateList added in v0.6.0

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

ContainerTemplateList contains a list of ContainerTemplate

func (*ContainerTemplateList) DeepCopy added in v0.6.0

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

func (*ContainerTemplateList) DeepCopyInto added in v0.6.0

func (in *ContainerTemplateList) DeepCopyInto(out *ContainerTemplateList)

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

func (*ContainerTemplateList) DeepCopyObject added in v0.6.0

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

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

type ContainerTemplateSharedSpec added in v0.6.0

type ContainerTemplateSharedSpec struct {

	// BaseSharedSpec is the base shared spec.
	CommonSpec `json:",inline"`

	// Type is the type of container to use. Can be one of 'code-server', 'webtop', 'devcontainers', 'jupyter'.
	// +kubebuilder:validation:Enum=code-server;webtop
	Type string `json:"type,omitempty"`

	// Runtime is the runtime for the service.
	// +kubebuilder:validation:Enum=gvisor
	Runtime RuntimeType `json:"runtime,omitempty"`

	// Image is the container image for the service.
	// +kubebuilder:validation:MinLength=1
	Image string `json:"image,omitempty"`

	// Command is the command to run in the container.
	Command []string `json:"command,omitempty"`

	// Specifies the environment variables.
	Env []corev1.EnvVar `json:"envs,omitempty"`

	// EnvFrom are the environment variables taken from a Secret or ConfigMap.
	EnvFrom []corev1.EnvFromSource `json:"envFrom,omitempty"`

	// Specifies the args.
	Args []string `json:"args,omitempty"`

	// Specifies the resources for the pod.
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`

	// Timezone for the service process. Defaults to 'UTC'.
	// +kubebuilder:default="UTC"
	TZ string `json:"tz,omitempty"`

	// User ID for the service process. Defaults to '1000'.
	// +kubebuilder:default=1000
	PUID int64 `json:"puid,omitempty"`

	// Group ID for the service process. Defaults to '1000'.
	// +kubebuilder:default=1000
	PGID int64 `json:"pgid,omitempty"`

	// Default home is the path to the directory for the user data. Defaults to '/config'.
	// +kubebuilder:validation:MinLength=3
	// +kubebuilder:default=/config
	DefaultHome string `json:"defaultHome,omitempty"`

	// Default workspace is the default directory for the kode instance on first launch. Defaults to 'workspace'.
	// +kubebuilder:validation:MinLength=3
	// +kubebuilder:validation:Pattern="^[^/].*$"
	// +kubebuilder:default=workspace
	DefaultWorkspace string `json:"defaultWorkspace,omitempty"`

	// Flag to allow privileged execution of the container.
	// +kubebuilder:default=false
	AllowPrivileged *bool `json:"allowPrivileged,omitempty"`

	// OCI containers to be run before the main container. It is an ordered list.
	InitPlugins []InitPluginSpec `json:"initPlugins,omitempty"`
}

ContainerTemplateSharedSpec defines the desired state of KodeContainer

func (*ContainerTemplateSharedSpec) DeepCopy added in v0.6.0

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

func (*ContainerTemplateSharedSpec) DeepCopyInto added in v0.6.0

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

type ContainerTemplateSharedStatus added in v0.6.0

type ContainerTemplateSharedStatus struct {
	CommonStatus `json:",inline"`
}

ContainerTemplateSharedStatus defines the observed state for Container

func (*ContainerTemplateSharedStatus) DeepCopy added in v0.6.0

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

func (*ContainerTemplateSharedStatus) DeepCopyInto added in v0.6.0

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

type ContainerTemplateSpec added in v0.6.0

type ContainerTemplateSpec struct {
	ContainerTemplateSharedSpec `json:",inline" yaml:",inline"`
}

ContainerTemplateSpec defines the desired state of ClusterKodeContainer

func (*ContainerTemplateSpec) DeepCopy added in v0.6.0

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

func (*ContainerTemplateSpec) DeepCopyInto added in v0.6.0

func (in *ContainerTemplateSpec) DeepCopyInto(out *ContainerTemplateSpec)

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

type ContainerTemplateStatus added in v0.6.0

type ContainerTemplateStatus struct {
	ContainerTemplateSharedStatus `json:",inline" yaml:",inline"`
}

ContainerTemplateStatus defines the observed state of ClusterKodeContainer

func (*ContainerTemplateStatus) DeepCopy added in v0.6.0

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

func (*ContainerTemplateStatus) DeepCopyInto added in v0.6.0

func (in *ContainerTemplateStatus) DeepCopyInto(out *ContainerTemplateStatus)

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

type CredentialsSpec

type CredentialsSpec struct {
	// Is both the the HTTP Basic auth username (when used) and the user the container should run as. Defaults to 'abc'.
	Username string `json:"username,omitempty" yaml:"username,omitempty"`

	// HTTP Basic auth password. If unset, there will be no authentication.
	Password string `json:"password,omitempty" yaml:"password,omitempty"`

	// ExistingSecret is a reference to an existing secret containing user and password. If set, User and Password fields are ignored.
	// MUST set "username" and "password" in lowercase in the secret. CAN set either "username" or "password" or both.
	ExistingSecret *string `json:"existingSecret,omitempty" yaml:"existingSecret,omitempty"`

	// EnableBuiltinAuth enables the built-in HTTP Basic auth.
	// +kubebuilder:default=false
	EnableBuiltinAuth bool `json:"enableBuiltinAuth,omitempty" yaml:"enableBuiltinAuth,omitempty"`
}

func (*CredentialsSpec) DeepCopy

func (in *CredentialsSpec) DeepCopy() *CredentialsSpec

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

func (*CredentialsSpec) DeepCopyInto

func (in *CredentialsSpec) DeepCopyInto(out *CredentialsSpec)

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

type CrossNamespaceObjectReference

type CrossNamespaceObjectReference struct {
	// API version of the referent.
	// +kubebuilder:validation:Optional
	APIVersion *string `json:"apiVersion,omitempty" yaml:"apiVersion,omitempty"`

	// Kind is the resource kind.
	Kind Kind `json:"kind" yaml:"kind"`

	// Name is the name of the resource.
	Name ObjectName `json:"name" yaml:"name"`

	// Namespace is the namespace of the resource.
	// +kubebuilder:validation:Optional
	Namespace *Namespace `json:"namespace,omitempty" yaml:"namespace,omitempty"`
}

func (*CrossNamespaceObjectReference) DeepCopy

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

func (*CrossNamespaceObjectReference) DeepCopyInto

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

type EntryPoint

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

	Spec   EntryPointSpec   `json:"spec,omitempty"`
	Status EntryPointStatus `json:"status,omitempty"`
}

EntryPoint is the Schema for the entrypoints API

func (*EntryPoint) AddFinalizer added in v0.7.0

func (e *EntryPoint) AddFinalizer(ctx context.Context, c client.Client) error

func (*EntryPoint) DeepCopy

func (in *EntryPoint) DeepCopy() *EntryPoint

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

func (*EntryPoint) DeepCopyInto

func (in *EntryPoint) DeepCopyInto(out *EntryPoint)

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

func (*EntryPoint) DeepCopyObject

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

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

func (*EntryPoint) DeleteCondition added in v0.6.0

func (e *EntryPoint) DeleteCondition(conditionType constant.ConditionType)

func (*EntryPoint) GetCondition

func (e *EntryPoint) GetCondition(conditionType constant.ConditionType) *metav1.Condition

func (*EntryPoint) GetFinalizer added in v0.7.0

func (e *EntryPoint) GetFinalizer() string

func (*EntryPoint) GetName added in v0.7.0

func (e *EntryPoint) GetName() string

func (*EntryPoint) GetNamespace added in v0.7.0

func (e *EntryPoint) GetNamespace() string

func (*EntryPoint) GetPhase added in v0.7.0

func (e *EntryPoint) GetPhase() Phase

func (*EntryPoint) HasExistingGateway

func (e *EntryPoint) HasExistingGateway() bool

func (*EntryPoint) IsPathRouting

func (e *EntryPoint) IsPathRouting() bool

func (*EntryPoint) IsSubdomainRouting

func (e *EntryPoint) IsSubdomainRouting() bool

func (*EntryPoint) RemoveFinalizer added in v0.7.0

func (e *EntryPoint) RemoveFinalizer(ctx context.Context, c client.Client) error

func (*EntryPoint) SetCondition

func (e *EntryPoint) SetCondition(conditionType constant.ConditionType, status metav1.ConditionStatus, reason, message string)

func (*EntryPoint) SetPhase added in v0.7.0

func (e *EntryPoint) SetPhase(phase Phase)

func (*EntryPoint) UpdateStatus added in v0.6.0

func (e *EntryPoint) UpdateStatus(ctx context.Context, c client.Client) error

type EntryPointList

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

EntryPointList contains a list of EntryPoint

func (*EntryPointList) DeepCopy

func (in *EntryPointList) DeepCopy() *EntryPointList

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

func (*EntryPointList) DeepCopyInto

func (in *EntryPointList) DeepCopyInto(out *EntryPointList)

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

func (*EntryPointList) DeepCopyObject

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

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

type EntryPointSpec

type EntryPointSpec struct {
	// The way the Kode resource is accessed by the user. It could be subdomain or path.
	// Path means the Kode resource is accessed as a path of the BaseDomain (e.g kode.example.com/<kode-resource>).
	// Subdomain means the Kode resource is accessed as a subdomain of the BaseDomain (e.g <kode-resource>.kode.example.com).
	// +kubebuilder:validation:Enum=subdomain;path
	// +kubebuilder:default=path
	RoutingType RoutingType `json:"routingType" yaml:"routingType"`

	// The domain name to use either as a suffix in the case of Type=domain or as a prefix/domain in the case of Type=path.
	// When the type is domain, the controller will try to publish the Kode resource as a subdomain of the given domain (e.g <kode-resource>.kode.example.com).
	// When the type is path, the controller will try to publish the Kode resource as a path of the given BaseDomain (e.g kode.example.com/<kode-resource>).
	// +kubebuilder:validation:Pattern=^([a-zA-Z0-9_]+\.)*[a-zA-Z0-9_]+$
	BaseDomain string `json:"baseDomain" yaml:"baseDomain"`

	// GatewaySpec defines the GatewaySpec for the EntryPoint.
	// +kubebuilder:validation:Optional
	GatewaySpec *GatewaySpec `json:"gatewaySpec,omitempty" yaml:"gatewaySpec,omitempty"`

	// AuthSpec defines the AuthSpec for the EntryPoint. Use this to influence the authentication and authorization policies of the EntryPoint.
	// +kubebuilder:validation:Optional
	AuthSpec *AuthSpec `json:"authSpec,omitempty" yaml:"authSpec,omitempty"`
}

EntryPointSpec defines the desired state of EntryPoint

func (*EntryPointSpec) DeepCopy

func (in *EntryPointSpec) DeepCopy() *EntryPointSpec

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

func (*EntryPointSpec) DeepCopyInto

func (in *EntryPointSpec) DeepCopyInto(out *EntryPointSpec)

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

type EntryPointStatus

type EntryPointStatus struct {
	CommonStatus `json:",inline" yaml:",inline"`

	// RetryCount keeps track of the number of retry attempts for failed states.
	RetryCount int `json:"retryCount,omitempty"`

	// DeletionCycle keeps track of the number of deletion cycles. This is used to determine if the resource is deleting.
	DeletionCycle int `json:"deletionCycle,omitempty"` // TODO: Remove this field and use RetryCount instead. Deleting and failure are not executing at the same time.
}

EntryPointStatus defines the observed state of EntryPoint

func (*EntryPointStatus) DeepCopy

func (in *EntryPointStatus) DeepCopy() *EntryPointStatus

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

func (*EntryPointStatus) DeepCopyInto

func (in *EntryPointStatus) DeepCopyInto(out *EntryPointStatus)

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

type GatewaySpec

type GatewaySpec struct {
	// Reference to an existing Gateway to use for the EntryPoint.
	ExistingGatewayRef *CrossNamespaceObjectReference `json:"existingGatewayRef" yaml:"existingGatewayRef"`

	// Protocol defines the protocol to use for the HTTPRoutes. Can be either "http" or "https".
	// +kubebuilder:validation:Enum=http;https
	// +kubebuilder:default=http
	Protocol Protocol `json:"protocol,omitempty" yaml:"protocol,omitempty"`
}

func (*GatewaySpec) DeepCopy

func (in *GatewaySpec) DeepCopy() *GatewaySpec

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

func (*GatewaySpec) DeepCopyInto

func (in *GatewaySpec) DeepCopyInto(out *GatewaySpec)

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

type Group

type Group string

Group refers to a Kubernetes Group. It must either be an empty string or a RFC 1123 subdomain.

This validation is based off of the corresponding Kubernetes validation: https://github.com/kubernetes/apimachinery/blob/02cfb53916346d085a6c6c7c66f882e3c6b0eca6/pkg/util/validation/validation.go#L208

Valid values include:

* "" - empty string implies core Kubernetes API group * "gateway.networking.k8s.io" * "foo.example.com"

Invalid values include:

* "example.com/bar" - "/" is an invalid character

+kubebuilder:validation:MaxLength=253 +kubebuilder:validation:Pattern=`^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`

type IdentityReference

type IdentityReference string

IdentityReference is a reference to a field in the JWT token of OIDC or JWT. TODO: Add validation pattern: "^[a-zA-Z0-9_-]+$"

type InitPluginSpec

type InitPluginSpec struct {
	// The name of the container.
	// +kubebuilder:validation:Required
	Name string `json:"name"`

	// The OCI image for the container.
	// +kubebuilder:validation:Required
	Image string `json:"image"`

	// The command to run in the container.
	Command []string `json:"command,omitempty"`

	// The arguments that will be passed to the command in the main container.
	Args []string `json:"args,omitempty"`

	// The environment variables for the main container.
	Env []corev1.EnvVar `json:"env,omitempty"`

	// The environment variables taken from a Secret or ConfigMap for the main container.
	EnvFrom []corev1.EnvFromSource `json:"envFrom,omitempty"`

	// The volume mounts for the container. Can be used to mount a ConfigMap or Secret.
	VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`
}

func (*InitPluginSpec) DeepCopy

func (in *InitPluginSpec) DeepCopy() *InitPluginSpec

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

func (*InitPluginSpec) DeepCopyInto

func (in *InitPluginSpec) DeepCopyInto(out *InitPluginSpec)

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

type Kind

type Kind string

Kind refers to a Kubernetes Kind.

Valid values include:

* "Service" * "HTTPRoute"

Invalid values include:

* "invalid/kind" - "/" is an invalid character

+kubebuilder:validation:MinLength=1 +kubebuilder:validation:MaxLength=63 +kubebuilder:validation:Pattern=`^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$`

type Kode

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

	Spec   KodeSpec   `json:"spec,omitempty"`
	Status KodeStatus `json:"status,omitempty"`
}

Kode is the Schema for the kodes API

func (*Kode) AddFinalizer added in v0.7.0

func (k *Kode) AddFinalizer(ctx context.Context, c client.Client) error

func (*Kode) DeepCopy

func (in *Kode) DeepCopy() *Kode

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

func (*Kode) DeepCopyInto

func (in *Kode) DeepCopyInto(out *Kode)

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

func (*Kode) DeepCopyObject

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

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

func (*Kode) DeleteCondition added in v0.6.0

func (k *Kode) DeleteCondition(conditionType constant.ConditionType)

func (*Kode) GenerateKodeUrlForEntryPoint

func (k *Kode) GenerateKodeUrlForEntryPoint(
	routingType RoutingType,
	domain string,
	name string,
	protocol Protocol,
) (KodeHostname, KodeDomain, KodeUrl, KodePath, error)

func (*Kode) GetCondition

func (k *Kode) GetCondition(conditionType constant.ConditionType) *metav1.Condition

func (*Kode) GetFinalizer added in v0.7.0

func (k *Kode) GetFinalizer() string

func (*Kode) GetName added in v0.7.0

func (k *Kode) GetName() string

func (*Kode) GetNamespace added in v0.7.0

func (k *Kode) GetNamespace() string

func (*Kode) GetPVCName

func (k *Kode) GetPVCName() string

func (*Kode) GetPhase added in v0.7.0

func (k *Kode) GetPhase() Phase

func (*Kode) GetPort

func (k *Kode) GetPort() Port

func (*Kode) GetRuntime added in v0.6.0

func (k *Kode) GetRuntime() *Runtime

func (*Kode) GetSecretName added in v0.5.0

func (k *Kode) GetSecretName() string

func (*Kode) GetServiceName

func (k *Kode) GetServiceName() string

func (*Kode) GetStatefulSetName added in v0.7.0

func (k *Kode) GetStatefulSetName() string

func (*Kode) RemoveFinalizer added in v0.7.0

func (k *Kode) RemoveFinalizer(ctx context.Context, c client.Client) error

func (*Kode) SetCondition

func (k *Kode) SetCondition(conditionType constant.ConditionType, status metav1.ConditionStatus, reason, message string)

func (*Kode) SetPhase added in v0.6.0

func (k *Kode) SetPhase(phase Phase)

func (*Kode) SetRuntime

func (k *Kode) SetRuntime(runtime Runtime, ctx context.Context, c client.Client) error

func (*Kode) UpdateStatus added in v0.6.0

func (k *Kode) UpdateStatus(ctx context.Context, c client.Client) error

func (*Kode) UpdateUrl added in v0.6.0

func (k *Kode) UpdateUrl(ctx context.Context, c client.Client, kodeUrl KodeUrl) error

type KodeDomain

type KodeDomain string

type KodeHostname

type KodeHostname string

type KodeIconUrl added in v0.6.0

type KodeIconUrl string

type KodeList

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

KodeList contains a list of Kode

func (*KodeList) DeepCopy

func (in *KodeList) DeepCopy() *KodeList

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

func (*KodeList) DeepCopyInto

func (in *KodeList) DeepCopyInto(out *KodeList)

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

func (*KodeList) DeepCopyObject

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

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

type KodePath added in v0.5.0

type KodePath string

type KodeRuntime added in v0.6.0

type KodeRuntime string

KodeRuntime specifies the runtime for the Kode resource. Can be one of 'container', 'virtual'.

const (
	RuntimeContainer KodeRuntime = "container"
	RuntimeVirtual   KodeRuntime = "virtual"
)

type KodeSpec

type KodeSpec struct {
	// The reference to a template. Either a ContainerTemplate or VirtualTemplate.
	// +kubebuilder:validation:Required
	TemplateRef CrossNamespaceObjectReference `json:"templateRef"`

	// Specifies the credentials for the service.
	Credentials *CredentialsSpec `json:"credentials,omitempty"`

	// The path to the directory for the user data. Defaults to '/config'.
	// +kubebuilder:validation:MinLength=3
	// +kubebuilder:default=/config
	Home *string `json:"home,omitempty"`

	// The user specified workspace directory (e.g. my-workspace).
	// +kubebuilder:validation:MinLength=3
	// +kubebuilder:validation:Pattern="^[a-zA-Z0-9_-]+$"
	Workspace *string `json:"workspace,omitempty"`

	// Specifies the storage configuration.
	Storage *KodeStorageSpec `json:"storage,omitempty"`

	// Specifies a git repository URL to get user configuration from.
	// +kubebuilder:validation:Pattern=`^(https?:\/\/)?([\w\.-]+@)?([\w\.-]+)(:\d+)?\/?([\w\.-]+)\/([\w\.-]+)(\.git)?(\/?|\#[\w\.\-_]+)?$|^oci:\/\/([\w\.-]+)(:\d+)?\/?([\w\.-\/]+)(@sha256:[a-fA-F0-9]{64})?$`
	// +kubebuilder:validation:Optional
	UserConfig *string `json:"userConfig,omitempty"`

	// Specifies if the container should run in privileged mode. Will only work if the KodeTemplate allows it. Only set to true if you know what you are doing.
	// +kubebuilder:default=false
	Privileged *bool `json:"privileged,omitempty"`

	// Specifies the OCI containers to be run as InitContainers. These containers can be used to prepare the workspace or run some setup scripts. It is an ordered list.
	InitPlugins []InitPluginSpec `json:"initPlugins,omitempty"`
}

KodeSpec defines the desired state of Kode

func (*KodeSpec) DeepCopy

func (in *KodeSpec) DeepCopy() *KodeSpec

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

func (*KodeSpec) DeepCopyInto

func (in *KodeSpec) DeepCopyInto(out *KodeSpec)

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

type KodeStatus

type KodeStatus struct {
	CommonStatus `json:",inline" yaml:",inline"`

	// The URL to access the Kode.
	KodeUrl KodeUrl `json:"kodeUrl,omitempty"`

	// The port to access the Kode.
	KodePort Port `json:"kodePort,omitempty"`

	// The URL to the icon for the Kode.
	KodeIconUrl KodeIconUrl `json:"iconUrl,omitempty"`

	// The runtime for the Kode.
	Runtime *Runtime `json:"runtime,omitempty"`

	// The timestamp when the last activity occurred.
	LastActivityTime *metav1.Time `json:"lastActivityTime,omitempty"`

	// RetryCount keeps track of the number of retry attempts for failed states.
	RetryCount int `json:"retryCount,omitempty"`

	// DeletionCycle keeps track of the number of deletion cycles. This is used to determine if the resource is deleting.
	DeletionCycle int `json:"deletionCycle,omitempty"` // TODO: Remove this field and use RetryCount instead. Deleting and failure are not executing at the same time.
}

KodeStatus defines the observed state of Kode

func (*KodeStatus) DeepCopy

func (in *KodeStatus) DeepCopy() *KodeStatus

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

func (*KodeStatus) DeepCopyInto

func (in *KodeStatus) DeepCopyInto(out *KodeStatus)

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

type KodeStorageSpec

type KodeStorageSpec struct {
	// Specifies the access modes for the persistent volume.
	AccessModes []corev1.PersistentVolumeAccessMode `json:"accessModes,omitempty"`

	// Specifies the storage class name for the persistent volume.
	StorageClassName *string `json:"storageClassName,omitempty"`

	// Specifies the resource requirements for the persistent volume.
	Resources *corev1.VolumeResourceRequirements `json:"resources,omitempty"`

	// Specifies if the volume should be kept when the kode is recycled. Defaults to false.
	// +kubebuilder:default=false
	KeepVolume *bool `json:"keepVolume,omitempty"`

	// Specifies an existing PersistentVolumeClaim to use instead of creating a new one.
	ExistingVolumeClaim *string `json:"existingVolumeClaim,omitempty"`
}

KodeStorageSpec defines the storage configuration

func (*KodeStorageSpec) DeepCopy

func (in *KodeStorageSpec) DeepCopy() *KodeStorageSpec

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

func (*KodeStorageSpec) DeepCopyInto

func (in *KodeStorageSpec) DeepCopyInto(out *KodeStorageSpec)

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

func (*KodeStorageSpec) IsEmpty

func (s *KodeStorageSpec) IsEmpty() bool

type KodeUrl

type KodeUrl string

type Namespace

type Namespace string

Namespace refers to a Kubernetes namespace. It must be a RFC 1123 label.

This validation is based off of the corresponding Kubernetes validation: https://github.com/kubernetes/apimachinery/blob/02cfb53916346d085a6c6c7c66f882e3c6b0eca6/pkg/util/validation/validation.go#L187

This is used for Namespace name validation here: https://github.com/kubernetes/apimachinery/blob/02cfb53916346d085a6c6c7c66f882e3c6b0eca6/pkg/api/validation/generic.go#L63

Valid values include:

* "example"

Invalid values include:

* "example.com" - "." is an invalid character

+kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$` +kubebuilder:validation:MinLength=1 +kubebuilder:validation:MaxLength=63

type ObjectName

type ObjectName string

ObjectName refers to the name of a Kubernetes object. Object names can have a variety of forms, including RFC 1123 subdomains, RFC 1123 labels, or RFC 1035 labels.

+kubebuilder:validation:MinLength=1 +kubebuilder:validation:MaxLength=253

type Phase added in v0.7.0

type Phase string
const (
	// PhasePending indicates the initial state when a new resource is created.
	// The controller has acknowledged the resource but hasn't started processing it yet.
	PhasePending Phase = "Pending"
	// PhaseConfiguring indicates that the controller is actively setting up the resource.
	// This includes creating necessary Kubernetes resources, configuring storage, and applying user configurations.
	PhaseConfiguring Phase = "Configuring"
	// PhaseProvisioning indicates that all necessary resources have been created,
	// but the system is waiting for these resources to become fully operational.
	// This may include waiting for pods to be scheduled and reach a ready state or for any initialization processes to complete.
	PhaseProvisioning Phase = "Provisioning"
	// PhaseActive indicates that the resource is fully operational.
	// All associated Kubernetes resources are created and ready to serve requests.
	PhaseActive Phase = "Active"
	// PhaseUpdating indicates that the resource is in the process of being updated.
	// The controller is actively working on updating the environment with new configurations or resources.
	PhaseUpdating Phase = "Updating"
	// PhaseDeleting indicates the resource is being permanently removed.
	// The controller is in the process of deleting all associated Kubernetes resources.
	PhaseDeleting Phase = "Deleting"
	// PhaseFailed indicates that an error occurred during the lifecycle of the resource.
	// This could be during creation, updating, or management of the resource or its associated resources.
	// The controller will typically attempt to recover from this state automatically.
	PhaseFailed Phase = "Failed"
	// PhaseUnknown indicates that the resource is in an indeterminate state.
	// This may occur if the controller loses connection with the resource or encounters unexpected conditions.
	// The controller will attempt to reconcile and determine the correct state.
	PhaseUnknown Phase = "Unknown"
)

type Port

type Port int32

Port for the service. Used by EnvoyProxy to expose the container. Defaults to '8000'. +kubebuilder:validation:Minimum=1 +kubebuilder:default=8000

type Protocol added in v0.5.0

type Protocol string

Protocol is the protocol used by the service.

const (
	ProtocolHTTP  Protocol = "http"
	ProtocolHTTPS Protocol = "https"
)

type RoutingType

type RoutingType string

RoutingType is the way the Kode resource is accessed by the user. It could be subdomain or path.

const (
	RoutingTypeSubdomain RoutingType = "subdomain"
	RoutingTypePath      RoutingType = "path"
)

type Runtime

type Runtime struct {
	// KodeRuntime is the runtime for the Kode resource. Can be one of 'container', 'virtual'.
	// +kubebuilder:validation:Enum=container;virtual
	Runtime KodeRuntime `json:"runtime"`

	// Type is the container runtime for Kode resource.
	Type RuntimeType `json:"type,omitempty"`
}

func (*Runtime) DeepCopy added in v0.6.0

func (in *Runtime) DeepCopy() *Runtime

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

func (*Runtime) DeepCopyInto added in v0.6.0

func (in *Runtime) DeepCopyInto(out *Runtime)

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

type RuntimeType added in v0.6.0

type RuntimeType string

RuntimeType specifies the type of the runtime for the Kode resource.

const (
	ContainerRuntimeContainerd RuntimeType = "containerd"
	ContainerRuntimeGvisor     RuntimeType = "gvisor"
)

type SecurityPolicySpec

type SecurityPolicySpec struct {
	// ExtAuth defines the configuration for External Authorization.
	//
	// +optional
	ExtAuth *egv1alpha1.ExtAuth `json:"extAuth,omitempty"`
}

func (*SecurityPolicySpec) DeepCopy

func (in *SecurityPolicySpec) DeepCopy() *SecurityPolicySpec

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

func (*SecurityPolicySpec) DeepCopyInto

func (in *SecurityPolicySpec) DeepCopyInto(out *SecurityPolicySpec)

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

type Template

type Template struct {
	// Kind specifies the type of template (e.g., "ContainerTemplate", "ClusterContainerTemplate")
	Kind Kind `json:"kind" yaml:"kind"`

	// Name is the name of the template resource
	Name ObjectName `json:"name" yaml:"name"`

	// Namespace is the namespace of the template resource
	Namespace Namespace `json:"namespace,omitempty" yaml:"namespace,omitempty"`

	// Port is the port to expose the kode instance
	Port Port `json:"port" yaml:"port"`

	// ContainerTemplateSpec is a reference to a ContainerTemplate or ClusterContainerTemplate
	ContainerTemplateSpec *ContainerTemplateSharedSpec `json:"container,omitempty" yaml:"container,omitempty"`

	// EntryPointSpecRef is a reference to an EntryPointSpec
	EntryPointRef *CrossNamespaceObjectReference `json:"entryPointSpecRef,omitempty" yaml:"entryPointSpecRef,omitempty"`

	EntryPointSpec *EntryPointSpec `json:"entryPoint,omitempty" yaml:"entryPoint,omitempty"`
}

Template represents a unified structure for different types of Kode templates

func (*Template) DeepCopy

func (in *Template) DeepCopy() *Template

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

func (*Template) DeepCopyInto

func (in *Template) DeepCopyInto(out *Template)

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

type TemplateKind

type TemplateKind string
const (
	TemplateKindContainer        TemplateKind = "ContainerTemplate"
	TemplateKindClusterContainer TemplateKind = "ClusterContainerTemplate"
	TemplateKindVirtual          TemplateKind = "VirtualTemplate"
	TemplateKindClusterVirtual   TemplateKind = "ClusterVirtualTemplate"
)

Jump to

Keyboard shortcuts

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