v1alpha1

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 5 Imported by: 2

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API.

Index

Constants

View Source
const (
	ExposureServiceClusterIP ExposureMode = "ClusterIP"
	ExposureServiceNodePort  ExposureMode = "NodePort"
	ExposureIngress          ExposureMode = "Ingress"
	ExposureVirtualService   ExposureMode = "VirtualService"

	PhaseReady     = "Ready"
	PhaseCompleted = "Complete"
	PhaseFailed    = "Failed"
)
View Source
const GroupName = "cloudshell.cloudtty.io"

GroupName specifies the group name used to register the objects.

Variables

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

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

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

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

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

Functions

func RegisterDefaults added in v0.6.0

func RegisterDefaults(scheme *runtime.Scheme) error

RegisterDefaults adds defaulters functions to the given scheme. Public to allow building arbitrary schemes. All generated defaulters are covering - they call all nested defaulters.

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

func SetObjectDefaultsCloudShell added in v0.6.0

func SetObjectDefaultsCloudShell(in *CloudShell)

SetObjectDefaultsCloudShell set defaults for cloudshell

Types

type CloudShell

type CloudShell struct {
	metav1.TypeMeta `json:",inline"`

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

	// Spec defines the desired behavior of the cloudshell.
	// +optional
	Spec CloudShellSpec `json:"spec,omitempty"`

	// Most recently observed status of the cloudshell.
	// +optional
	Status CloudShellStatus `json:"status,omitempty"`
}

CloudShell is the Schema for the cloudshells API

func (*CloudShell) DeepCopy

func (in *CloudShell) DeepCopy() *CloudShell

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

func (*CloudShell) DeepCopyInto

func (in *CloudShell) DeepCopyInto(out *CloudShell)

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

func (*CloudShell) DeepCopyObject

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

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

type CloudShellList

type CloudShellList struct {
	metav1.TypeMeta `json:",inline"`

	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`

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

CloudShellList contains a list of CloudShell

func (*CloudShellList) DeepCopy

func (in *CloudShellList) DeepCopy() *CloudShellList

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

func (*CloudShellList) DeepCopyInto

func (in *CloudShellList) DeepCopyInto(out *CloudShellList)

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

func (*CloudShellList) DeepCopyObject

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

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

type CloudShellSpec

type CloudShellSpec struct {

	// SecretRef represents the secret contains mandatory credentials to access the target cluster.
	// The secret should hold credentials as follows:
	// - secret.data.token
	// - secret.data.caBundle
	// The field is alpha phase, paleas open the featuregate AllowSecretStoreKubeconfig to use it.
	// +optional
	SecretRef *LocalSecretReference `json:"secretRef,omitempty"`

	// Image defines the image to cloudshell, we can customize an image.
	// Note: the image must be built on top of the officially available base image.
	// Please see: https://github.com/cloudtty/cloudtty#how-to-build-custom-cloudshell-image
	// +optional
	Image string `json:"image,omitempty"`

	// accept only one client and exit on disconnection
	// +optional
	Once bool `json:"once,omitempty"`

	// +optional
	CommandAction string `json:"commandAction,omitempty"`

	// +optional
	TTLSecondsAfterStarted *int64 `json:"ttlSecondsAfterStarted,omitempty"`

	// Cleanup specified whether to delete cloudshell resources when corresponding job status is completed.
	// +optional
	Cleanup bool `json:"cleanup,omitempty"`

	// +kubebuilder:validation:Enum=ClusterIP;NodePort;Ingress;VirtualService
	// + optional
	ExposeMode ExposureMode `json:"exposureMode,omitempty"`

	// Specifies a port number range 30000-32767 when using nodeport mode,
	// if not specified, kubernetes default random rule is used.
	// NodePort int32 `json:"NodePort,omitempty"`
	// IngressConfig specifies necessary parameters to create ingress.
	// +optional
	IngressConfig *IngressConfig `json:"ingressConfig,omitempty"`

	// VirtualServiceConfig specifies some of the parameters necessary to create the virtaulService.
	// +optional
	VirtualServiceConfig *VirtualServiceConfig `json:"virtualServiceConfig,omitempty"`

	// PathPrefix specified a path prefix to access url, if not, the default path is used.
	// +optional
	PathPrefix string `json:"pathPrefix,omitempty"`

	// PathSuffix specified a path suffix to access url, if not, the default path is used.
	// +optional
	PathSuffix string `json:"pathSuffix,omitempty"`

	// UrlArg allow client to send command line arguments in URL (eg: http://localhost:7681?arg=foo&arg=bar)
	// +optional
	UrlArg bool `json:"urlArg,omitempty"` //nolint:all

	// List of environment variables to set in the container.
	// Cannot be updated.
	// +optional
	// +patchMergeKey=name
	// +patchStrategy=merge
	Env []corev1.EnvVar `json:"env,omitempty"`
}

CloudShellSpec defines the desired state of CloudShell

func (*CloudShellSpec) DeepCopy

func (in *CloudShellSpec) DeepCopy() *CloudShellSpec

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

func (*CloudShellSpec) DeepCopyInto

func (in *CloudShellSpec) DeepCopyInto(out *CloudShellSpec)

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

type CloudShellStatus

type CloudShellStatus struct {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
	// Important: Run "make" to regenerate code after modifying this file
	// +optional
	Phase string `json:"phase"`

	// +optional
	AccessURL string `json:"accessUrl"`

	// Information when was the last time the pod was successfully scheduled.
	// +optional
	LastScheduleTime *metav1.Time `json:"lastScheduleTime,omitempty"`
}

CloudShellStatus defines the observed state of CloudShell

func (*CloudShellStatus) DeepCopy

func (in *CloudShellStatus) DeepCopy() *CloudShellStatus

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

func (*CloudShellStatus) DeepCopyInto

func (in *CloudShellStatus) DeepCopyInto(out *CloudShellStatus)

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

type ExposureMode

type ExposureMode string

ExposeMode describes how to access ttyd service, either ClusterIP, NodePort, Ingress or VirtualService. +enum

type IngressConfig

type IngressConfig struct {
	// IngressName specifies a name to ingress, if it's empty, default "cloudshell-ingress".
	IngressName string `json:"ingressName,omitempty"`

	// Namespace specifies a namespace that the virtualService will be
	// created in it. if it's empty, default the cloudshell namespace.
	Namespace string `json:"namespace,omitempty"`

	// IngressClassName specifies a ingress controller to ingress,
	// it must be fill when the cluster have multiple ingress controller service.
	IngressClassName string `json:"ingressClassName,omitempty"`
}

IngressConfig specifies some of the parameters necessary to create the ingress.

func (*IngressConfig) DeepCopy

func (in *IngressConfig) DeepCopy() *IngressConfig

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

func (*IngressConfig) DeepCopyInto

func (in *IngressConfig) DeepCopyInto(out *IngressConfig)

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

type LocalSecretReference added in v0.4.0

type LocalSecretReference struct {
	// Name is the name of resource being referenced.
	Name string `json:"name,omitempty"`
}

LocalSecretReference is a reference to a secret within the enclosing namespace.

func (*LocalSecretReference) DeepCopy added in v0.6.0

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

func (*LocalSecretReference) DeepCopyInto added in v0.6.0

func (in *LocalSecretReference) DeepCopyInto(out *LocalSecretReference)

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

type VirtualServiceConfig

type VirtualServiceConfig struct {
	// VirtualServiceName specifies a name to virtualService, if it's
	// empty, default "cloudshell-VirtualService"
	VirtualServiceName string `json:"virtualServiceName,omitempty"`

	// Namespace specifies a namespace that the virtualService will be
	// created in it. if it's empty, default the cloudshell namespace.
	Namespace string `json:"namespace,omitempty"`

	// The value "." is reserved and defines an export to the same namespace that
	// the virtual service is declared in. Similarly the value "*" is reserved and
	// defines an export to all namespaces.
	ExportTo string `json:"export_to,omitempty"`

	// Gateway must be specified and the gateway already exists in the cluster.
	Gateway string `json:"gateway,omitempty"`
}

VirtualServiceConfig specifies some of the parameters necessary to create the virtaulService.

func (*VirtualServiceConfig) DeepCopy

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

func (*VirtualServiceConfig) DeepCopyInto

func (in *VirtualServiceConfig) DeepCopyInto(out *VirtualServiceConfig)

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