v1alpha1

package
v0.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API. +groupName=operator.m3db.io

Index

Constants

This section is empty.

Variables

View Source
var (
	// SchemeBuilder provides the schemebuilder
	SchemeBuilder runtime.SchemeBuilder

	// AddToScheme will provide the addtoscheme function
	AddToScheme = localSchemeBuilder.AddToScheme
)

localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.

View Source
var SchemeGroupVersion = schema.GroupVersion{Group: m3dboperator.GroupName, Version: m3dboperator.Version}

SchemeGroupVersion is group version used to register these objects

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type AggregatedAttributes added in v0.11.0

type AggregatedAttributes struct {
	// Resolution is the time range to aggregate data across.
	Resolution string `json:"resolution,omitempty"`

	// DownsampleOptions stores options for downsampling data points.
	DownsampleOptions *DownsampleOptions `json:"downsampleOptions,omitempty"`
}

AggregatedAttributes are attributes specifying how data points are aggregated.

func (*AggregatedAttributes) DeepCopy added in v0.11.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AggregatedAttributes.

func (*AggregatedAttributes) DeepCopyInto added in v0.11.0

func (in *AggregatedAttributes) DeepCopyInto(out *AggregatedAttributes)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Aggregation added in v0.11.0

type Aggregation struct {
	// Aggregated indicates whether data points are aggregated or not.
	Aggregated bool `json:"aggregated,omitempty"`

	// Attributes defines how data is aggregated when Aggregated is set to true.
	// This field is ignored when aggregated is false.
	Attributes AggregatedAttributes `json:"attributes,omitempty"`
}

Aggregation describes data points within a namespace.

func (*Aggregation) DeepCopy added in v0.11.0

func (in *Aggregation) DeepCopy() *Aggregation

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Aggregation.

func (*Aggregation) DeepCopyInto added in v0.11.0

func (in *Aggregation) DeepCopyInto(out *Aggregation)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AggregationOptions added in v0.11.0

type AggregationOptions struct {
	// Aggregations are the aggregations for a namespace.
	Aggregations []Aggregation `json:"aggregations,omitempty"`
}

AggregationOptions is a set of options for aggregating data within the namespace.

func (*AggregationOptions) DeepCopy added in v0.11.0

func (in *AggregationOptions) DeepCopy() *AggregationOptions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AggregationOptions.

func (*AggregationOptions) DeepCopyInto added in v0.11.0

func (in *AggregationOptions) DeepCopyInto(out *AggregationOptions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterCondition

type ClusterCondition struct {
	// Type of cluster condition.
	Type ClusterConditionType `json:"type,omitempty"`

	// Status of the condition (True, False, Unknown).
	Status corev1.ConditionStatus `json:"status,omitempty"`

	// Last time this condition was updated.
	LastUpdateTime string `json:"lastUpdateTime,omitempty"`

	// Last time this condition transitioned from one status to another.
	LastTransitionTime string `json:"lastTransitionTime,omitempty"`

	// Reason this condition last changed.
	Reason string `json:"reason,omitempty"`

	// Human-friendly message about this condition.
	Message string `json:"message,omitempty"`
}

ClusterCondition represents various conditions the cluster can be in.

func (*ClusterCondition) DeepCopy

func (in *ClusterCondition) DeepCopy() *ClusterCondition

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterCondition.

func (*ClusterCondition) DeepCopyInto

func (in *ClusterCondition) DeepCopyInto(out *ClusterCondition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterConditionType

type ClusterConditionType string

ClusterConditionType represents the various type of cluster conditions.

const (
	// ClusterConditionPlacementInitialized indicates an initial placement has
	// been created for the cluster.
	ClusterConditionPlacementInitialized ClusterConditionType = "PlacementInitialized"

	// ClusterConditionPodsBootstrapping indicates there are pods bootstrapping.
	ClusterConditionPodsBootstrapping ClusterConditionType = "PodsBootstrapping"
)

type ClusterSpec

type ClusterSpec struct {
	// Image specifies which docker image to use with the cluster
	Image string `json:"image,omitempty"`

	// ReplicationFactor defines how many replicas
	ReplicationFactor int32 `json:"replicationFactor,omitempty"`

	// NumberOfShards defines how many shards in total
	NumberOfShards int32 `json:"numberOfShards,omitempty"`

	// IsolationGroups specifies a map of key-value pairs. Defines which isolation groups
	// to deploy persistent volumes for data nodes
	IsolationGroups []IsolationGroup `json:"isolationGroups,omitempty"`

	// Namespaces specifies the namespaces this cluster will hold.
	Namespaces []Namespace `json:"namespaces,omitempty"`

	// EtcdEndpoints defines the etcd endpoints to use for service discovery. Must
	// be set if no custom configmap is defined. If set, etcd endpoints will be
	// templated in to the default configmap template.
	// +kubebuilder:validation:Optional
	EtcdEndpoints []string `json:"etcdEndpoints,omitempty"`

	// KeepEtcdDataOnDelete determines whether the operator will remove cluster
	// metadata (placement + namespaces) in etcd when the cluster is deleted.
	// Unless true, etcd data will be cleared when the cluster is deleted.
	// +kubebuilder:validation:Optional
	KeepEtcdDataOnDelete bool `json:"keepEtcdDataOnDelete,omitempty"`

	// EnableCarbonIngester enables the listener port for the carbon ingester
	// +kubebuilder:validation:Optional
	EnableCarbonIngester bool `json:"enableCarbonIngester,omitempty"`

	// ConfigMapName specifies the ConfigMap to use for this cluster. If unset a
	// default configmap with template variables for etcd endpoints will be used.
	// See "Configuring M3DB" in the docs for more.
	// +kubebuilder:validation:Optional
	ConfigMapName *string `json:"configMapName,omitempty"`

	// PodIdentityConfig sets the configuration for pod identity. If unset only
	// pod name and UID will be used.
	// +kubebuilder:validation:Optional
	PodIdentityConfig *PodIdentityConfig `json:"podIdentityConfig,omitempty"`

	// Resources defines memory / cpu constraints for each container in the
	// cluster.
	// +kubebuilder:validation:Optional
	ContainerResources corev1.ResourceRequirements `json:"containerResources,omitempty"`

	// DataDirVolumeClaimTemplate is the volume claim template for an M3DB
	// instance's data. It claims PersistentVolumes for cluster storage, volumes
	// are dynamically provisioned by when the StorageClass is defined.
	// +kubebuilder:validation:Optional
	DataDirVolumeClaimTemplate *corev1.PersistentVolumeClaim `json:"dataDirVolumeClaimTemplate,omitempty"`

	// PodSecurityContext allows the user to specify an optional security context
	// for pods.
	PodSecurityContext *corev1.PodSecurityContext `json:"podSecurityContext,omitempty"`

	// SecurityContext allows the user to specify a container-level security
	// context.
	SecurityContext *corev1.SecurityContext `json:"securityContext,omitempty"`

	// ImagePullSecrets will be added to every pod.
	ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`

	// EnvVars defines custom environment variables to be passed to M3DB
	// containers.
	//
	// +kubebuilder:validation:Optional
	EnvVars []corev1.EnvVar `json:"envVars,omitempty"`

	// Labels sets the base labels that will be applied to resources created by
	// the cluster. // TODO(schallert): design doc on labeling scheme.
	Labels map[string]string `json:"labels,omitempty"`

	// Annotations sets the base annotations that will be applied to resources created by
	// the cluster.
	Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations"`

	// Tolerations sets the tolerations that will be applied to all M3DB pods.
	// +kubebuilder:validation:Optional
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`

	// PriorityClassName sets the priority class for all M3DB pods.
	// +kubebuilder:validation:Optional
	PriorityClassName string `json:"priorityClassName,omitempty"`

	// NodeEndpointFormat allows overriding of the endpoint used for a node in the
	// M3DB placement. Defaults to "\{\{ .PodName \}\}.\{\{ .M3DBService \}\}:\{\{ .Port \}\}".
	// Useful if access to the cluster from other namespaces is desired. See "Node
	// Endpoint" docs for full variables available.
	// +kubebuilder:validation:Optional
	NodeEndpointFormat string `json:"nodeEndpointFormat,omitempty"`

	// HostNetwork indicates whether M3DB pods should run in the same network
	// namespace as the node its on. This option should be used sparingly due to
	// security concerns outlined in the linked documentation.
	// https://kubernetes.io/docs/concepts/policy/pod-security-policy/#host-namespaces
	// +kubebuilder:validation:Optional
	HostNetwork bool `json:"hostNetwork,omitEmpty"`

	// DNSPolicy allows the user to set the pod's DNSPolicy. This is often used in
	// conjunction with HostNetwork.
	// +kubebuilder:validation:Optional
	DNSPolicy *corev1.DNSPolicy `json:"dnsPolicy,omitEmpty"`

	// Specify a "controlling" coordinator for the cluster.
	// +kubebuilder:validation:Optional
	ExternalCoordinator *ExternalCoordinatorConfig `json:"externalCoordinator,omitempty"`

	// Custom setup for db nodes can be done via initContainers
	// Provide the complete spec for the initContainer here
	// If any storage volumes are needed in the initContainer see InitVolumes below
	InitContainers []corev1.Container `json:"initContainers,omitempty"`

	// If the InitContainers require any storage volumes
	// Provide the complete specification for the required Volumes here
	InitVolumes []corev1.Volume `json:"initVolumes,omitempty"`

	// PodMetadata is for any Metadata that is unique to the pods, and does
	// not belong on any other objects, such as Prometheus scrape tags
	PodMetadata metav1.ObjectMeta `json:"podMetadata,omitempty"`

	// ParallelPodManagement sets StatefulSets created by the operator to have
	// Parallel pod management instead of OrderedReady. If nil, this will default
	// to true.
	// +kubebuilder:validation:Optional
	ParallelPodManagement *bool `json:"parallelPodManagement,omitEmpty"`

	// To use a non-default service account, specify the name here otherwise the
	// service account "default" will be used. This is useful for advanced
	// use-cases such as pod security policies. The service account must exist.
	// This operator will not create it.
	ServiceAccountName string `json:"serviceAccountName,omitempty"`

	// Frozen is used to stop the operator from taking any further actions on a
	// cluster. This is useful when troubleshooting as it guarantees the operator
	// won't make any changes to the cluster.
	// +kubebuilder:validation:Optional
	Frozen bool `json:"frozen,omitempty"`

	// SidecarContainers is used to add sidecar containers to the pods that run
	// the cluster's nodes. If any storage volumes are needed by the sidecar
	// containers, see SidecarVolumes below.
	SidecarContainers []corev1.Container `json:"sidecarContainers,omitempty"`

	// SidecarVolumes is used to add any volumes that are required by sidecar
	// containers.
	SidecarVolumes []corev1.Volume `json:"sidecarVolumes,omitempty"`

	// OnDeleteUpdateStrategy sets StatefulSets created by the operator to
	// have OnDelete as the update strategy instead of RollingUpdate.
	OnDeleteUpdateStrategy bool `json:"onDeleteUpdateStrategy,omitempty"`

	// Zone defines the zone that placement instances will be written to if set.
	// If not set, the default zone of "embedded" will be used.
	// +kubebuilder:validation:Optional
	Zone string `json:"zone,omitempty"`

	// PreventScaleDown will prevent the operator from removing any nodes from a
	// cluster if set to true.
	// +kubebuilder:validation:Optional
	PreventScaleDown bool `json:"preventScaleDown,omitempty"`
}

ClusterSpec defines the desired state for a M3 cluster to be converge to.

func (*ClusterSpec) DeepCopy

func (in *ClusterSpec) DeepCopy() *ClusterSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpec.

func (*ClusterSpec) DeepCopyInto

func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DownsampleOptions added in v0.11.0

type DownsampleOptions struct {
	// All indicates whether to send data points to this namespace.
	// If set to false, this namespace will not receive data points. In this
	// case, data will need to be sent to the namespace via another mechanism
	// (e.g. rollup/recording rules).
	All bool `json:"all,omitempty"`
}

DownsampleOptions is a set of options related to downsampling data.

func (*DownsampleOptions) DeepCopy added in v0.11.0

func (in *DownsampleOptions) DeepCopy() *DownsampleOptions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DownsampleOptions.

func (*DownsampleOptions) DeepCopyInto added in v0.11.0

func (in *DownsampleOptions) DeepCopyInto(out *DownsampleOptions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ExtendedOptions added in v0.14.0

type ExtendedOptions struct {
	Type string `json:"type,omitempty"`
	// +kubebuilder:pruning:PreserveUnknownFields
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:validation:Type=object
	Options map[string]json.RawMessage `json:"options,omitempty"`
}

ExtendedOptions stores the extended namespace options.

func (*ExtendedOptions) DeepCopy added in v0.14.0

func (in *ExtendedOptions) DeepCopy() *ExtendedOptions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtendedOptions.

func (*ExtendedOptions) DeepCopyInto added in v0.14.0

func (in *ExtendedOptions) DeepCopyInto(out *ExtendedOptions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ExternalCoordinatorConfig added in v0.7.0

type ExternalCoordinatorConfig struct {
	// +kubebuilder:validation:Optional
	Selector map[string]string `json:"selector,omitempty"`
	// +kubebuilder:validation:Optional
	ServiceEndpoint string `json:"serviceEndpoint,omitempty"`
}

ExternalCoordinatorConfig defines parameters for using an external coordinator to control the cluster.

- It is expected that there is a separate standalone coordinator cluster. - It is externally managed - not managed by this operator. - It is expected to have a service endpoint.

Setup this db cluster, but do not assume a co-located coordinator. Instead provide a selector here so we can point to a separate coordinator service.

func (*ExternalCoordinatorConfig) DeepCopy added in v0.8.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalCoordinatorConfig.

func (*ExternalCoordinatorConfig) DeepCopyInto added in v0.8.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type IndexOptions

type IndexOptions struct {
	// Enabled controls whether metric indexing is enabled.
	Enabled bool `json:"enabled,omitempty"`

	// BlockSize controls the index block size.
	BlockSize string `json:"blockSize,omitempty"`
}

IndexOptions defines parameters for indexing.

func (*IndexOptions) DeepCopy

func (in *IndexOptions) DeepCopy() *IndexOptions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IndexOptions.

func (*IndexOptions) DeepCopyInto

func (in *IndexOptions) DeepCopyInto(out *IndexOptions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type IsolationGroup

type IsolationGroup struct {
	// Name is the value that will be used in StatefulSet labels, pod labels, and
	// M3DB placement "isolationGroup" fields.
	Name string `json:"name"`

	// NodeAffinityTerms is an array of NodeAffinityTerm requirements, which are
	// ANDed together to indicate what nodes an isolation group can be assigned
	// to.
	NodeAffinityTerms []NodeAffinityTerm `json:"nodeAffinityTerms,omitempty"`

	// UsePodAntiAffinity enables M3DB pod anti-affinity by using M3DB pod
	// component labels to prevent multiple M3DB pods from being scheduled in the
	// same failure domain, determined by podAffinityToplogyKey.
	UsePodAntiAffinity bool `json:"usePodAntiAffinity,omitempty"`

	// PodAffinityToplogyKey defines the node label used for pod anti-affinity.
	// This parameter is required when usePodAntiAffinity is set to true.
	PodAffinityToplogyKey string `json:"podAffinityToplogyKey,omitempty"`

	// NumInstances defines the number of instances.
	NumInstances int32 `json:"numInstances"`

	// StorageClassName is the name of the StorageClass to use for this isolation
	// group. This allows ensuring that PVs will be created in the same zone as
	// the pinned statefulset on Kubernetes < 1.12 (when topology aware volume
	// scheduling was introduced). Only has effect if the clusters
	// `dataDirVolumeClaimTemplate` is non-nil. If set, the volume claim template
	// will have its storageClassName field overridden per-isolationgroup. If
	// unset the storageClassName of the volumeClaimTemplate will be used.
	// +kubebuilder:validation:Optional
	StorageClassName string `json:"storageClassName,omitempty"`
}

IsolationGroup defines the name of zone as well attributes for the zone configuration

func (*IsolationGroup) DeepCopy

func (in *IsolationGroup) DeepCopy() *IsolationGroup

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IsolationGroup.

func (*IsolationGroup) DeepCopyInto

func (in *IsolationGroup) DeepCopyInto(out *IsolationGroup)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type IsolationGroups

type IsolationGroups []IsolationGroup

IsolationGroups is a slice of IsolationGroup. IsolationGroups satisfies the sort.Sort interface, sorting by name.

func (IsolationGroups) DeepCopy

func (in IsolationGroups) DeepCopy() IsolationGroups

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IsolationGroups.

func (IsolationGroups) DeepCopyInto

func (in IsolationGroups) DeepCopyInto(out *IsolationGroups)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (IsolationGroups) GetByName

func (g IsolationGroups) GetByName(name string) (IsolationGroup, bool)

GetByName fetches an IsolationGroup by name.

func (IsolationGroups) Len

func (g IsolationGroups) Len() int

func (IsolationGroups) Less

func (g IsolationGroups) Less(i, j int) bool

func (IsolationGroups) Swap

func (g IsolationGroups) Swap(i, j int)

type M3DBCluster

type M3DBCluster struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              ClusterSpec `json:"spec"`
	Status            M3DBStatus  `json:"status,omitempty"`
}

M3DBCluster defines the cluster +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:subresource:status

func (*M3DBCluster) DeepCopy

func (in *M3DBCluster) DeepCopy() *M3DBCluster

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new M3DBCluster.

func (*M3DBCluster) DeepCopyInto

func (in *M3DBCluster) DeepCopyInto(out *M3DBCluster)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*M3DBCluster) DeepCopyObject

func (in *M3DBCluster) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type M3DBClusterList

type M3DBClusterList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []M3DBCluster `json:"items"`
}

M3DBClusterList represents a list of M3DB Clusters +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*M3DBClusterList) DeepCopy

func (in *M3DBClusterList) DeepCopy() *M3DBClusterList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new M3DBClusterList.

func (*M3DBClusterList) DeepCopyInto

func (in *M3DBClusterList) DeepCopyInto(out *M3DBClusterList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*M3DBClusterList) DeepCopyObject

func (in *M3DBClusterList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type M3DBState

type M3DBState string

M3DBState contains the state of the M3DB cluster

const (
	// GreenState indicates a healthy state of the M3DB cluster
	GreenState M3DBState = "green"

	// YellowState indicates a caution state of the M3DB cluster
	YellowState M3DBState = "yellow"

	// RedState indicates a critical state of the M3DB cluster
	RedState M3DBState = "red"
)

type M3DBStatus

type M3DBStatus struct {
	// State is a enum of green, yellow, and red denoting the health of the
	// cluster
	State M3DBState `json:"state,omitempty"`

	// Various conditions about the cluster.
	Conditions []ClusterCondition `json:"conditions,omitempty"`

	// Message is a human readable message indicating why the cluster is in it's
	// current state
	Message string `json:"message,omitempty"`

	// ObservedGeneration is the last generation of the cluster the controller
	// observed. Kubernetes will automatically increment metadata.Generation every
	// time the cluster spec is changed.
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}

M3DBStatus contains the current state the M3DB cluster along with a human readable message

func (*M3DBStatus) DeepCopy

func (in *M3DBStatus) DeepCopy() *M3DBStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new M3DBStatus.

func (*M3DBStatus) DeepCopyInto

func (in *M3DBStatus) DeepCopyInto(out *M3DBStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*M3DBStatus) GetCondition

func (s *M3DBStatus) GetCondition(checkCond ClusterConditionType) (ClusterCondition, bool)

GetCondition returns the specified cluster condition if it exists with a bool indicating whether it was found.

func (*M3DBStatus) HasInitializedPlacement

func (s *M3DBStatus) HasInitializedPlacement() bool

HasInitializedPlacement returns true if the conditions indicate an initial placement has been created.

func (*M3DBStatus) HasPodsBootstrapping added in v0.14.0

func (s *M3DBStatus) HasPodsBootstrapping() bool

HasPodsBootstrapping returns true if conditions indicate a pod is currently bootstrapping.

func (*M3DBStatus) UpdateCondition

func (s *M3DBStatus) UpdateCondition(newCond ClusterCondition)

UpdateCondition updates one of the status's conditions, replacing the state of cond.Type if it exists or adding the condition if it doesn't exist.

type Namespace

type Namespace struct {
	// Name is the namespace name.
	Name string `json:"name,omitempty"`

	// Preset indicates preset namespace options.
	Preset string `json:"preset,omitempty"`

	// Options points to optional custom namespace configuration.
	// +optional
	Options *NamespaceOptions `json:"options,omitempty"`
}

Namespace defines an M3DB namespace or points to a preset M3DB namespace.

func (*Namespace) DeepCopy

func (in *Namespace) DeepCopy() *Namespace

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Namespace.

func (*Namespace) DeepCopyInto

func (in *Namespace) DeepCopyInto(out *Namespace)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NamespaceOptions

type NamespaceOptions struct {
	// BootstrapEnabled control if bootstrapping is enabled.
	BootstrapEnabled bool `json:"bootstrapEnabled,omitempty"`

	// FlushEnabled controls whether flushing is enabled.
	FlushEnabled bool `json:"flushEnabled,omitempty"`

	// WritesToCommitLog controls whether commit log writes are enabled.
	WritesToCommitLog bool `json:"writesToCommitLog,omitempty"`

	// CleanupEnabled controls whether cleanups are enabled.
	CleanupEnabled bool `json:"cleanupEnabled,omitempty"`

	// RepairEnabled controls whether repairs are enabled.
	RepairEnabled bool `json:"repairEnabled,omitempty"`

	// SnapshotEnabled controls whether snapshotting is enabled.
	SnapshotEnabled bool `json:"snapshotEnabled,omitempty"`

	// RetentionOptions sets the retention parameters.
	RetentionOptions RetentionOptions `json:"retentionOptions,omitempty"`

	// IndexOptions sets the indexing parameters.
	IndexOptions IndexOptions `json:"indexOptions,omitempty"`

	// ColdWritesEnabled controls whether cold writes are enabled.
	ColdWritesEnabled bool `json:"coldWritesEnabled,omitempty"`

	// AggregationOptions sets the aggregation parameters.
	AggregationOptions AggregationOptions `json:"aggregationOptions,omitempty"`

	// ExtendedOptions stores the extended namespace options.
	ExtendedOptions *ExtendedOptions `json:"extendedOptions,omitempty"`
}

NamespaceOptions defines parameters for an M3DB namespace. See https://m3db.github.io/m3/operational_guide/namespace_configuration/ for more details.

func (*NamespaceOptions) DeepCopy

func (in *NamespaceOptions) DeepCopy() *NamespaceOptions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceOptions.

func (*NamespaceOptions) DeepCopyInto

func (in *NamespaceOptions) DeepCopyInto(out *NamespaceOptions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodeAffinityTerm added in v0.2.0

type NodeAffinityTerm struct {
	// Key is the label of the node.
	Key string `json:"key"`

	// Values is an array of values, any of which a node can have for a pod to be
	// assigned to it.
	Values []string `json:"values"`
}

NodeAffinityTerm represents a node label and a set of label values, any of which can be matched to assign a pod to a node.

func (*NodeAffinityTerm) DeepCopy added in v0.2.0

func (in *NodeAffinityTerm) DeepCopy() *NodeAffinityTerm

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeAffinityTerm.

func (*NodeAffinityTerm) DeepCopyInto added in v0.2.0

func (in *NodeAffinityTerm) DeepCopyInto(out *NodeAffinityTerm)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodIdentity

type PodIdentity struct {
	Name           string `json:"name,omitempty"`
	UID            string `json:"uid,omitempty"`
	NodeName       string `json:"nodeName,omitempty"`
	NodeExternalID string `json:"nodeExternalID,omitempty"`
	NodeProviderID string `json:"nodeProviderID,omitempty"`
}

PodIdentity contains all the fields that may be used to identify a pod's identity in the M3DB placement. Any non-empty fields will be used to identity uniqueness of a pod for the purpose of M3DB replace operations.

func (*PodIdentity) DeepCopy

func (in *PodIdentity) DeepCopy() *PodIdentity

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodIdentity.

func (*PodIdentity) DeepCopyInto

func (in *PodIdentity) DeepCopyInto(out *PodIdentity)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodIdentityConfig

type PodIdentityConfig struct {
	// Sources enumerates the sources from which to derive pod identity. Note that
	// a pod's name will always be used. If empty, defaults to pod name and
	// UID.
	Sources []PodIdentitySource `json:"sources"`
}

PodIdentityConfig contains cluster-level configuration for deriving pod identity.

func (*PodIdentityConfig) DeepCopy

func (in *PodIdentityConfig) DeepCopy() *PodIdentityConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodIdentityConfig.

func (*PodIdentityConfig) DeepCopyInto

func (in *PodIdentityConfig) DeepCopyInto(out *PodIdentityConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodIdentitySource

type PodIdentitySource string

PodIdentitySource indicates a pre-defined source for deriving pod identity.

const (
	// PodIdentitySourcePodUID derives identity from UID of the pod.
	PodIdentitySourcePodUID PodIdentitySource = "PodUID"

	// PodIdentitySourceNodeSpecProviderID derives identity from the 'providerID'
	// spec field of the node.
	PodIdentitySourceNodeSpecProviderID PodIdentitySource = "NodeSpecProviderID"

	// PodIdentitySourceNodeName derives identity from the node's name.
	PodIdentitySourceNodeName PodIdentitySource = "NodeName"
)

type RetentionOptions

type RetentionOptions struct {
	// RetentionPeriod controls how long data for the namespace is retained.
	RetentionPeriod string `json:"retentionPeriod,omitempty"`

	// BlockSize controls the block size for the namespace.
	BlockSize string `json:"blockSize,omitempty"`

	// BufferFuture controls how far in the future metrics can be written.
	BufferFuture string `json:"bufferFuture,omitempty"`

	// BufferPast controls how far in the past metrics can be written.
	BufferPast string `json:"bufferPast,omitempty"`

	// BlockDataExpiry controls the block expiry.
	BlockDataExpiry bool `json:"blockDataExpiry,omitempty"`

	// BlockDataExpiry controls the not after access period for expiration.
	BlockDataExpiryAfterNotAccessPeriod string `json:"blockDataExpiryAfterNotAccessPeriod,omitempty"`
}

RetentionOptions defines parameters for data retention.

func (*RetentionOptions) DeepCopy

func (in *RetentionOptions) DeepCopy() *RetentionOptions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RetentionOptions.

func (*RetentionOptions) DeepCopyInto

func (in *RetentionOptions) DeepCopyInto(out *RetentionOptions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL