Documentation
¶
Overview ¶
Package v1alpha1 implements the v1alpha1 apiVersion of ctlptl's cluster configuration
Borrows the approach of clientcmd/api and KIND, maintaining an API similar to other Kubernetes APIs without pulling in the API machinery.
+k8s:deepcopy-gen=package
Index ¶
- type Cluster
- func (in *Cluster) DeepCopy() *Cluster
- func (in *Cluster) DeepCopyInto(out *Cluster)
- func (in *Cluster) DeepCopyObject() runtime.Object
- func (c *Cluster) GetName() string
- func (obj *Cluster) GetObjectKind() schema.ObjectKind
- func (obj *Cluster) GroupVersionKind() schema.GroupVersionKind
- func (obj *Cluster) SetGroupVersionKind(gvk schema.GroupVersionKind)
- type ClusterList
- func (in *ClusterList) DeepCopy() *ClusterList
- func (in *ClusterList) DeepCopyInto(out *ClusterList)
- func (in *ClusterList) DeepCopyObject() runtime.Object
- func (obj *ClusterList) GetObjectKind() schema.ObjectKind
- func (obj *ClusterList) GroupVersionKind() schema.GroupVersionKind
- func (obj *ClusterList) SetGroupVersionKind(gvk schema.GroupVersionKind)
- type ClusterStatus
- type Registry
- func (in *Registry) DeepCopy() *Registry
- func (in *Registry) DeepCopyInto(out *Registry)
- func (in *Registry) DeepCopyObject() runtime.Object
- func (r *Registry) GetName() string
- func (obj *Registry) GetObjectKind() schema.ObjectKind
- func (obj *Registry) GroupVersionKind() schema.GroupVersionKind
- func (obj *Registry) SetGroupVersionKind(gvk schema.GroupVersionKind)
- type RegistryList
- func (in *RegistryList) DeepCopy() *RegistryList
- func (in *RegistryList) DeepCopyInto(out *RegistryList)
- func (in *RegistryList) DeepCopyObject() runtime.Object
- func (obj *RegistryList) GetObjectKind() schema.ObjectKind
- func (obj *RegistryList) GroupVersionKind() schema.GroupVersionKind
- func (obj *RegistryList) SetGroupVersionKind(gvk schema.GroupVersionKind)
- type RegistryStatus
- type TypeMeta
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct {
TypeMeta `yaml:",inline"`
// The cluster name. Pulled from .kube/config.
Name string `json:"name,omitempty" yaml:"name,omitempty"`
// The name of the tool used to create this cluster.
Product string `json:"product,omitempty" yaml:"product,omitempty"`
// Make sure that the cluster has access to at least this many
// CPUs. This is mostly helpful for ensuring that your Docker Desktop
// VM has enough CPU. If ctlptl can't guarantee this many
// CPU, it will return an error.
MinCPUs int `json:"minCPUs,omitempty" yaml:"minCPUs,omitempty"`
// The name of a registry.
//
// If the registry doesn't exist, ctlptl will create one with this name.
//
// The registry can be configured by creating a `kind: Registry` config file.
//
// Not supported on all cluster products.
Registry string `json:"registry,omitempty" yaml:"registry,omitempty"`
// The desired version of Kubernetes to run.
//
// Examples:
// v1.19.1
// v1.14.0
// Must start with 'v' and contain a major, minor, and patch version.
//
// Not all cluster products allow you to customize this.
KubernetesVersion string `json:"kubernetesVersion,omitempty" yaml:"kubernetesVersion,omitempty"`
// The Kind cluster config. Only applicable for clusters with product: kind.
//
// Full documentation at:
// https://pkg.go.dev/sigs.k8s.io/kind/pkg/apis/config/v1alpha4#Cluster
//
// Properties of this config may be overridden by properties of the ctlptl
// Cluster config. For example, the name field of the top-level Cluster object
// wins over one specified in the Kind config.
KindV1Alpha4Cluster *v1alpha4.Cluster `json:"kindV1Alpha4Cluster,omitempty" yaml:"kindV1Alpha4Cluster,omitempty"`
// Most recently observed status of the cluster.
// Populated by the system.
// Read-only.
Status ClusterStatus `json:"status,omitempty" yaml:"status,omitempty"`
}
Cluster contains cluster configuration. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*Cluster) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster.
func (*Cluster) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Cluster) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Cluster) GetObjectKind ¶
func (obj *Cluster) GetObjectKind() schema.ObjectKind
func (*Cluster) GroupVersionKind ¶
func (obj *Cluster) GroupVersionKind() schema.GroupVersionKind
func (*Cluster) SetGroupVersionKind ¶
func (obj *Cluster) SetGroupVersionKind(gvk schema.GroupVersionKind)
type ClusterList ¶
type ClusterList struct {
TypeMeta `json:",inline"`
// List of clusters.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md
Items []Cluster `json:"items" protobuf:"bytes,2,rep,name=items"`
}
ClusterList is a list of Clusters. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*ClusterList) DeepCopy ¶
func (in *ClusterList) DeepCopy() *ClusterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterList.
func (*ClusterList) DeepCopyInto ¶
func (in *ClusterList) DeepCopyInto(out *ClusterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterList) DeepCopyObject ¶
func (in *ClusterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ClusterList) GetObjectKind ¶
func (obj *ClusterList) GetObjectKind() schema.ObjectKind
func (*ClusterList) GroupVersionKind ¶
func (obj *ClusterList) GroupVersionKind() schema.GroupVersionKind
func (*ClusterList) SetGroupVersionKind ¶
func (obj *ClusterList) SetGroupVersionKind(gvk schema.GroupVersionKind)
type ClusterStatus ¶
type ClusterStatus struct {
// When the cluster was first created.
CreationTimestamp metav1.Time `json:"creationTimestamp,omitempty" yaml:"creationTimestamp,omitempty"`
// Local registry status documented on the cluster itself.
LocalRegistryHosting *localregistry.LocalRegistryHostingV1 `json:"localRegistryHosting,omitempty" yaml:"localRegistryHosting,omitempty"`
// The number of CPU. Only applicable to local clusters.
CPUs int `json:"cpus,omitempty" yaml:"cpus,omitempty"`
// Whether this is the current cluster in `kubectl`
Current bool `json:"current,omitempty" yaml:"current,omitempty"`
// The version of Kubernetes currently running.
//
// Reported by the Kubernetes API. May contain a build tag.
//
// Examples:
// v1.19.1
// v1.18.10-gke.601
// v1.19.3-34+fa32ff1c160058
KubernetesVersion string `json:"kubernetesVersion,omitempty" yaml:"kubernetesVersion,omitempty"`
}
func (*ClusterStatus) DeepCopy ¶
func (in *ClusterStatus) DeepCopy() *ClusterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterStatus.
func (*ClusterStatus) DeepCopyInto ¶
func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Registry ¶
type Registry struct {
TypeMeta `yaml:",inline"`
// The registry name. Get/set from the Docker container name.
Name string `json:"name,omitempty" yaml:"name,omitempty"`
// The host IPv4 address to bind the container to.
ListenAddress string `json:"listenAddress,omitempty" yaml:"listenAddress,omitempty"`
// The desired host port. Set to 0 to choose a random port.
Port int `json:"port,omitempty" yaml:"port,omitempty"`
// Most recently observed status of the registry.
// Populated by the system.
// Read-only.
Status RegistryStatus `json:"status,omitempty" yaml:"status,omitempty"`
}
Cluster contains registry configuration.
Currently designed for local registries on the host machine, but may eventually expand to support remote registries.
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*Registry) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Registry.
func (*Registry) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Registry) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Registry) GetObjectKind ¶
func (obj *Registry) GetObjectKind() schema.ObjectKind
func (*Registry) GroupVersionKind ¶
func (obj *Registry) GroupVersionKind() schema.GroupVersionKind
func (*Registry) SetGroupVersionKind ¶
func (obj *Registry) SetGroupVersionKind(gvk schema.GroupVersionKind)
type RegistryList ¶
type RegistryList struct {
TypeMeta `json:",inline"`
// List of registrys.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md
Items []Registry `json:"items" protobuf:"bytes,2,rep,name=items"`
}
RegistryList is a list of Registrys. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*RegistryList) DeepCopy ¶
func (in *RegistryList) DeepCopy() *RegistryList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegistryList.
func (*RegistryList) DeepCopyInto ¶
func (in *RegistryList) DeepCopyInto(out *RegistryList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RegistryList) DeepCopyObject ¶
func (in *RegistryList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*RegistryList) GetObjectKind ¶
func (obj *RegistryList) GetObjectKind() schema.ObjectKind
func (*RegistryList) GroupVersionKind ¶
func (obj *RegistryList) GroupVersionKind() schema.GroupVersionKind
func (*RegistryList) SetGroupVersionKind ¶
func (obj *RegistryList) SetGroupVersionKind(gvk schema.GroupVersionKind)
type RegistryStatus ¶
type RegistryStatus struct {
// When the registry was first created.
CreationTimestamp metav1.Time `json:"creationTimestamp,omitempty" yaml:"creationTimestamp,omitempty"`
// The IPv4 address for the bridge network.
IPAddress string `json:"ipAddress,omitempty" yaml:"ipAddress,omitempty"`
// The public IPv4 address that the registry is listening on on the host machine.
ListenAddress string `json:"listenAddress,omitempty" yaml:"listenAddress,omitempty"`
// The public port that the registry is listening on on the host machine.
HostPort int `json:"hostPort,omitempty" yaml:"hostPort,omitempty"`
// The private port that the registry is listening on inside the registry network.
//
// We try to make this not configurable, because there's no real reason not
// to use the default registry port 5000.
ContainerPort int `json:"containerPort,omitempty" yaml:"containerPort,omitempty"`
// Networks that the registry container is connected to.
Networks []string `json:"networks,omitempty" yaml:"networks,omitempty"`
// The ID of the container in Docker.
ContainerID string `json:"containerId,omitempty" yaml:"containerId,omitempty"`
// Current health status of the registry container.
// Reflects underlying ContainerState.Status
// https://github.com/moby/moby/blob/v20.10.3/api/types/types.go#L314
State string
}
func (*RegistryStatus) DeepCopy ¶
func (in *RegistryStatus) DeepCopy() *RegistryStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegistryStatus.
func (*RegistryStatus) DeepCopyInto ¶
func (in *RegistryStatus) DeepCopyInto(out *RegistryStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TypeMeta ¶
type TypeMeta struct {
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
APIVersion string `json:"apiVersion,omitempty" yaml:"apiVersion,omitempty"`
}
TypeMeta partially copies apimachinery/pkg/apis/meta/v1.TypeMeta No need for a direct dependence; the fields are stable.
func (*TypeMeta) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TypeMeta.
func (*TypeMeta) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.