Documentation ¶
Index ¶
Constants ¶
const ( // QuarksStatefulSetResourceKind is the kind name of QuarksStatefulSet QuarksStatefulSetResourceKind = "QuarksStatefulSet" // QuarksStatefulSetResourcePlural is the plural name of QuarksStatefulSet QuarksStatefulSetResourcePlural = "quarksstatefulsets" )
const DefaultZoneNodeLabel = "failure-domain.beta.kubernetes.io/zone"
DefaultZoneNodeLabel is the default node label for available zones
Variables ¶
var ( // AddToScheme is used for schema registrations in the controller package // and also in the generated kube code AddToScheme = schemeBuilder.AddToScheme // QuarksStatefulSetResourceShortNames is the short names of QuarksStatefulSet QuarksStatefulSetResourceShortNames = []string{"qsts"} // QuarksStatefulSetValidation is the validation method for QuarksStatefulSet QuarksStatefulSetValidation = extv1.CustomResourceValidation{ OpenAPIV3Schema: &extv1.JSONSchemaProps{ Type: "object", Properties: map[string]extv1.JSONSchemaProps{ "spec": { Type: "object", Properties: map[string]extv1.JSONSchemaProps{ "template": { Type: "object", Description: "A template for a regular StatefulSet", }, "updateOnConfigChange": { Type: "boolean", Description: "Indicate whether to update Pods in the StatefulSet when an env value or mount changes", }, "activePassiveProbe": { Type: "object", Description: "Defines a probe to determine an active/passive component instance", }, "zoneNodeLabel": { Type: "string", Description: "Indicates the node label that a node locates", }, "zones": { Type: "array", Description: "Indicates the availability zones that the QuarksStatefulSet needs to span", Items: &extv1.JSONSchemaPropsOrArray{ Schema: &extv1.JSONSchemaProps{ Type: "string", }, }, }, }, Required: []string{ "template", }, }, }, }, } // QuarksStatefulSetResourceName is the resource name of QuarksStatefulSet QuarksStatefulSetResourceName = fmt.Sprintf("%s.%s", QuarksStatefulSetResourcePlural, apis.GroupName) // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: apis.GroupName, Version: "v1alpha1"} )
var ( // AnnotationVersion is the annotation key for the StatefulSet version AnnotationVersion = fmt.Sprintf("%s/version", apis.GroupName) // AnnotationZones is an array of all zones AnnotationZones = fmt.Sprintf("%s/zones", apis.GroupName) // LabelAZIndex is the index of available zone LabelAZIndex = fmt.Sprintf("%s/az-index", apis.GroupName) // LabelAZName is the name of available zone LabelAZName = fmt.Sprintf("%s/az-name", apis.GroupName) // LabelPodOrdinal is the index of pod ordinal LabelPodOrdinal = fmt.Sprintf("%s/pod-ordinal", apis.GroupName) // LabelQStsName is the name of the QuarksStatefulSet owns this resource LabelQStsName = fmt.Sprintf("%s/quarks-statefulset-name", apis.GroupName) // LabelActiveContainer is the active container on an active/passive setup LabelActiveContainer = fmt.Sprintf("%s/pod-active", apis.GroupName) )
Functions ¶
func Kind ¶
Kind takes an unqualified kind and returns back a Group qualified GroupKind
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type QuarksStatefulSet ¶
type QuarksStatefulSet struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec QuarksStatefulSetSpec `json:"spec,omitempty"` Status QuarksStatefulSetStatus `json:"status,omitempty"` }
QuarksStatefulSet is the Schema for the QuarksStatefulSet API +k8s:openapi-gen=true
func (*QuarksStatefulSet) DeepCopy ¶
func (in *QuarksStatefulSet) DeepCopy() *QuarksStatefulSet
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QuarksStatefulSet.
func (*QuarksStatefulSet) DeepCopyInto ¶
func (in *QuarksStatefulSet) DeepCopyInto(out *QuarksStatefulSet)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*QuarksStatefulSet) DeepCopyObject ¶
func (in *QuarksStatefulSet) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*QuarksStatefulSet) GetMaxAvailableVersion ¶
func (q *QuarksStatefulSet) GetMaxAvailableVersion(versions map[int]bool) int
GetMaxAvailableVersion gets the greatest available version owned by the QuarksStatefulSet
type QuarksStatefulSetList ¶
type QuarksStatefulSetList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []QuarksStatefulSet `json:"items"` }
QuarksStatefulSetList contains a list of QuarksStatefulSet
func (*QuarksStatefulSetList) DeepCopy ¶
func (in *QuarksStatefulSetList) DeepCopy() *QuarksStatefulSetList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QuarksStatefulSetList.
func (*QuarksStatefulSetList) DeepCopyInto ¶
func (in *QuarksStatefulSetList) DeepCopyInto(out *QuarksStatefulSetList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*QuarksStatefulSetList) DeepCopyObject ¶
func (in *QuarksStatefulSetList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type QuarksStatefulSetSpec ¶
type QuarksStatefulSetSpec struct { // Indicates whether to update Pods in the StatefulSet when an env value or mount changes UpdateOnConfigChange bool `json:"updateOnConfigChange"` // Indicates the node label that a node locates ZoneNodeLabel string `json:"zoneNodeLabel,omitempty"` // Indicates the availability zones that the QuarksStatefulSet needs to span Zones []string `json:"zones,omitempty"` // Defines a regular StatefulSet template Template appsv1.StatefulSet `json:"template"` // Periodic probe for active/passive containers // Only an active container will process request from a service ActivePassiveProbe map[string]*corev1.Probe `json:"activePassiveProbe,omitempty"` }
QuarksStatefulSetSpec defines the desired state of QuarksStatefulSet
func (*QuarksStatefulSetSpec) DeepCopy ¶
func (in *QuarksStatefulSetSpec) DeepCopy() *QuarksStatefulSetSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QuarksStatefulSetSpec.
func (*QuarksStatefulSetSpec) DeepCopyInto ¶
func (in *QuarksStatefulSetSpec) DeepCopyInto(out *QuarksStatefulSetSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type QuarksStatefulSetStatus ¶
type QuarksStatefulSetStatus struct { // Timestamp for the last reconcile LastReconcile *metav1.Time `json:"lastReconcile"` }
QuarksStatefulSetStatus defines the observed state of QuarksStatefulSet
func (*QuarksStatefulSetStatus) DeepCopy ¶
func (in *QuarksStatefulSetStatus) DeepCopy() *QuarksStatefulSetStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QuarksStatefulSetStatus.
func (*QuarksStatefulSetStatus) DeepCopyInto ¶
func (in *QuarksStatefulSetStatus) DeepCopyInto(out *QuarksStatefulSetStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.