Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the etcd.aenix.io v1alpha1 API group +kubebuilder:object:generate=true +groupName=etcd.aenix.io
Index ¶
- Constants
- Variables
- type EmbeddedObjectMetadata
- type EmbeddedPersistentVolumeClaim
- type EtcdCluster
- func (in *EtcdCluster) DeepCopy() *EtcdCluster
- func (in *EtcdCluster) DeepCopyInto(out *EtcdCluster)
- func (in *EtcdCluster) DeepCopyObject() runtime.Object
- func (r *EtcdCluster) Default()
- func (r *EtcdCluster) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (r *EtcdCluster) ValidateCreate() (admission.Warnings, error)
- func (r *EtcdCluster) ValidateDelete() (admission.Warnings, error)
- func (r *EtcdCluster) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
- type EtcdClusterList
- type EtcdClusterSpec
- type EtcdClusterStatus
- type EtcdCondMessage
- type EtcdCondType
- type PodSpec
- type StorageSpec
Constants ¶
const ( EtcdConditionInitialized = "Initialized" EtcdConditionReady = "Ready" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "etcd.aenix.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 EmbeddedObjectMetadata ¶ added in v0.0.2
type EmbeddedObjectMetadata struct { // Name must be unique within a namespace. Is required when creating resources, although // some resources may allow a client to request the generation of an appropriate name // automatically. Name is primarily intended for creation idempotence and configuration // definition. // Cannot be updated. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names // +optional Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` // Labels Map of string keys and values that can be used to organize and categorize // (scope and select) objects. May match selectors of replication controllers // and services. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels // +optional Labels map[string]string `json:"labels,omitempty" protobuf:"bytes,11,rep,name=labels"` // Annotations is an unstructured key value map stored with a resource that may be // set by external tools to store and retrieve arbitrary metadata. They are not // queryable and should be preserved when modifying objects. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations // +optional Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,12,rep,name=annotations"` }
EmbeddedObjectMetadata contains a subset of the fields included in k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta Only fields which are relevant to embedded resources are included.
func (*EmbeddedObjectMetadata) DeepCopy ¶ added in v0.0.2
func (in *EmbeddedObjectMetadata) DeepCopy() *EmbeddedObjectMetadata
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EmbeddedObjectMetadata.
func (*EmbeddedObjectMetadata) DeepCopyInto ¶ added in v0.0.2
func (in *EmbeddedObjectMetadata) DeepCopyInto(out *EmbeddedObjectMetadata)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EmbeddedPersistentVolumeClaim ¶ added in v0.0.2
type EmbeddedPersistentVolumeClaim struct { metav1.TypeMeta `json:",inline"` // EmbeddedMetadata contains metadata relevant to an EmbeddedResource. // +optional EmbeddedObjectMetadata `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines the desired characteristics of a volume requested by a pod author. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims // +optional Spec corev1.PersistentVolumeClaimSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` // Status represents the current information/status of a persistent volume claim. // Read-only. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims // +optional Status corev1.PersistentVolumeClaimStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` }
EmbeddedPersistentVolumeClaim is an embedded version of k8s.io/api/core/v1.PersistentVolumeClaim. It contains TypeMeta and a reduced ObjectMeta.
func (*EmbeddedPersistentVolumeClaim) DeepCopy ¶ added in v0.0.2
func (in *EmbeddedPersistentVolumeClaim) DeepCopy() *EmbeddedPersistentVolumeClaim
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EmbeddedPersistentVolumeClaim.
func (*EmbeddedPersistentVolumeClaim) DeepCopyInto ¶ added in v0.0.2
func (in *EmbeddedPersistentVolumeClaim) DeepCopyInto(out *EmbeddedPersistentVolumeClaim)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EtcdCluster ¶
type EtcdCluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec EtcdClusterSpec `json:"spec,omitempty"` Status EtcdClusterStatus `json:"status,omitempty"` }
EtcdCluster is the Schema for the etcdclusters API
func (*EtcdCluster) DeepCopy ¶
func (in *EtcdCluster) DeepCopy() *EtcdCluster
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdCluster.
func (*EtcdCluster) DeepCopyInto ¶
func (in *EtcdCluster) DeepCopyInto(out *EtcdCluster)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*EtcdCluster) DeepCopyObject ¶
func (in *EtcdCluster) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*EtcdCluster) Default ¶
func (r *EtcdCluster) Default()
Default implements webhook.Defaulter so a webhook will be registered for the type
func (*EtcdCluster) SetupWebhookWithManager ¶
func (r *EtcdCluster) SetupWebhookWithManager(mgr ctrl.Manager) error
SetupWebhookWithManager will setup the manager to manage the webhooks
func (*EtcdCluster) ValidateCreate ¶
func (r *EtcdCluster) ValidateCreate() (admission.Warnings, error)
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*EtcdCluster) ValidateDelete ¶
func (r *EtcdCluster) ValidateDelete() (admission.Warnings, error)
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (*EtcdCluster) ValidateUpdate ¶
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
type EtcdClusterList ¶
type EtcdClusterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []EtcdCluster `json:"items"` }
EtcdClusterList contains a list of EtcdCluster
func (*EtcdClusterList) DeepCopy ¶
func (in *EtcdClusterList) DeepCopy() *EtcdClusterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdClusterList.
func (*EtcdClusterList) DeepCopyInto ¶
func (in *EtcdClusterList) DeepCopyInto(out *EtcdClusterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*EtcdClusterList) DeepCopyObject ¶
func (in *EtcdClusterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type EtcdClusterSpec ¶
type EtcdClusterSpec struct { // Replicas is the count of etcd instances in cluster. // +optional // +kubebuilder:default:=3 // +kubebuilder:validation:Minimum:=0 Replicas *int32 `json:"replicas,omitempty"` // PodSpec defines the desired state of PodSpec for etcd members. If not specified, default values will be used. PodSpec PodSpec `json:"podSpec,omitempty"` Storage StorageSpec `json:"storage"` }
EtcdClusterSpec defines the desired state of EtcdCluster
func (*EtcdClusterSpec) DeepCopy ¶
func (in *EtcdClusterSpec) DeepCopy() *EtcdClusterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdClusterSpec.
func (*EtcdClusterSpec) DeepCopyInto ¶
func (in *EtcdClusterSpec) DeepCopyInto(out *EtcdClusterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EtcdClusterStatus ¶
EtcdClusterStatus defines the observed state of EtcdCluster
func (*EtcdClusterStatus) DeepCopy ¶
func (in *EtcdClusterStatus) DeepCopy() *EtcdClusterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdClusterStatus.
func (*EtcdClusterStatus) DeepCopyInto ¶
func (in *EtcdClusterStatus) DeepCopyInto(out *EtcdClusterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EtcdCondMessage ¶ added in v0.0.2
type EtcdCondMessage string
const ( EtcdInitCondNegMessage EtcdCondMessage = "Cluster initialization started" EtcdInitCondPosMessage EtcdCondMessage = "Cluster managed resources created" EtcdReadyCondNegMessage EtcdCondMessage = "Cluster StatefulSet is not Ready" EtcdReadyCondPosMessage EtcdCondMessage = "Cluster StatefulSet is Ready" EtcdReadyCondNegWaitingForQuorum EtcdCondMessage = "Waiting for first quorum to be established" )
type EtcdCondType ¶ added in v0.0.1
type EtcdCondType string
const ( EtcdCondTypeInitStarted EtcdCondType = "InitializationStarted" EtcdCondTypeInitComplete EtcdCondType = "InitializationComplete" EtcdCondTypeWaitingForFirstQuorum EtcdCondType = "WaitingForFirstQuorum" EtcdCondTypeStatefulSetReady EtcdCondType = "StatefulSetReady" EtcdCondTypeStatefulSetNotReady EtcdCondType = "StatefulSetNotReady" )
type PodSpec ¶ added in v0.0.2
type PodSpec struct { // Image is the etcd container image name // +optional Image string `json:"image,omitempty"` // ImagePullPolicy describes a policy for if/when to pull a container image // +kubebuilder:default:=IfNotPresent // +optional ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"` // ImagePullSecrets An optional list of references to secrets in the same namespace // to use for pulling images from registries // see https://kubernetes.io/docs/concepts/containers/images/#referring-to-an-imagepullsecrets-on-a-pod // +optional ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"` // PodMetadata contains metadata relevant to a PodSpec. // +optional PodMetadata *EmbeddedObjectMetadata `json:"metadata,omitempty"` // Resources describes the compute resource requirements. // +optional Resources corev1.ResourceRequirements `json:"resources,omitempty"` // Affinity sets the scheduling constraints for the pod. // +optional Affinity *corev1.Affinity `json:"affinity,omitempty"` // NodeSelector is a selector which must be true for the pod to fit on a node. // +optional NodeSelector map[string]string `json:"nodeSelector,omitempty"` // TopologySpreadConstraints describes how a group of pods ought to spread across topology domains. // +optional TopologySpreadConstraints []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` // Tolerations is a list of tolerations. // +optional Tolerations []corev1.Toleration `json:"tolerations,omitempty"` // SecurityContext holds pod-level security attributes and common container settings. // +optional SecurityContext *corev1.PodSecurityContext `json:"securityContext,omitempty"` // PriorityClassName is the name of the PriorityClass for this pod. // +optional PriorityClassName string `json:"priorityClassName,omitempty"` // TerminationGracePeriodSeconds is the time to wait before forceful pod shutdown. // +optional TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"` // SchedulerName is the name of the scheduler to be used for scheduling the pod. // +optional SchedulerName string `json:"schedulerName,omitempty"` // RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used to run this pod. // +optional RuntimeClassName *string `json:"runtimeClassName,omitempty"` // ExtraArgs are the extra arguments to pass to the etcd container. // +optional ExtraArgs map[string]string `json:"extraArgs,omitempty"` // ExtraEnv are the extra environment variables to pass to the etcd container. // +optional ExtraEnv []corev1.EnvVar `json:"extraEnv,omitempty"` }
PodSpec defines the desired state of PodSpec for etcd members. +k8s:openapi-gen=true
func (*PodSpec) DeepCopy ¶ added in v0.0.2
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSpec.
func (*PodSpec) DeepCopyInto ¶ added in v0.0.2
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StorageSpec ¶ added in v0.0.2
type StorageSpec struct { // EmptyDirVolumeSource to be used by the StatefulSets. If specified, used in place of any volumeClaimTemplate. More // info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir // +optional EmptyDir *corev1.EmptyDirVolumeSource `json:"emptyDir,omitempty"` // A PVC spec to be used by the StatefulSets. // +optional VolumeClaimTemplate EmbeddedPersistentVolumeClaim `json:"volumeClaimTemplate,omitempty"` }
StorageSpec defines the configured storage for a etcd members. If neither `emptyDir` nor `volumeClaimTemplate` is specified, then by default an [EmptyDir](https://kubernetes.io/docs/concepts/storage/volumes/#emptydir) will be used. +k8s:openapi-gen=true
func (*StorageSpec) DeepCopy ¶ added in v0.0.2
func (in *StorageSpec) DeepCopy() *StorageSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageSpec.
func (*StorageSpec) DeepCopyInto ¶ added in v0.0.2
func (in *StorageSpec) DeepCopyInto(out *StorageSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.