Documentation ¶
Index ¶
- Constants
- Variables
- func Kind(kind string) schema.GroupKind
- func Resource(resource string) schema.GroupResource
- type Ordinals
- type QuarksStatefulSet
- func (in *QuarksStatefulSet) DeepCopy() *QuarksStatefulSet
- func (in *QuarksStatefulSet) DeepCopyInto(out *QuarksStatefulSet)
- func (in *QuarksStatefulSet) DeepCopyObject() runtime.Object
- func (q *QuarksStatefulSet) GetMaxAvailableVersion(versions map[int]bool) int
- func (q *QuarksStatefulSet) GetNamespacedName() string
- func (q *QuarksStatefulSet) GetRevisions() Revisions
- func (q *QuarksStatefulSet) SetRevisions(revisions Revisions) error
- type QuarksStatefulSetList
- type QuarksStatefulSetSpec
- type QuarksStatefulSetStatus
- type Revisions
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", XPreserveUnknownFields: pointers.Bool(true), }, "updateOnConfigChange": { Type: "boolean", Description: "Indicate whether to update Pods in the StatefulSet when an env value or mount changes", }, "activePassiveProbes": { Type: "object", Description: "Defines probes to determine active/passive component instances", XPreserveUnknownFields: pointers.Bool(true), }, "injectReplicasEnv": { Type: "boolean", Description: "Determines if the REPLICAS env var is injected into pod containers.", }, "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", }, }, "status": { Type: "object", Properties: map[string]extv1.JSONSchemaProps{ "lastReconcile": { Type: "string", }, "ready": { Type: "boolean", }, }, }, }, }, } // QuarksStatefulSetAdditionalPrinterColumns are used by `kubectl get` QuarksStatefulSetAdditionalPrinterColumns = []extv1.CustomResourceColumnDefinition{ { Name: "ready", Type: "boolean", Description: "", JSONPath: ".status.ready", }, } // 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) // AnnotationRevisions contains the history of revisions and pod ordinals and their startup ordinals AnnotationRevisions = fmt.Sprintf("%s/ordinal-revisions", 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) // LabelStartupOrdinal is the index of a pod in startup order LabelStartupOrdinal = fmt.Sprintf("%s/startup-ordinal", apis.GroupName) // LabelQStsName is the name of the QuarksStatefulSet owns this resource LabelQStsName = fmt.Sprintf("%s/quarks-statefulset-name", apis.GroupName) // LabelStsName is the name of the QuarksStatefulSet owns this resource LabelStsName = fmt.Sprintf("%s/statefulset-name", apis.GroupName) // LabelActivePod is the active pod on an active/passive setup LabelActivePod = fmt.Sprintf("%s/pod-active", apis.GroupName) )
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type Ordinals ¶ added in v0.0.3
Ordinals maps assigned pod ordinals to their corresponding startup ordinals
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
func (*QuarksStatefulSet) GetNamespacedName ¶
func (q *QuarksStatefulSet) GetNamespacedName() string
GetNamespacedName returns the resource name with its namespace
func (*QuarksStatefulSet) GetRevisions ¶ added in v0.0.3
func (q *QuarksStatefulSet) GetRevisions() Revisions
GetRevisions returns the controller-revision-hash lookup table for pod ordinal to startup ordinal assignments returns empty struct if annotation couldn't be parse, since we can't distinguish between 'new' and 'corrupted'
func (*QuarksStatefulSet) SetRevisions ¶ added in v0.0.3
func (q *QuarksStatefulSet) SetRevisions(revisions Revisions) error
SetRevisions sets the revisions annotation
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 ActivePassiveProbes map[string]corev1.Probe `json:"activePassiveProbes,omitempty"` // Determines whether the REPLICAS env var should be injected into pod containers // By default, true. InjectReplicasEnv *bool `json:"injectReplicasEnv,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"` // Ready determines whether the QuarksStatefulSet is ready for serve Ready bool `json:"ready"` }
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.