v1alpha

package
v0.0.0-...-d3ccc4f Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

+k8s:deepcopy-gen=package +groupName=replication.database.arangodb.com

Index

Constants

View Source
const (
	ArangoDeploymentReplicationResourceKind   = "ArangoDeploymentReplication"
	ArangoDeploymentReplicationResourcePlural = "arangodeploymentreplications"
)

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme

	SchemeGroupVersion                    = schema.GroupVersion{Group: groupName, Version: "v1alpha"}
	ArangoDeploymentReplicationCRDName    = ArangoDeploymentReplicationResourcePlural + "." + groupName
	ArangoDeploymentReplicationShortNames = []string{"arangorepl"}
)
View Source
var (
	// ValidationError indicates a validation failure
	ValidationError = errors.New("validation failed")
)

Functions

func IsValidation

func IsValidation(err error) bool

IsValidation return true when the given error is or is caused by a ValidationError.

func Resource

func Resource(resource string) schema.GroupResource

Resource gets an ArangoCluster GroupResource for a specified resource

Types

type ArangoDeploymentReplication

type ArangoDeploymentReplication struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              DeploymentReplicationSpec   `json:"spec"`
	Status            DeploymentReplicationStatus `json:"status"`
}

ArangoDeploymentReplication contains the entire Kubernetes info for an ArangoDB local storage provider.

func (*ArangoDeploymentReplication) AsOwner

AsOwner creates an OwnerReference for the given replication

func (*ArangoDeploymentReplication) DeepCopy

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

func (*ArangoDeploymentReplication) DeepCopyInto

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

func (*ArangoDeploymentReplication) DeepCopyObject

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

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

type ArangoDeploymentReplicationList

type ArangoDeploymentReplicationList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard list metadata
	// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ArangoDeploymentReplication `json:"items"`
}

ArangoDeploymentReplicationList is a list of ArangoDB deployment replications.

func (*ArangoDeploymentReplicationList) DeepCopy

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

func (*ArangoDeploymentReplicationList) DeepCopyInto

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

func (*ArangoDeploymentReplicationList) DeepCopyObject

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

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

type CollectionStatus

type CollectionStatus struct {
	// Name of the collection
	Name string `json:"name"`
	// Replication status per shard.
	// The list is ordered by shard index (0..noShards-1)
	Shards []ShardStatus `json:"shards,omitempty"`
}

CollectionStatus contains the status of a single collection.

func (*CollectionStatus) DeepCopy

func (in *CollectionStatus) DeepCopy() *CollectionStatus

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

func (*CollectionStatus) DeepCopyInto

func (in *CollectionStatus) DeepCopyInto(out *CollectionStatus)

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

type Condition

type Condition struct {
	// Type of  condition.
	Type ConditionType `json:"type"`
	// Status of the condition, one of True, False, Unknown.
	Status v1.ConditionStatus `json:"status"`
	// The last time this condition was updated.
	LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"`
	// Last time the condition transitioned from one status to another.
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
	// The reason for the condition's last transition.
	Reason string `json:"reason,omitempty"`
	// A human readable message indicating details about the transition.
	Message string `json:"message,omitempty"`
}

Condition represents one current condition of a deployment or deployment member. A condition might not show up if it is not happening. For example, if a cluster is not upgrading, the Upgrading condition would not show up.

func (*Condition) DeepCopy

func (in *Condition) DeepCopy() *Condition

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

func (*Condition) DeepCopyInto

func (in *Condition) DeepCopyInto(out *Condition)

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

type ConditionList

type ConditionList []Condition

ConditionList is a list of conditions. Each type is allowed only once.

func (ConditionList) DeepCopy

func (in ConditionList) DeepCopy() ConditionList

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

func (ConditionList) DeepCopyInto

func (in ConditionList) DeepCopyInto(out *ConditionList)

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

func (ConditionList) Get

func (list ConditionList) Get(conditionType ConditionType) (Condition, bool)

Get a condition by type. Returns true if found, false if not found.

func (ConditionList) IsTrue

func (list ConditionList) IsTrue(conditionType ConditionType) bool

IsTrue return true when a condition with given type exists and its status is `True`.

func (*ConditionList) Remove

func (list *ConditionList) Remove(conditionType ConditionType) bool

Remove the condition with given type. Returns true if removed, or false if not found.

func (*ConditionList) Update

func (list *ConditionList) Update(conditionType ConditionType, status bool, reason, message string) bool

Update the condition, replacing an old condition with same type (if any) Returns true when changes were made, false otherwise.

type ConditionType

type ConditionType string

ConditionType is a strongly typed condition name

const (
	// ConditionTypeConfigured indicates that the replication has been configured.
	ConditionTypeConfigured ConditionType = "Configured"
)

type DatabaseStatus

type DatabaseStatus struct {
	// Name of the database
	Name string `json:"name"`
	// Collections holds the replication status of each collection in the database.
	// List is ordered by name of the collection.
	Collections []CollectionStatus `json:"collections,omitempty"`
}

DatabaseStatus contains the status of a single database.

func (*DatabaseStatus) DeepCopy

func (in *DatabaseStatus) DeepCopy() *DatabaseStatus

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

func (*DatabaseStatus) DeepCopyInto

func (in *DatabaseStatus) DeepCopyInto(out *DatabaseStatus)

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

type DeploymentReplicationPhase

type DeploymentReplicationPhase string

DeploymentReplicationPhase is a strongly typed lifetime phase of a deployment replication

const (
	// DeploymentReplicationPhaseNone indicates that the phase is not set yet
	DeploymentReplicationPhaseNone DeploymentReplicationPhase = ""
	// DeploymentReplicationPhaseFailed indicates that a deployment replication is in a failed state
	// from which automatic recovery is impossible. Inspect `Reason` for more info.
	DeploymentReplicationPhaseFailed DeploymentReplicationPhase = "Failed"
)

func (DeploymentReplicationPhase) IsFailed

func (cs DeploymentReplicationPhase) IsFailed() bool

IsFailed returns true if given state is DeploymentStateFailed

type DeploymentReplicationSpec

type DeploymentReplicationSpec struct {
	Source      EndpointSpec `json:"source"`
	Destination EndpointSpec `json:"destination"`
}

DeploymentReplicationSpec contains the specification part of an ArangoDeploymentReplication.

func (*DeploymentReplicationSpec) DeepCopy

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

func (*DeploymentReplicationSpec) DeepCopyInto

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

func (DeploymentReplicationSpec) ResetImmutableFields

func (s DeploymentReplicationSpec) ResetImmutableFields(target *DeploymentReplicationSpec) []string

ResetImmutableFields replaces all immutable fields in the given target with values from the source spec. It returns a list of fields that have been reset. Field names are relative to `spec.`.

func (*DeploymentReplicationSpec) SetDefaults

func (s *DeploymentReplicationSpec) SetDefaults()

SetDefaults fills empty field with default values.

func (*DeploymentReplicationSpec) SetDefaultsFrom

func (s *DeploymentReplicationSpec) SetDefaultsFrom(source DeploymentReplicationSpec)

SetDefaultsFrom fills empty field with default values from the given source.

func (DeploymentReplicationSpec) Validate

func (s DeploymentReplicationSpec) Validate() error

Validate the given spec, returning an error on validation problems or nil if all ok.

type DeploymentReplicationStatus

type DeploymentReplicationStatus struct {
	// Phase holds the current lifetime phase of the deployment replication
	Phase DeploymentReplicationPhase `json:"phase,omitempty"`
	// Reason contains a human readable reason for reaching the current phase (can be empty)
	Reason string `json:"reason,omitempty"` // Reason for current phase

	// Conditions specific to the entire deployment replication
	Conditions ConditionList `json:"conditions,omitempty"`

	// Source contains the detailed status of the source endpoint
	Source EndpointStatus `json:"source"`
	// Destination contains the detailed status of the destination endpoint
	Destination EndpointStatus `json:"destination"`

	// CancelFailures records the number of times that the configuration was canceled
	// which resulted in an error.
	CancelFailures int `json:"cancel-failures,omitempty"`
}

DeploymentReplicationStatus contains the status part of an ArangoDeploymentReplication.

func (*DeploymentReplicationStatus) DeepCopy

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

func (*DeploymentReplicationStatus) DeepCopyInto

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

type EndpointAuthenticationSpec

type EndpointAuthenticationSpec struct {
	// KeyfileSecretName holds the name of a Secret containing a client authentication
	// certificate formatted at keyfile in a `tls.keyfile` field.
	KeyfileSecretName *string `json:"keyfileSecretName,omitempty"`
	// UserSecretName holds the name of a Secret containing a `username` & `password`
	// field used for basic authentication.
	// The user identified by the username must have write access in the `_system` database
	// of the ArangoDB cluster at the endpoint.
	UserSecretName *string `json:"userSecretName,omitempty"`
}

EndpointAuthenticationSpec contains the specification to authentication with the syncmasters in either source or destination endpoint.

func (*EndpointAuthenticationSpec) DeepCopy

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

func (*EndpointAuthenticationSpec) DeepCopyInto

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

func (EndpointAuthenticationSpec) GetKeyfileSecretName

func (s EndpointAuthenticationSpec) GetKeyfileSecretName() string

GetKeyfileSecretName returns the value of keyfileSecretName.

func (EndpointAuthenticationSpec) GetUserSecretName

func (s EndpointAuthenticationSpec) GetUserSecretName() string

GetUserSecretName returns the value of userSecretName.

func (EndpointAuthenticationSpec) ResetImmutableFields

func (s EndpointAuthenticationSpec) ResetImmutableFields(target *EndpointAuthenticationSpec, fieldPrefix string) []string

ResetImmutableFields replaces all immutable fields in the given target with values from the source spec. It returns a list of fields that have been reset. Field names are relative to `spec.`.

func (*EndpointAuthenticationSpec) SetDefaults

func (s *EndpointAuthenticationSpec) SetDefaults()

SetDefaults fills empty field with default values.

func (*EndpointAuthenticationSpec) SetDefaultsFrom

func (s *EndpointAuthenticationSpec) SetDefaultsFrom(source EndpointAuthenticationSpec)

SetDefaultsFrom fills empty field with default values from the given source.

func (EndpointAuthenticationSpec) Validate

func (s EndpointAuthenticationSpec) Validate(keyfileSecretNameRequired bool) error

Validate the given spec, returning an error on validation problems or nil if all ok.

type EndpointSpec

type EndpointSpec struct {
	// DeploymentName holds the name of an ArangoDeployment resource.
	// If set this provides default values for masterEndpoint, auth & tls.
	DeploymentName *string `json:"deploymentName,omitempty"`
	// MasterEndpoint holds a list of URLs used to reach the syncmaster(s).
	MasterEndpoint []string `json:"masterEndpoint,omitempty"`
	// Authentication holds settings needed to authentication at the syncmaster.
	Authentication EndpointAuthenticationSpec `json:"auth"`
	// TLS holds settings needed to verify the TLS connection to the syncmaster.
	TLS EndpointTLSSpec `json:"tls"`
}

EndpointSpec contains the specification used to reach the syncmasters in either source or destination mode.

func (*EndpointSpec) DeepCopy

func (in *EndpointSpec) DeepCopy() *EndpointSpec

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

func (*EndpointSpec) DeepCopyInto

func (in *EndpointSpec) DeepCopyInto(out *EndpointSpec)

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

func (EndpointSpec) GetDeploymentName

func (s EndpointSpec) GetDeploymentName() string

GetDeploymentName returns the value of deploymentName.

func (EndpointSpec) HasDeploymentName

func (s EndpointSpec) HasDeploymentName() bool

HasDeploymentName returns the true when a non-empty deployment name it set.

func (EndpointSpec) ResetImmutableFields

func (s EndpointSpec) ResetImmutableFields(target *EndpointSpec, fieldPrefix string) []string

ResetImmutableFields replaces all immutable fields in the given target with values from the source spec. It returns a list of fields that have been reset. Field names are relative to `spec.`.

func (*EndpointSpec) SetDefaults

func (s *EndpointSpec) SetDefaults()

SetDefaults fills empty field with default values.

func (*EndpointSpec) SetDefaultsFrom

func (s *EndpointSpec) SetDefaultsFrom(source EndpointSpec)

SetDefaultsFrom fills empty field with default values from the given source.

func (EndpointSpec) Validate

func (s EndpointSpec) Validate(isSourceEndpoint bool) error

Validate the given spec, returning an error on validation problems or nil if all ok.

type EndpointStatus

type EndpointStatus struct {
	// Databases holds the replication status of all databases from the point of view of this endpoint.
	// List is ordered by name of the database.
	Databases []DatabaseStatus `json:"databases,omitempty"`
}

EndpointStatus contains the status of either the source or destination endpoint.

func (*EndpointStatus) DeepCopy

func (in *EndpointStatus) DeepCopy() *EndpointStatus

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

func (*EndpointStatus) DeepCopyInto

func (in *EndpointStatus) DeepCopyInto(out *EndpointStatus)

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

type EndpointTLSSpec

type EndpointTLSSpec struct {
	// CASecretName holds the name of a Secret containing a ca.crt public key for TLS validation.
	CASecretName *string `json:"caSecretName,omitempty"`
}

EndpointTLSSpec contains the specification regarding the TLS connection to the syncmasters in either source or destination endpoint.

func (*EndpointTLSSpec) DeepCopy

func (in *EndpointTLSSpec) DeepCopy() *EndpointTLSSpec

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

func (*EndpointTLSSpec) DeepCopyInto

func (in *EndpointTLSSpec) DeepCopyInto(out *EndpointTLSSpec)

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

func (EndpointTLSSpec) GetCASecretName

func (s EndpointTLSSpec) GetCASecretName() string

GetCASecretName returns the value of caSecretName.

func (EndpointTLSSpec) ResetImmutableFields

func (s EndpointTLSSpec) ResetImmutableFields(target *EndpointTLSSpec, fieldPrefix string) []string

ResetImmutableFields replaces all immutable fields in the given target with values from the source spec. It returns a list of fields that have been reset. Field names are relative to `spec.`.

func (*EndpointTLSSpec) SetDefaults

func (s *EndpointTLSSpec) SetDefaults()

SetDefaults fills empty field with default values.

func (*EndpointTLSSpec) SetDefaultsFrom

func (s *EndpointTLSSpec) SetDefaultsFrom(source EndpointTLSSpec)

SetDefaultsFrom fills empty field with default values from the given source.

func (EndpointTLSSpec) Validate

func (s EndpointTLSSpec) Validate(caSecretNameRequired bool) error

Validate the given spec, returning an error on validation problems or nil if all ok.

type ShardStatus

type ShardStatus struct {
	Status string `json:"status"`
}

ShardStatus contains the status of a single shard.

func (*ShardStatus) DeepCopy

func (in *ShardStatus) DeepCopy() *ShardStatus

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

func (*ShardStatus) DeepCopyInto

func (in *ShardStatus) DeepCopyInto(out *ShardStatus)

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