Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the extensions v1alpha1 API group +kubebuilder:object:generate=true +groupName=dashboard.gardener.cloud
Index ¶
- Constants
- Variables
- type BindingKind
- type ClusterCredentials
- type Container
- type ControllerManagerConfiguration
- type ControllerManagerControllerConfiguration
- type ControllerManagerLoggerConfiguration
- type ControllerManagerWebhookConfiguration
- type Duration
- type ErrorCode
- type HostCluster
- type LastError
- type Pod
- type TargetCluster
- type Terminal
- type TerminalControllerConfiguration
- type TerminalHeartbeatControllerConfiguration
- type TerminalList
- type TerminalSpec
- type TerminalStatus
- type TerminalValidatingWebhookConfiguration
Constants ¶
const ( // TerminalName is the value in a Terminal resource's `.metadata.finalizers[]` array on which the Terminal controller will react // when performing a delete request on a resource. TerminalName = "terminal" // Component is the label key for the component Component = "component" // TerminalComponent is the component name of the terminal controller manager. All resources created by the terminal controller will have this label TerminalComponent = "terminal-controller-manager" // GardenCreatedBy is the key for an annotation of a terminal resource whose value contains the username // of the user that created the resource. GardenCreatedBy = "gardener.cloud/created-by" // TerminalLastHeartbeat is the key for an annotation of a terminal resource whose value contains the username // of the user that created the resource. TerminalLastHeartbeat = "dashboard.gardener.cloud/last-heartbeat-at" // ShootOperation is a constant for an annotation on a Shoot in a failed state indicating that an operation shall be performed. TerminalOperation = "dashboard.gardener.cloud/operation" // ShootOperationMaintain is a constant for an annotation on a Shoot indicating that the Shoot maintenance shall be executed as soon as // possible. TerminalOperationKeepalive = "keepalive" // EventReconciling indicates that a Reconcile operation started. EventReconciling = "Reconciling" // EventReconciled indicates that a Reconcile operation was successful. EventReconciled = "Reconciled" // EventReconcileError indicates that a Reconcile operation failed. EventReconcileError = "ReconcileError" // EventDeleting indicates that a Delete operation started. EventDeleting = "Deleting" // EventDeleted indicates that a Delete operation was successful. EventDeleted = "Deleted" // EventDeleteError indicates that a Delete operation failed. EventDeleteError = "DeleteError" // BindingKindClusterRoleBinding will result in a ClusterRoleBinding BindingKindClusterRoleBinding BindingKind = "ClusterRoleBinding" // BindingKindRoleBinding will result in a RoleBinding BindingKindRoleBinding BindingKind = "RoleBinding" // KubeconfigSecretResourceNamePrefix is a name prefix for the kubeconfig secret used within the terminal pod. KubeconfigSecretResourceNamePrefix = "term-kubeconfig-" // TerminalAttachResourceNamePrefix is a name prefix for resources related to attach to the terminal pod. TerminalAttachResourceNamePrefix = "term-attach-" // TerminalAccessResourceNamePrefix is a name prefix for resources related to accessing the target cluster. TerminalAccessResourceNamePrefix = "term-access-" // TerminalPodResourceNamePrefix is a name prefix for the terminal pod TerminalPodResourceNamePrefix = "term-" // TerminalAttachRoleResourceNamePrefix is a name prefix for the role allowing to attach to the terminal pod TerminalAttachRoleResourceNamePrefix = "dashboard.gardener.cloud:term-attach-" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "dashboard.gardener.cloud", 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 BindingKind ¶
type BindingKind string
BindingKind describes the desired role binding +kubebuilder:validation:Enum=ClusterRoleBinding;RoleBinding
type ClusterCredentials ¶
type ClusterCredentials struct {
// SecretRef is a reference to a secret that contains the cluster specific credentials
// Either SecretRef or ServiceAccountRef is mandatory. SecretRef will be used if both refs are provided.
// +optional
SecretRef *corev1.SecretReference `json:"secretRef,omitempty"`
// ServiceAccountRef is a reference to a service account that should be used, usually to manage resources on the same cluster as the service account is residing in
// +optional
ServiceAccountRef *corev1.ObjectReference `json:"serviceAccountRef,omitempty"`
}
ClusterCredentials define the credentials for a kubernetes cluster
func (*ClusterCredentials) DeepCopy ¶
func (in *ClusterCredentials) DeepCopy() *ClusterCredentials
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterCredentials.
func (*ClusterCredentials) DeepCopyInto ¶
func (in *ClusterCredentials) DeepCopyInto(out *ClusterCredentials)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Container ¶
type Container struct {
// Image defines the image used for the container.
// As this image is also used for the "setup" init container, the `/bin/cp` binary has to be part of the image
Image string `json:"image"`
// Entrypoint array. Not executed within a shell.
// The docker image's ENTRYPOINT is used if this is not provided.
// Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
// cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax
// can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
// regardless of whether the variable exists or not.
// Cannot be updated.
// More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
// +optional
Command []string `json:"command,omitempty"`
// Arguments to the entrypoint.
// The docker image's CMD is used if this is not provided.
// Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
// cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax
// can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
// regardless of whether the variable exists or not.
// Cannot be updated.
// More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
// +optional
Args []string `json:"args,omitempty"`
// Compute Resources required by this container.
// Cannot be updated.
// More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
// +optional
Resources corev1.ResourceRequirements `json:"resources,omitempty"`
// Run container in privileged mode.
// Processes in privileged containers are essentially equivalent to root on the host.
// Defaults to false.
// +optional
Privileged bool `json:"privileged,omitempty"`
}
A single application container that you want to run within a pod.
func (*Container) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Container.
func (*Container) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ControllerManagerConfiguration ¶
type ControllerManagerConfiguration struct {
// +optional
Kind string `yaml:"kind"`
// +optional
APIVersion string `yaml:"apiVersion"`
// Controllers defines the configuration of the controllers.
Controllers ControllerManagerControllerConfiguration `yaml:"controllers"`
// Webhooks defines the configuration of the admission webhooks.
Webhooks ControllerManagerWebhookConfiguration `yaml:"webhooks"`
// Logger defines the configuration of the zap logging module.
Logger ControllerManagerLoggerConfiguration `yaml:"logger"`
// HonourServiceAccountRef defines if the `credentials.serviceAccountRef` property should be honoured.
// It is recommended to be set to false for multi-cluster setups, in case pods are refused on the (virtual) cluster where the terminal resources are stored.
// Defaults to true.
// +optional
HonourServiceAccountRef bool `yaml:"honourServiceAccountRef"`
}
ControllerManagerConfiguration defines the configuration for the Gardener controller manager.
func (*ControllerManagerConfiguration) DeepCopy ¶
func (in *ControllerManagerConfiguration) DeepCopy() *ControllerManagerConfiguration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerManagerConfiguration.
func (*ControllerManagerConfiguration) DeepCopyInto ¶
func (in *ControllerManagerConfiguration) DeepCopyInto(out *ControllerManagerConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ControllerManagerControllerConfiguration ¶
type ControllerManagerControllerConfiguration struct {
// Terminal defines the configuration of the Terminal controller.
Terminal TerminalControllerConfiguration `yaml:"terminal"`
// TerminalHeartbeat defines the configuration of the TerminalHeartbeat controller.
TerminalHeartbeat TerminalHeartbeatControllerConfiguration `yaml:"terminalHeartbeat"`
}
ControllerManagerControllerConfiguration defines the configuration of the controllers.
func (*ControllerManagerControllerConfiguration) DeepCopy ¶
func (in *ControllerManagerControllerConfiguration) DeepCopy() *ControllerManagerControllerConfiguration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerManagerControllerConfiguration.
func (*ControllerManagerControllerConfiguration) DeepCopyInto ¶
func (in *ControllerManagerControllerConfiguration) DeepCopyInto(out *ControllerManagerControllerConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ControllerManagerLoggerConfiguration ¶
type ControllerManagerLoggerConfiguration struct {
// If Development is true, a Zap development config will be used
// (stacktraces on warnings, no sampling), otherwise a Zap production
// config will be used (stacktraces on errors, sampling). Defaults to true.
Development bool `yaml:"development"`
}
ControllerManagerLogger defines the configuration of the Zap Logger.
func (*ControllerManagerLoggerConfiguration) DeepCopy ¶
func (in *ControllerManagerLoggerConfiguration) DeepCopy() *ControllerManagerLoggerConfiguration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerManagerLoggerConfiguration.
func (*ControllerManagerLoggerConfiguration) DeepCopyInto ¶
func (in *ControllerManagerLoggerConfiguration) DeepCopyInto(out *ControllerManagerLoggerConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ControllerManagerWebhookConfiguration ¶
type ControllerManagerWebhookConfiguration struct {
// TerminalValidation defines the configuration of the validating webhook.
TerminalValidation TerminalValidatingWebhookConfiguration `yaml:"terminalValidation"`
}
ControllerManagerWebhookConfiguration defines the configuration of the admission webhooks.
func (*ControllerManagerWebhookConfiguration) DeepCopy ¶
func (in *ControllerManagerWebhookConfiguration) DeepCopy() *ControllerManagerWebhookConfiguration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerManagerWebhookConfiguration.
func (*ControllerManagerWebhookConfiguration) DeepCopyInto ¶
func (in *ControllerManagerWebhookConfiguration) DeepCopyInto(out *ControllerManagerWebhookConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Duration ¶
Duration is a wrapper around time.Duration which supports correct marshaling to YAML. In particular, it marshals into strings, which can be used as map keys in json.
func (*Duration) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Duration.
func (*Duration) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Duration) UnmarshalYAML ¶
UnmarshalYAML implements the yaml.Unmarshaller interface.
type HostCluster ¶
type HostCluster struct {
// ClusterCredentials define the credentials to the host cluster
Credentials ClusterCredentials `json:"credentials"`
// Namespace is the namespace where the pod resides in
// This field should not be set if TemporaryNamespace is set to true but must be set in case TemporaryNamespace is set to false.
// +optional
Namespace *string `json:"namespace,omitempty"`
// TemporaryNamespace is a flag to indicate if the namespace should be ephemeral. If true, the namespace will be created and when the terminal is deleted, the namespace is also deleted.
// If true, the mutating webhook makes sure that a temporary namespace is set; in this case you cannot choose the namespace
// This field should be false if Namespace is set. You cannot define the name of the temporary namespace.
// +optional
TemporaryNamespace bool `json:"temporaryNamespace,omitempty"`
Pod Pod `json:"pod"`
}
Host defines the desired state of the resources related to the host cluster
func (*HostCluster) DeepCopy ¶
func (in *HostCluster) DeepCopy() *HostCluster
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostCluster.
func (*HostCluster) DeepCopyInto ¶
func (in *HostCluster) DeepCopyInto(out *HostCluster)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LastError ¶
type LastError struct {
// A human readable message indicating details about the last error.
Description string `json:"description"`
// Well-defined error codes of the last error(s).
// +optional
Codes []ErrorCode `json:"codes,omitempty"`
}
LastError indicates the last occurred error for an operation on a resource.
func (*LastError) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LastError.
func (*LastError) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Pod ¶
type Pod struct {
// Map of string keys and values that can be used to organize and categorize
// (scope and select) objects. Will be set as labels of the pod
// +optional
Labels map[string]string `json:"labels,omitempty"`
// Container belonging to the pod.
// Cannot be updated.
// +optional if ContainerImage is set
Container *Container `json:"container,omitempty"`
// ContainerImage defines the image used for the container.
// ContainerImage is ignored if Container is set.
// +optional
// Deprecated: Use `Container.Image` instead.
ContainerImage string `json:"containerImage,omitempty"`
// Run container in privileged mode.
// Privileged is ignored if Container is set.
// Processes in privileged containers are essentially equivalent to root on the host.
// Defaults to false.
// +optional
// Deprecated: Use `Container.Privileged` instead.
Privileged bool `json:"privileged,omitempty"`
// Host networking requested for this pod. Use the host's network namespace.
// Default to false.
// +optional
HostNetwork bool `json:"hostNetwork,omitempty"`
// Use the host's pid namespace.
// Default to false.
// +optional
HostPID bool `json:"hostPID,omitempty"`
// NodeSelector is a selector which must be true for the pod to fit on a node.
// Selector which must match a node's labels for the pod to be scheduled on that node.
// +optional
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
}
Pod defines the desired state of the pod
func (*Pod) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Pod.
func (*Pod) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TargetCluster ¶
type TargetCluster struct {
// ClusterCredentials define the credentials to the target cluster
Credentials ClusterCredentials `json:"credentials"`
// Namespace is a reference to the namespace within the target cluster in which the resources should be placed.
// This field should not be set if TemporaryNamespace is set to true
// +optional
Namespace *string `json:"namespace,omitempty"`
// TemporaryNamespace is a flag to indicate if the namespace should be ephemeral. If true, the namespace will be created and when the terminal is deleted, the namespace is also deleted.
// If true, the mutating webhook makes sure that a temporary namespace is set; in this case you cannot choose the namespace
// This field should be false if Namespace is set. You cannot define the name of the temporary namespace.
// +optional
TemporaryNamespace bool `json:"temporaryNamespace,omitempty"`
// KubeconfigContextNamespace is a reference to the namespace within the host cluster that should be used as default in the kubeconfig context
KubeconfigContextNamespace string `json:"kubeconfigContextNamespace"`
// APIServerServiceRef is a reference to the kube-apiserver service on the host cluster that points to the kube-apiserver of the target cluster. If no namespace is set on the object reference, it is defaulted to Spec.Host.Namespace.
// +optional
APIServerServiceRef *corev1.ObjectReference `json:"apiServerServiceRef,omitempty"`
// RoleName is the name of the ClusterRole the "access" service account is bound to.
RoleName string `json:"roleName"`
// BindingKind defines the desired role binding. ClusterRoleBinding will result in a ClusterRoleBinding. RoleBinding will result in a RoleBinding.
BindingKind BindingKind `json:"bindingKind"`
}
TargetCluster defines the desired state of the resources related to the target cluster
func (*TargetCluster) DeepCopy ¶
func (in *TargetCluster) DeepCopy() *TargetCluster
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetCluster.
func (*TargetCluster) DeepCopyInto ¶
func (in *TargetCluster) DeepCopyInto(out *TargetCluster)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Terminal ¶
type Terminal struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec TerminalSpec `json:"spec,omitempty"`
Status TerminalStatus `json:"status,omitempty"`
}
Terminal is the Schema for the terminals API
func (*Terminal) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Terminal.
func (*Terminal) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Terminal) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TerminalControllerConfiguration ¶
type TerminalControllerConfiguration struct {
// MaxConcurrentReconciles is the maximum number of concurrent Reconciles which can be run. Defaults to 15.
MaxConcurrentReconciles int `yaml:"maxConcurrentReconciles"`
// MaxConcurrentReconciles is the maximum number of concurrent Reconciles which can be run per Namespace (independent of the user who created the Terminal resource). Defaults to 3.
MaxConcurrentReconcilesPerNamespace int `yaml:"maxConcurrentReconcilesPerNamespace"`
}
TerminalControllerConfiguration defines the configuration of the Terminal controller.
func (*TerminalControllerConfiguration) DeepCopy ¶
func (in *TerminalControllerConfiguration) DeepCopy() *TerminalControllerConfiguration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TerminalControllerConfiguration.
func (*TerminalControllerConfiguration) DeepCopyInto ¶
func (in *TerminalControllerConfiguration) DeepCopyInto(out *TerminalControllerConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TerminalHeartbeatControllerConfiguration ¶
type TerminalHeartbeatControllerConfiguration struct {
// MaxConcurrentReconciles is the maximum number of concurrent Reconciles which can be run. Defaults to 1.
MaxConcurrentReconciles int `yaml:"maxConcurrentReconciles"`
// TimeToLive is the duration a Terminal resource can live without receiving a heartbeat with the "dashboard.gardener.cloud/operation=keepalive" annotation. Defaults to 5m.
TimeToLive Duration `yaml:"timeToLive"`
}
TerminalHeartbeatControllerConfiguration defines the configuration of the TerminalHeartbeat controller.
func (*TerminalHeartbeatControllerConfiguration) DeepCopy ¶
func (in *TerminalHeartbeatControllerConfiguration) DeepCopy() *TerminalHeartbeatControllerConfiguration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TerminalHeartbeatControllerConfiguration.
func (*TerminalHeartbeatControllerConfiguration) DeepCopyInto ¶
func (in *TerminalHeartbeatControllerConfiguration) DeepCopyInto(out *TerminalHeartbeatControllerConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TerminalList ¶
type TerminalList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Terminal `json:"items"`
}
TerminalList contains a list of Terminal
func (*TerminalList) DeepCopy ¶
func (in *TerminalList) DeepCopy() *TerminalList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TerminalList.
func (*TerminalList) DeepCopyInto ¶
func (in *TerminalList) DeepCopyInto(out *TerminalList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TerminalList) DeepCopyObject ¶
func (in *TerminalList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TerminalSpec ¶
type TerminalSpec struct {
Identifier string `json:"identifier"`
Host HostCluster `json:"host"`
Target TargetCluster `json:"target"`
}
TerminalSpec defines the desired state of Terminal
func (*TerminalSpec) DeepCopy ¶
func (in *TerminalSpec) DeepCopy() *TerminalSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TerminalSpec.
func (*TerminalSpec) DeepCopyInto ¶
func (in *TerminalSpec) DeepCopyInto(out *TerminalSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TerminalStatus ¶
type TerminalStatus struct {
// AttachServiceAccountName is the name of service account on the host cluster
AttachServiceAccountName string `json:"attachServiceAccountName"`
// PodName is the name of the pod on the host cluster
PodName string `json:"podName"`
}
TerminalStatus defines the observed state of Terminal
func (*TerminalStatus) DeepCopy ¶
func (in *TerminalStatus) DeepCopy() *TerminalStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TerminalStatus.
func (*TerminalStatus) DeepCopyInto ¶
func (in *TerminalStatus) DeepCopyInto(out *TerminalStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TerminalValidatingWebhookConfiguration ¶
type TerminalValidatingWebhookConfiguration struct {
// MaxObjectSize is the maximum size of a terminal resource in bytes. Defaults to 10240.
MaxObjectSize int `yaml:"maxObjectSize"`
}
TerminalValidatingWebhookConfiguration defines the configuration of the validating webhook.
func (*TerminalValidatingWebhookConfiguration) DeepCopy ¶
func (in *TerminalValidatingWebhookConfiguration) DeepCopy() *TerminalValidatingWebhookConfiguration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TerminalValidatingWebhookConfiguration.
func (*TerminalValidatingWebhookConfiguration) DeepCopyInto ¶
func (in *TerminalValidatingWebhookConfiguration) DeepCopyInto(out *TerminalValidatingWebhookConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.