Documentation ¶
Overview ¶
+k8s:deepcopy-gen=package +groupName=database.arangodb.com
Index ¶
- Constants
- Variables
- func IsAlreadyExists(err error) bool
- func IsNotFound(err error) bool
- func IsValidation(err error) bool
- func Resource(resource string) schema.GroupResource
- type Action
- type ActionType
- type ArangoDeployment
- type ArangoDeploymentList
- type AuthenticationSpec
- func (in *AuthenticationSpec) DeepCopy() *AuthenticationSpec
- func (in *AuthenticationSpec) DeepCopyInto(out *AuthenticationSpec)
- func (s AuthenticationSpec) GetJWTSecretName() string
- func (s AuthenticationSpec) IsAuthenticated() bool
- func (s AuthenticationSpec) ResetImmutableFields(fieldPrefix string, target *AuthenticationSpec) []string
- func (s *AuthenticationSpec) SetDefaults(defaultJWTSecretName string)
- func (s *AuthenticationSpec) SetDefaultsFrom(source AuthenticationSpec)
- func (s AuthenticationSpec) Validate(required bool) error
- type ChaosSpec
- func (in *ChaosSpec) DeepCopy() *ChaosSpec
- func (in *ChaosSpec) DeepCopyInto(out *ChaosSpec)
- func (s ChaosSpec) GetInterval() time.Duration
- func (s ChaosSpec) GetKillPodProbability() Percent
- func (s ChaosSpec) IsEnabled() bool
- func (s *ChaosSpec) SetDefaults()
- func (s *ChaosSpec) SetDefaultsFrom(source ChaosSpec)
- func (s ChaosSpec) Validate() error
- type Condition
- type ConditionList
- func (in ConditionList) DeepCopy() ConditionList
- func (in ConditionList) DeepCopyInto(out *ConditionList)
- func (list ConditionList) Get(conditionType ConditionType) (Condition, bool)
- func (list ConditionList) IsTrue(conditionType ConditionType) bool
- func (list *ConditionList) Remove(conditionType ConditionType) bool
- func (list *ConditionList) Update(conditionType ConditionType, status bool, reason, message string) bool
- type ConditionType
- type DeploymentMode
- type DeploymentPhase
- type DeploymentSpec
- func (in *DeploymentSpec) DeepCopy() *DeploymentSpec
- func (in *DeploymentSpec) DeepCopyInto(out *DeploymentSpec)
- func (s DeploymentSpec) GetEnvironment() Environment
- func (s DeploymentSpec) GetImage() string
- func (s DeploymentSpec) GetImagePullPolicy() v1.PullPolicy
- func (s DeploymentSpec) GetMode() DeploymentMode
- func (s DeploymentSpec) GetServerGroupSpec(group ServerGroup) ServerGroupSpec
- func (s DeploymentSpec) GetStorageEngine() StorageEngine
- func (s DeploymentSpec) IsAuthenticated() bool
- func (s DeploymentSpec) IsDevelopment() bool
- func (s DeploymentSpec) IsDowntimeAllowed() bool
- func (s DeploymentSpec) IsSecure() bool
- func (s DeploymentSpec) ResetImmutableFields(target *DeploymentSpec) []string
- func (s *DeploymentSpec) SetDefaults(deploymentName string)
- func (s *DeploymentSpec) SetDefaultsFrom(source DeploymentSpec)
- func (s *DeploymentSpec) Validate() error
- type DeploymentStatus
- type DeploymentStatusMembers
- func (ds *DeploymentStatusMembers) Add(status MemberStatus, group ServerGroup) error
- func (ds DeploymentStatusMembers) AllMembersReady(mode DeploymentMode, syncEnabled bool) bool
- func (ds DeploymentStatusMembers) ContainsID(id string) bool
- func (in *DeploymentStatusMembers) DeepCopy() *DeploymentStatusMembers
- func (in *DeploymentStatusMembers) DeepCopyInto(out *DeploymentStatusMembers)
- func (ds DeploymentStatusMembers) ElementByID(id string) (MemberStatus, ServerGroup, bool)
- func (ds DeploymentStatusMembers) ForeachServerGroup(cb func(group ServerGroup, list MemberStatusList) error) error
- func (ds DeploymentStatusMembers) MemberStatusByPVCName(pvcName string) (MemberStatus, ServerGroup, bool)
- func (ds DeploymentStatusMembers) MemberStatusByPodName(podName string) (MemberStatus, ServerGroup, bool)
- func (ds *DeploymentStatusMembers) RemoveByID(id string, group ServerGroup) error
- func (ds *DeploymentStatusMembers) Update(status MemberStatus, group ServerGroup) error
- type Duration
- type Environment
- type ExternalAccessSpec
- func (in *ExternalAccessSpec) DeepCopy() *ExternalAccessSpec
- func (in *ExternalAccessSpec) DeepCopyInto(out *ExternalAccessSpec)
- func (s ExternalAccessSpec) GetLoadBalancerIP() string
- func (s ExternalAccessSpec) GetNodePort() int
- func (s ExternalAccessSpec) GetType() ExternalAccessType
- func (s ExternalAccessSpec) ResetImmutableFields(fieldPrefix string, target *ExternalAccessSpec) []string
- func (s *ExternalAccessSpec) SetDefaults()
- func (s *ExternalAccessSpec) SetDefaultsFrom(source ExternalAccessSpec)
- func (s ExternalAccessSpec) Validate() error
- type ExternalAccessType
- type ImageInfo
- type ImageInfoList
- type MemberPhase
- type MemberStatus
- func (s MemberStatus) Age() time.Duration
- func (in *MemberStatus) DeepCopy() *MemberStatus
- func (in *MemberStatus) DeepCopyInto(out *MemberStatus)
- func (s MemberStatus) IsNotReadySince(timestamp time.Time) bool
- func (s MemberStatus) RecentTerminationsSince(timestamp time.Time) int
- func (s *MemberStatus) RemoveTerminationsBefore(timestamp time.Time) int
- type MemberStatusList
- func (l MemberStatusList) AllMembersReady() bool
- func (l MemberStatusList) ContainsID(id string) bool
- func (in MemberStatusList) DeepCopy() MemberStatusList
- func (in MemberStatusList) DeepCopyInto(out *MemberStatusList)
- func (l MemberStatusList) ElementByID(id string) (MemberStatus, bool)
- func (l MemberStatusList) ElementByPVCName(pvcName string) (MemberStatus, bool)
- func (l MemberStatusList) ElementByPodName(podName string) (MemberStatus, bool)
- func (l MemberStatusList) MembersReady() int
- func (l MemberStatusList) SelectMemberToRemove() (MemberStatus, error)
- type MonitoringSpec
- func (in *MonitoringSpec) DeepCopy() *MonitoringSpec
- func (in *MonitoringSpec) DeepCopyInto(out *MonitoringSpec)
- func (s MonitoringSpec) GetTokenSecretName() string
- func (s *MonitoringSpec) SetDefaults(defaultTokenSecretName string)
- func (s *MonitoringSpec) SetDefaultsFrom(source MonitoringSpec)
- func (s MonitoringSpec) Validate() error
- type Percent
- type Plan
- type RocksDBEncryptionSpec
- type RocksDBSpec
- func (in *RocksDBSpec) DeepCopy() *RocksDBSpec
- func (in *RocksDBSpec) DeepCopyInto(out *RocksDBSpec)
- func (s RocksDBSpec) IsEncrypted() bool
- func (s RocksDBSpec) ResetImmutableFields(fieldPrefix string, target *RocksDBSpec) []string
- func (s *RocksDBSpec) SetDefaults()
- func (s *RocksDBSpec) SetDefaultsFrom(source RocksDBSpec)
- func (s RocksDBSpec) Validate() error
- type SecretHashes
- type ServerGroup
- type ServerGroupSpec
- func (in *ServerGroupSpec) DeepCopy() *ServerGroupSpec
- func (in *ServerGroupSpec) DeepCopyInto(out *ServerGroupSpec)
- func (s ServerGroupSpec) GetArgs() []string
- func (s ServerGroupSpec) GetCount() int
- func (s ServerGroupSpec) GetServiceAccountName() string
- func (s ServerGroupSpec) GetStorageClassName() string
- func (s ServerGroupSpec) GetTolerations() []v1.Toleration
- func (s ServerGroupSpec) ResetImmutableFields(group ServerGroup, fieldPrefix string, target *ServerGroupSpec) []string
- func (s *ServerGroupSpec) SetDefaults(group ServerGroup, used bool, mode DeploymentMode)
- func (s *ServerGroupSpec) SetDefaultsFrom(source ServerGroupSpec)
- func (s ServerGroupSpec) Validate(group ServerGroup, used bool, mode DeploymentMode, env Environment) error
- type StorageEngine
- type SyncAuthenticationSpec
- func (in *SyncAuthenticationSpec) DeepCopy() *SyncAuthenticationSpec
- func (in *SyncAuthenticationSpec) DeepCopyInto(out *SyncAuthenticationSpec)
- func (s SyncAuthenticationSpec) GetClientCASecretName() string
- func (s SyncAuthenticationSpec) GetJWTSecretName() string
- func (s SyncAuthenticationSpec) ResetImmutableFields(fieldPrefix string, target *SyncAuthenticationSpec) []string
- func (s *SyncAuthenticationSpec) SetDefaults(defaultJWTSecretName, defaultClientCASecretName string)
- func (s *SyncAuthenticationSpec) SetDefaultsFrom(source SyncAuthenticationSpec)
- func (s SyncAuthenticationSpec) Validate() error
- type SyncExternalAccessSpec
- func (in *SyncExternalAccessSpec) DeepCopy() *SyncExternalAccessSpec
- func (in *SyncExternalAccessSpec) DeepCopyInto(out *SyncExternalAccessSpec)
- func (s SyncExternalAccessSpec) GetAccessPackageSecretNames() []string
- func (s SyncExternalAccessSpec) GetMasterEndpoint() []string
- func (s SyncExternalAccessSpec) ResetImmutableFields(fieldPrefix string, target *SyncExternalAccessSpec) []string
- func (s SyncExternalAccessSpec) ResolveMasterEndpoint(syncServiceHostName string, syncServicePort int) []string
- func (s *SyncExternalAccessSpec) SetDefaults()
- func (s *SyncExternalAccessSpec) SetDefaultsFrom(source SyncExternalAccessSpec)
- func (s SyncExternalAccessSpec) Validate() error
- type SyncSpec
- func (in *SyncSpec) DeepCopy() *SyncSpec
- func (in *SyncSpec) DeepCopyInto(out *SyncSpec)
- func (s SyncSpec) IsEnabled() bool
- func (s SyncSpec) ResetImmutableFields(fieldPrefix string, target *SyncSpec) []string
- func (s *SyncSpec) SetDefaults(...)
- func (s *SyncSpec) SetDefaultsFrom(source SyncSpec)
- func (s SyncSpec) Validate(mode DeploymentMode) error
- type TLSSpec
- func (in *TLSSpec) DeepCopy() *TLSSpec
- func (in *TLSSpec) DeepCopyInto(out *TLSSpec)
- func (s TLSSpec) GetAltNames() []string
- func (s TLSSpec) GetCASecretName() string
- func (s TLSSpec) GetParsedAltNames() (dnsNames, ipAddresses, emailAddresses []string, err error)
- func (s TLSSpec) GetTTL() Duration
- func (s TLSSpec) IsSecure() bool
- func (s *TLSSpec) SetDefaults(defaultCASecretName string)
- func (s *TLSSpec) SetDefaultsFrom(source TLSSpec)
- func (s TLSSpec) Validate() error
Constants ¶
const ( ArangoDeploymentResourceKind = "ArangoDeployment" ArangoDeploymentResourcePlural = "arangodeployments" )
const (
// CASecretNameDisabled is the value of CASecretName to use for disabling authentication.
CASecretNameDisabled = "None"
)
const (
// JWTSecretNameDisabled is the value of JWTSecretName to use for disabling authentication.
JWTSecretNameDisabled = "None"
)
const ( // MemberIDPreviousAction is used for Action.MemberID when the MemberID // should be derived from the previous action. MemberIDPreviousAction = "@previous" )
Variables ¶
var ( // ValidationError indicates a validation failure ValidationError = errors.New("validation failed") // AlreadyExistsError indicates an object that already exists AlreadyExistsError = errors.New("already exists") // NotFoundError indicates an object that cannot be found NotFoundError = errors.New("not found") )
var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) AddToScheme = SchemeBuilder.AddToScheme SchemeGroupVersion = schema.GroupVersion{Group: groupName, Version: "v1alpha"} ArangoDeploymentCRDName = ArangoDeploymentResourcePlural + "." + groupName ArangoDeploymentShortNames = []string{"arangodb", "arango"} )
var ( // AllServerGroups contains a constant list of all known server groups AllServerGroups = []ServerGroup{ ServerGroupSingle, ServerGroupAgents, ServerGroupDBServers, ServerGroupCoordinators, ServerGroupSyncMasters, ServerGroupSyncWorkers, } )
Functions ¶
func IsAlreadyExists ¶
IsAlreadyExists return true when the given error is or is caused by a AlreadyExistsError.
func IsNotFound ¶
IsNotFound return true when the given error is or is caused by a NotFoundError.
func IsValidation ¶
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 Action ¶
type Action struct { // ID of this action (unique for every action) ID string `json:"id"` // Type of action. Type ActionType `json:"type"` // ID reference of the member involved in this action (if any) MemberID string `json:"memberID,omitempty"` // Group involved in this action Group ServerGroup `json:"group,omitempty"` // CreationTime is set the when the action is created. CreationTime metav1.Time `json:"creationTime"` // StartTime is set the when the action has been started, but needs to wait to be finished. StartTime *metav1.Time `json:"startTime,omitempty"` // Reason for this action Reason string `json:"reason,omitempty"` // Image used in can of a SetCurrentImage action. Image string `json:"image,omitempty"` }
Action represents a single action to be taken to update a deployment.
func NewAction ¶
func NewAction(actionType ActionType, group ServerGroup, memberID string, reason ...string) Action
NewAction instantiates a new Action.
func (*Action) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Action.
func (*Action) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ActionType ¶
type ActionType string
ActionType is a strongly typed name for a plan action item
const ( // ActionTypeAddMember causes a member to be added. ActionTypeAddMember ActionType = "AddMember" // ActionTypeRemoveMember causes a member to be removed. ActionTypeRemoveMember ActionType = "RemoveMember" // ActionTypeCleanOutMember causes a member to be cleaned out (dbserver only). ActionTypeCleanOutMember ActionType = "CleanOutMember" // ActionTypeShutdownMember causes a member to be shutdown and removed from the cluster. ActionTypeShutdownMember ActionType = "ShutdownMember" // ActionTypeRotateMember causes a member to be shutdown and have it's pod removed. ActionTypeRotateMember ActionType = "RotateMember" // ActionTypeUpgradeMember causes a member to be shutdown and have it's pod removed, restarted with AutoUpgrade option, waited until termination and the restarted again. ActionTypeUpgradeMember ActionType = "UpgradeMember" // ActionTypeWaitForMemberUp causes the plan to wait until the member is considered "up". ActionTypeWaitForMemberUp ActionType = "WaitForMemberUp" // ActionTypeRenewTLSCertificate causes the TLS certificate of a member to be renewed. ActionTypeRenewTLSCertificate ActionType = "RenewTLSCertificate" // ActionTypeRenewTLSCACertificate causes the TLS CA certificate of the entire deployment to be renewed. ActionTypeRenewTLSCACertificate ActionType = "RenewTLSCACertificate" // ActionTypeSetCurrentImage causes status.CurrentImage to be updated to the image given in the action. ActionTypeSetCurrentImage ActionType = "SetCurrentImage" )
type ArangoDeployment ¶
type ArangoDeployment struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec DeploymentSpec `json:"spec"` Status DeploymentStatus `json:"status"` }
ArangoDeployment contains the entire Kubernetes info for an ArangoDB database deployment.
func (*ArangoDeployment) AsOwner ¶
func (d *ArangoDeployment) AsOwner() metav1.OwnerReference
AsOwner creates an OwnerReference for the given deployment
func (*ArangoDeployment) DeepCopy ¶
func (in *ArangoDeployment) DeepCopy() *ArangoDeployment
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArangoDeployment.
func (*ArangoDeployment) DeepCopyInto ¶
func (in *ArangoDeployment) DeepCopyInto(out *ArangoDeployment)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ArangoDeployment) DeepCopyObject ¶
func (in *ArangoDeployment) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ArangoDeployment) ForeachServerGroup ¶
func (d *ArangoDeployment) ForeachServerGroup(cb func(group ServerGroup, spec ServerGroupSpec, status *MemberStatusList) error, status *DeploymentStatus) error
ForeachServerGroup calls the given callback for all server groups. If the callback returns an error, this error is returned and no other server groups are processed. Groups are processed in this order: agents, single, dbservers, coordinators, syncmasters, syncworkers
type ArangoDeploymentList ¶
type ArangoDeploymentList 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 []ArangoDeployment `json:"items"` }
ArangoDeploymentList is a list of ArangoDB clusters.
func (*ArangoDeploymentList) DeepCopy ¶
func (in *ArangoDeploymentList) DeepCopy() *ArangoDeploymentList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArangoDeploymentList.
func (*ArangoDeploymentList) DeepCopyInto ¶
func (in *ArangoDeploymentList) DeepCopyInto(out *ArangoDeploymentList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ArangoDeploymentList) DeepCopyObject ¶
func (in *ArangoDeploymentList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AuthenticationSpec ¶
type AuthenticationSpec struct {
JWTSecretName *string `json:"jwtSecretName,omitempty"`
}
AuthenticationSpec holds authentication specific configuration settings
func (*AuthenticationSpec) DeepCopy ¶
func (in *AuthenticationSpec) DeepCopy() *AuthenticationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthenticationSpec.
func (*AuthenticationSpec) DeepCopyInto ¶
func (in *AuthenticationSpec) DeepCopyInto(out *AuthenticationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (AuthenticationSpec) GetJWTSecretName ¶
func (s AuthenticationSpec) GetJWTSecretName() string
GetJWTSecretName returns the value of jwtSecretName.
func (AuthenticationSpec) IsAuthenticated ¶
func (s AuthenticationSpec) IsAuthenticated() bool
IsAuthenticated returns true if authentication is enabled. Returns false other (when JWTSecretName == "None").
func (AuthenticationSpec) ResetImmutableFields ¶
func (s AuthenticationSpec) ResetImmutableFields(fieldPrefix string, target *AuthenticationSpec) []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 given field prefix.
func (*AuthenticationSpec) SetDefaults ¶
func (s *AuthenticationSpec) SetDefaults(defaultJWTSecretName string)
SetDefaults fills in missing defaults
func (*AuthenticationSpec) SetDefaultsFrom ¶
func (s *AuthenticationSpec) SetDefaultsFrom(source AuthenticationSpec)
SetDefaultsFrom fills unspecified fields with a value from given source spec.
func (AuthenticationSpec) Validate ¶
func (s AuthenticationSpec) Validate(required bool) error
Validate the given spec
type ChaosSpec ¶
type ChaosSpec struct { // Enabled switches the chaos monkey for a deployment on or off. Enabled *bool `json:"enabled,omitempty"` // Interval is the time between events Interval *time.Duration `json:"interval,omitempty"` // KillPodProbability is the chance of a pod being killed during an event KillPodProbability *Percent `json:"kill-pod-probability,omitempty"` }
ChaosSpec holds configuration for the deployment chaos monkey.
func (*ChaosSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChaosSpec.
func (*ChaosSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (ChaosSpec) GetInterval ¶
GetInterval returns the value of interval.
func (ChaosSpec) GetKillPodProbability ¶
GetKillPodProbability returns the value of kill-pod-probability.
func (*ChaosSpec) SetDefaults ¶
func (s *ChaosSpec) SetDefaults()
SetDefaults fills in missing defaults
func (*ChaosSpec) SetDefaultsFrom ¶
SetDefaultsFrom fills unspecified fields with a value from given source spec.
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.
func (*Condition) DeepCopyInto ¶
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 ( // ConditionTypeReady indicates that the member or entire deployment is ready and running normally. ConditionTypeReady ConditionType = "Ready" // ConditionTypeTerminated indicates that the member has terminated and will not restart. ConditionTypeTerminated ConditionType = "Terminated" // ConditionTypeAutoUpgrade indicates that the member has to be started with `--database.auto-upgrade` once. ConditionTypeAutoUpgrade ConditionType = "AutoUpgrade" // ConditionTypeCleanedOut indicates that the member (dbserver) has been cleaned out. // Always check in combination with ConditionTypeTerminated. ConditionTypeCleanedOut ConditionType = "CleanedOut" // ConditionTypeAgentRecoveryNeeded indicates that the member (agent) will no // longer recover from its current volume and there has to be rebuild // using the recovery procedure. ConditionTypeAgentRecoveryNeeded ConditionType = "AgentRecoveryNeeded" // ConditionTypePodSchedulingFailure indicates that one or more pods belonging to the deployment cannot be schedule. ConditionTypePodSchedulingFailure ConditionType = "PodSchedulingFailure" // ConditionTypeSecretsChanged indicates that the value of one of more secrets used by // the deployment have changed. Once that is the case, the operator will no longer // touch the deployment, until the original secrets have been restored. ConditionTypeSecretsChanged ConditionType = "SecretsChanged" // ConditionTypeMemberOfCluster indicates that the member is a known member of the ArangoDB cluster. ConditionTypeMemberOfCluster ConditionType = "MemberOfCluster" )
type DeploymentMode ¶
type DeploymentMode string
DeploymentMode specifies the type of ArangoDB deployment to create.
const ( // DeploymentModeSingle yields a single server DeploymentModeSingle DeploymentMode = "Single" // DeploymentModeActiveFailover yields an agency and a active-failover server pair DeploymentModeActiveFailover DeploymentMode = "ActiveFailover" // DeploymentModeCluster yields an full cluster (agency, dbservers & coordinators) DeploymentModeCluster DeploymentMode = "Cluster" )
func ModeOrDefault ¶
func ModeOrDefault(input *DeploymentMode, defaultValue ...DeploymentMode) DeploymentMode
ModeOrDefault returns the default value (or empty string) if input is nil, otherwise returns the referenced value.
func NewMode ¶
func NewMode(input DeploymentMode) *DeploymentMode
NewMode returns a reference to a string with given value.
func NewModeOrNil ¶
func NewModeOrNil(input *DeploymentMode) *DeploymentMode
NewModeOrNil returns nil if input is nil, otherwise returns a clone of the given value.
func (DeploymentMode) HasAgents ¶
func (m DeploymentMode) HasAgents() bool
HasAgents returns true when the given mode is "ActiveFailover" or "Cluster".
func (DeploymentMode) HasCoordinators ¶
func (m DeploymentMode) HasCoordinators() bool
HasCoordinators returns true when the given mode is "Cluster".
func (DeploymentMode) HasDBServers ¶
func (m DeploymentMode) HasDBServers() bool
HasDBServers returns true when the given mode is "Cluster".
func (DeploymentMode) HasSingleServers ¶
func (m DeploymentMode) HasSingleServers() bool
HasSingleServers returns true when the given mode is "Single" or "ActiveFailover".
func (DeploymentMode) SupportsSync ¶
func (m DeploymentMode) SupportsSync() bool
SupportsSync returns true when the given mode supports dc2dc replication.
func (DeploymentMode) Validate ¶
func (m DeploymentMode) Validate() error
Validate the mode. Return errors when validation fails, nil on success.
type DeploymentPhase ¶
type DeploymentPhase string
DeploymentPhase is a strongly typed lifetime phase of a deployment
const ( // DeploymentPhaseNone indicates that the phase is not set yet DeploymentPhaseNone DeploymentPhase = "" // DeploymentPhaseRunning indicates that the deployment is under control of the // ArangoDeployment operator. DeploymentPhaseRunning DeploymentPhase = "Running" // DeploymentPhaseFailed indicates that a deployment is in a failed state // from which automatic recovery is impossible. Inspect `Reason` for more info. DeploymentPhaseFailed DeploymentPhase = "Failed" )
func (DeploymentPhase) IsFailed ¶
func (cs DeploymentPhase) IsFailed() bool
IsFailed returns true if given state is DeploymentStateFailed
type DeploymentSpec ¶
type DeploymentSpec struct { Mode *DeploymentMode `json:"mode,omitempty"` Environment *Environment `json:"environment,omitempty"` StorageEngine *StorageEngine `json:"storageEngine,omitempty"` Image *string `json:"image,omitempty"` ImagePullPolicy *v1.PullPolicy `json:"imagePullPolicy,omitempty"` DowntimeAllowed *bool `json:"downtimeAllowed,omitempty"` ExternalAccess ExternalAccessSpec `json:"externalAccess"` RocksDB RocksDBSpec `json:"rocksdb"` Authentication AuthenticationSpec `json:"auth"` TLS TLSSpec `json:"tls"` Sync SyncSpec `json:"sync"` Single ServerGroupSpec `json:"single"` Agents ServerGroupSpec `json:"agents"` DBServers ServerGroupSpec `json:"dbservers"` Coordinators ServerGroupSpec `json:"coordinators"` SyncMasters ServerGroupSpec `json:"syncmasters"` SyncWorkers ServerGroupSpec `json:"syncworkers"` Chaos ChaosSpec `json:"chaos"` }
DeploymentSpec contains the spec part of a ArangoDeployment resource.
func (*DeploymentSpec) DeepCopy ¶
func (in *DeploymentSpec) DeepCopy() *DeploymentSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentSpec.
func (*DeploymentSpec) DeepCopyInto ¶
func (in *DeploymentSpec) DeepCopyInto(out *DeploymentSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (DeploymentSpec) GetEnvironment ¶
func (s DeploymentSpec) GetEnvironment() Environment
GetEnvironment returns the value of environment.
func (DeploymentSpec) GetImage ¶
func (s DeploymentSpec) GetImage() string
GetImage returns the value of image.
func (DeploymentSpec) GetImagePullPolicy ¶
func (s DeploymentSpec) GetImagePullPolicy() v1.PullPolicy
GetImagePullPolicy returns the value of imagePullPolicy.
func (DeploymentSpec) GetMode ¶
func (s DeploymentSpec) GetMode() DeploymentMode
GetMode returns the value of mode.
func (DeploymentSpec) GetServerGroupSpec ¶
func (s DeploymentSpec) GetServerGroupSpec(group ServerGroup) ServerGroupSpec
GetServerGroupSpec returns the server group spec (from this deployment spec) for the given group.
func (DeploymentSpec) GetStorageEngine ¶
func (s DeploymentSpec) GetStorageEngine() StorageEngine
GetStorageEngine returns the value of storageEngine.
func (DeploymentSpec) IsAuthenticated ¶
func (s DeploymentSpec) IsAuthenticated() bool
IsAuthenticated returns true when authentication is enabled
func (DeploymentSpec) IsDevelopment ¶
func (s DeploymentSpec) IsDevelopment() bool
IsDevelopment returns true when the spec contains a Development environment.
func (DeploymentSpec) IsDowntimeAllowed ¶
func (s DeploymentSpec) IsDowntimeAllowed() bool
IsDowntimeAllowed returns the value of downtimeAllowed.
func (DeploymentSpec) IsSecure ¶
func (s DeploymentSpec) IsSecure() bool
IsSecure returns true when SSL is enabled
func (DeploymentSpec) ResetImmutableFields ¶
func (s DeploymentSpec) ResetImmutableFields(target *DeploymentSpec) []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 (*DeploymentSpec) SetDefaults ¶
func (s *DeploymentSpec) SetDefaults(deploymentName string)
SetDefaults fills in default values when a field is not specified.
func (*DeploymentSpec) SetDefaultsFrom ¶
func (s *DeploymentSpec) SetDefaultsFrom(source DeploymentSpec)
SetDefaultsFrom fills unspecified fields with a value from given source spec.
func (*DeploymentSpec) Validate ¶
func (s *DeploymentSpec) Validate() error
Validate the specification. Return errors when validation fails, nil on success.
type DeploymentStatus ¶
type DeploymentStatus struct { // Phase holds the current lifetime phase of the deployment Phase DeploymentPhase `json:"phase"` // Reason contains a human readable reason for reaching the current state (can be empty) Reason string `json:"reason,omitempty"` // Reason for current state // ServiceName holds the name of the Service a client can use (inside the k8s cluster) // to access ArangoDB. ServiceName string `json:"serviceName,omitempty"` // SyncServiceName holds the name of the Service a client can use (inside the k8s cluster) // to access syncmasters (only set when dc2dc synchronization is enabled). SyncServiceName string `json:"syncServiceName,omitempty"` // Images holds a list of ArangoDB images with their ID and ArangoDB version. Images ImageInfoList `json:"arangodb-images,omitempty"` // Image that is currently being used when new pods are created CurrentImage *ImageInfo `json:"current-image,omitempty"` // Members holds the status for all members in all server groups Members DeploymentStatusMembers `json:"members"` // Conditions specific to the entire deployment Conditions ConditionList `json:"conditions,omitempty"` // Plan to update this deployment Plan Plan `json:"plan,omitempty"` // AcceptedSpec contains the last specification that was accepted by the operator. AcceptedSpec *DeploymentSpec `json:"accepted-spec,omitempty"` // SecretHashes keeps a sha256 hash of secret values, so we can // detect changes in secret values. SecretHashes *SecretHashes `json:"secret-hashes,omitempty"` }
DeploymentStatus contains the status part of a Cluster resource.
func (*DeploymentStatus) DeepCopy ¶
func (in *DeploymentStatus) DeepCopy() *DeploymentStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentStatus.
func (*DeploymentStatus) DeepCopyInto ¶
func (in *DeploymentStatus) DeepCopyInto(out *DeploymentStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DeploymentStatusMembers ¶
type DeploymentStatusMembers struct { Single MemberStatusList `json:"single,omitempty"` Agents MemberStatusList `json:"agents,omitempty"` DBServers MemberStatusList `json:"dbservers,omitempty"` Coordinators MemberStatusList `json:"coordinators,omitempty"` SyncMasters MemberStatusList `json:"syncmasters,omitempty"` SyncWorkers MemberStatusList `json:"syncworkers,omitempty"` }
DeploymentStatusMembers holds the member status of all server groups
func (*DeploymentStatusMembers) Add ¶
func (ds *DeploymentStatusMembers) Add(status MemberStatus, group ServerGroup) error
Add adds the given status in the given group.
func (DeploymentStatusMembers) AllMembersReady ¶
func (ds DeploymentStatusMembers) AllMembersReady(mode DeploymentMode, syncEnabled bool) bool
AllMembersReady returns true when all members, that must be ready for the given mode, are in the Ready state.
func (DeploymentStatusMembers) ContainsID ¶
func (ds DeploymentStatusMembers) ContainsID(id string) bool
ContainsID returns true if the given set of members contains a member with given ID.
func (*DeploymentStatusMembers) DeepCopy ¶
func (in *DeploymentStatusMembers) DeepCopy() *DeploymentStatusMembers
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentStatusMembers.
func (*DeploymentStatusMembers) DeepCopyInto ¶
func (in *DeploymentStatusMembers) DeepCopyInto(out *DeploymentStatusMembers)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (DeploymentStatusMembers) ElementByID ¶
func (ds DeploymentStatusMembers) ElementByID(id string) (MemberStatus, ServerGroup, bool)
ElementByID returns the element in the given list that has the given ID and true. If no such element exists, false is returned.
func (DeploymentStatusMembers) ForeachServerGroup ¶
func (ds DeploymentStatusMembers) ForeachServerGroup(cb func(group ServerGroup, list MemberStatusList) error) error
ForeachServerGroup calls the given callback for all server groups. If the callback returns an error, this error is returned and the callback is not called for the remaining groups.
func (DeploymentStatusMembers) MemberStatusByPVCName ¶
func (ds DeploymentStatusMembers) MemberStatusByPVCName(pvcName string) (MemberStatus, ServerGroup, bool)
MemberStatusByPVCName returns a reference to the element in the given set of lists that has the given PVC name. If no such element exists, nil is returned.
func (DeploymentStatusMembers) MemberStatusByPodName ¶
func (ds DeploymentStatusMembers) MemberStatusByPodName(podName string) (MemberStatus, ServerGroup, bool)
MemberStatusByPodName returns a reference to the element in the given set of lists that has the given pod name. If no such element exists, nil is returned.
func (*DeploymentStatusMembers) RemoveByID ¶
func (ds *DeploymentStatusMembers) RemoveByID(id string, group ServerGroup) error
RemoveByID a member with given ID from the given group. Returns a NotFoundError if the ID of the given member or group cannot be found.
func (*DeploymentStatusMembers) Update ¶
func (ds *DeploymentStatusMembers) Update(status MemberStatus, group ServerGroup) error
Update updates the given status in the given group.
type Duration ¶
type Duration string
Duration is a period of time, specified in go time.Duration format. This is intended to allow human friendly TTL's to be specified.
func DurationOrDefault ¶
DurationOrDefault returns the default value (or empty string) if input is nil, otherwise returns the referenced value.
func NewDuration ¶
NewDuration returns a reference to a Duration with given value.
func NewDurationOrNil ¶
NewDurationOrNil returns nil if input is nil, otherwise returns a clone of the given value.
func (Duration) AsDuration ¶
AsDuration parses the duration to a time.Duration value. In case of a parse error, 0 is returned.
type Environment ¶
type Environment string
Environment in which to run the cluster
const ( // EnvironmentDevelopment yields a cluster optimized for development EnvironmentDevelopment Environment = "Development" // EnvironmentProduction yields a cluster optimized for production EnvironmentProduction Environment = "Production" )
func EnvironmentOrDefault ¶
func EnvironmentOrDefault(input *Environment, defaultValue ...Environment) Environment
EnvironmentOrDefault returns the default value (or empty string) if input is nil, otherwise returns the referenced value.
func NewEnvironment ¶
func NewEnvironment(input Environment) *Environment
NewEnvironment returns a reference to a string with given value.
func NewEnvironmentOrNil ¶
func NewEnvironmentOrNil(input *Environment) *Environment
NewEnvironmentOrNil returns nil if input is nil, otherwise returns a clone of the given value.
func (Environment) IsProduction ¶
func (e Environment) IsProduction() bool
IsProduction returns true when the given environment is a production environment.
func (Environment) Validate ¶
func (e Environment) Validate() error
Validate the environment. Return errors when validation fails, nil on success.
type ExternalAccessSpec ¶
type ExternalAccessSpec struct { // Type of external access Type *ExternalAccessType `json:"type,omitempty"` // Optional port used in case of Auto or NodePort type. NodePort *int `json:"nodePort,omitempty"` // Optional IP used to configure a load-balancer on, in case of Auto or LoadBalancer type. LoadBalancerIP *string `json:"loadBalancerIP,omitempty"` }
ExternalAccessSpec holds configuration for the external access provided for the deployment.
func (*ExternalAccessSpec) DeepCopy ¶
func (in *ExternalAccessSpec) DeepCopy() *ExternalAccessSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalAccessSpec.
func (*ExternalAccessSpec) DeepCopyInto ¶
func (in *ExternalAccessSpec) DeepCopyInto(out *ExternalAccessSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (ExternalAccessSpec) GetLoadBalancerIP ¶
func (s ExternalAccessSpec) GetLoadBalancerIP() string
GetLoadBalancerIP returns the value of loadBalancerIP.
func (ExternalAccessSpec) GetNodePort ¶
func (s ExternalAccessSpec) GetNodePort() int
GetNodePort returns the value of nodePort.
func (ExternalAccessSpec) GetType ¶
func (s ExternalAccessSpec) GetType() ExternalAccessType
GetType returns the value of type.
func (ExternalAccessSpec) ResetImmutableFields ¶
func (s ExternalAccessSpec) ResetImmutableFields(fieldPrefix string, target *ExternalAccessSpec) []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 given field prefix.
func (*ExternalAccessSpec) SetDefaults ¶
func (s *ExternalAccessSpec) SetDefaults()
SetDefaults fills in missing defaults
func (*ExternalAccessSpec) SetDefaultsFrom ¶
func (s *ExternalAccessSpec) SetDefaultsFrom(source ExternalAccessSpec)
SetDefaultsFrom fills unspecified fields with a value from given source spec.
func (ExternalAccessSpec) Validate ¶
func (s ExternalAccessSpec) Validate() error
Validate the given spec
type ExternalAccessType ¶
type ExternalAccessType string
ExternalAccessType specifies the type of external access provides for the deployment
const ( // ExternalAccessTypeNone yields a cluster with no external access ExternalAccessTypeNone ExternalAccessType = "None" // ExternalAccessTypeAuto yields a cluster with an automatic selection for external access ExternalAccessTypeAuto ExternalAccessType = "Auto" // ExternalAccessTypeLoadBalancer yields a cluster with a service of type `LoadBalancer` to provide external access ExternalAccessTypeLoadBalancer ExternalAccessType = "LoadBalancer" // ExternalAccessTypeNodePort yields a cluster with a service of type `NodePort` to provide external access ExternalAccessTypeNodePort ExternalAccessType = "NodePort" )
func ExternalAccessTypeOrDefault ¶
func ExternalAccessTypeOrDefault(input *ExternalAccessType, defaultValue ...ExternalAccessType) ExternalAccessType
ExternalAccessTypeOrDefault returns the default value (or empty string) if input is nil, otherwise returns the referenced value.
func NewExternalAccessType ¶
func NewExternalAccessType(input ExternalAccessType) *ExternalAccessType
NewExternalAccessType returns a reference to a string with given value.
func NewExternalAccessTypeOrNil ¶
func NewExternalAccessTypeOrNil(input *ExternalAccessType) *ExternalAccessType
NewExternalAccessTypeOrNil returns nil if input is nil, otherwise returns a clone of the given value.
func (ExternalAccessType) AsServiceType ¶
func (t ExternalAccessType) AsServiceType() v1.ServiceType
AsServiceType returns the k8s ServiceType for this ExternalAccessType. If type is "Auto", ServiceTypeLoadBalancer is returned.
func (ExternalAccessType) IsAuto ¶
func (t ExternalAccessType) IsAuto() bool
func (ExternalAccessType) IsLoadBalancer ¶
func (t ExternalAccessType) IsLoadBalancer() bool
func (ExternalAccessType) IsNodePort ¶
func (t ExternalAccessType) IsNodePort() bool
func (ExternalAccessType) IsNone ¶
func (t ExternalAccessType) IsNone() bool
func (ExternalAccessType) Validate ¶
func (t ExternalAccessType) Validate() error
Validate the type. Return errors when validation fails, nil on success.
type ImageInfo ¶
type ImageInfo struct { Image string `json:"image"` // Human provided name of the image ImageID string `json:"image-id,omitempty"` // Unique ID (with SHA256) of the image ArangoDBVersion driver.Version `json:"arangodb-version,omitempty"` // ArangoDB version within the image Enterprise bool `json:"enterprise,omitempty"` // If set, this is an enterprise image }
ImageInfo contains an ID of an image and the ArangoDB version inside the image.
func (*ImageInfo) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageInfo.
func (*ImageInfo) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ImageInfoList ¶
type ImageInfoList []ImageInfo
ImageInfoList is a list of image infos
func (*ImageInfoList) AddOrUpdate ¶
func (l *ImageInfoList) AddOrUpdate(info ImageInfo)
AddOrUpdate adds the given info to the given list, if its image does not exist in the list. If the image does exist in the list, its entry is replaced by the given info. If not found, false is returned.
func (ImageInfoList) DeepCopy ¶
func (in ImageInfoList) DeepCopy() ImageInfoList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageInfoList.
func (ImageInfoList) DeepCopyInto ¶
func (in ImageInfoList) DeepCopyInto(out *ImageInfoList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (ImageInfoList) GetByImage ¶
func (l ImageInfoList) GetByImage(image string) (ImageInfo, bool)
GetByImage returns the info in the given list for the image with given name. If not found, false is returned.
func (ImageInfoList) GetByImageID ¶
func (l ImageInfoList) GetByImageID(imageID string) (ImageInfo, bool)
GetByImageID returns the info in the given list for the image with given id. If not found, false is returned.
type MemberPhase ¶
type MemberPhase string
MemberPhase is a strongly typed lifetime phase of a deployment member
const ( // MemberPhaseNone indicates that the state is not set yet MemberPhaseNone MemberPhase = "" // MemberPhaseCreated indicates that all resources needed for the member have been created MemberPhaseCreated MemberPhase = "Created" // MemberPhaseFailed indicates that the member is gone beyond hope of recovery. It must be replaced with a new member. MemberPhaseFailed MemberPhase = "Failed" // MemberPhaseCleanOut indicates that a dbserver is in the process of being cleaned out MemberPhaseCleanOut MemberPhase = "CleanOut" // MemberPhaseShuttingDown indicates that a member is shutting down MemberPhaseShuttingDown MemberPhase = "ShuttingDown" // MemberPhaseRotating indicates that a member is being rotated MemberPhaseRotating MemberPhase = "Rotating" // MemberPhaseUpgrading indicates that a member is in the process of upgrading its database data format MemberPhaseUpgrading MemberPhase = "Upgrading" )
func (MemberPhase) IsFailed ¶
func (p MemberPhase) IsFailed() bool
IsFailed returns true when given phase == "Failed"
type MemberStatus ¶
type MemberStatus struct { // ID holds the unique ID of the member. // This id is also used within the ArangoDB cluster to identify this server. ID string `json:"id"` // Phase holds the current lifetime phase of this member Phase MemberPhase `json:"phase"` // CreatedAt holds the creation timestamp of this member. CreatedAt metav1.Time `json:"created-at"` // PersistentVolumeClaimName holds the name of the persistent volume claim used for this member (if any). PersistentVolumeClaimName string `json:"persistentVolumeClaimName,omitempty"` // PodName holds the name of the Pod that currently runs this member PodName string `json:"podName,omitempty"` // Conditions specific to this member Conditions ConditionList `json:"conditions,omitempty"` // RecentTerminatons holds the times when this member was recently terminated. // First entry is the oldest. (do not add omitempty, since we want to be able to switch from a list to an empty list) RecentTerminations []metav1.Time `json:"recent-terminations"` // IsInitialized is set after the very first time a pod was created for this member. // After that, DBServers must have a UUID field or fail. IsInitialized bool `json:"initialized"` // CleanoutJobID holds the ID of the agency job for cleaning out this server CleanoutJobID string `json:"cleanout-job-id,omitempty"` }
MemberStatus holds the current status of a single member (server)
func (MemberStatus) Age ¶
func (s MemberStatus) Age() time.Duration
Age returns the duration since the creation timestamp of this member.
func (*MemberStatus) DeepCopy ¶
func (in *MemberStatus) DeepCopy() *MemberStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MemberStatus.
func (*MemberStatus) DeepCopyInto ¶
func (in *MemberStatus) DeepCopyInto(out *MemberStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (MemberStatus) IsNotReadySince ¶
func (s MemberStatus) IsNotReadySince(timestamp time.Time) bool
IsNotReadySince returns true when the given member has not been ready since the given timestamp. That means it: - A) Was created before timestamp and never reached a ready state or - B) The Ready condition is set to false, and last transision is before timestamp
func (MemberStatus) RecentTerminationsSince ¶
func (s MemberStatus) RecentTerminationsSince(timestamp time.Time) int
RecentTerminationsSince returns the number of terminations since the given timestamp.
func (*MemberStatus) RemoveTerminationsBefore ¶
func (s *MemberStatus) RemoveTerminationsBefore(timestamp time.Time) int
RemoveTerminationsBefore removes all recent terminations before the given timestamp. It returns the number of terminations that have been removed.
type MemberStatusList ¶
type MemberStatusList []MemberStatus
MemberStatusList is a list of MemberStatus entries
func (MemberStatusList) AllMembersReady ¶
func (l MemberStatusList) AllMembersReady() bool
AllMembersReady returns the true if all members are in the Ready state.
func (MemberStatusList) ContainsID ¶
func (l MemberStatusList) ContainsID(id string) bool
ContainsID returns true if the given list contains a member with given ID.
func (MemberStatusList) DeepCopy ¶
func (in MemberStatusList) DeepCopy() MemberStatusList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MemberStatusList.
func (MemberStatusList) DeepCopyInto ¶
func (in MemberStatusList) DeepCopyInto(out *MemberStatusList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (MemberStatusList) ElementByID ¶
func (l MemberStatusList) ElementByID(id string) (MemberStatus, bool)
ElementByID returns the element in the given list that has the given ID and true. If no such element exists, false is returned.
func (MemberStatusList) ElementByPVCName ¶
func (l MemberStatusList) ElementByPVCName(pvcName string) (MemberStatus, bool)
ElementByPVCName returns the element in the given list that has the given PVC name and true. If no such element exists, an empty element and false is returned.
func (MemberStatusList) ElementByPodName ¶
func (l MemberStatusList) ElementByPodName(podName string) (MemberStatus, bool)
ElementByPodName returns the element in the given list that has the given pod name and true. If no such element exists, an empty element and false is returned.
func (MemberStatusList) MembersReady ¶
func (l MemberStatusList) MembersReady() int
MembersReady returns the number of members that are in the Ready state.
func (MemberStatusList) SelectMemberToRemove ¶
func (l MemberStatusList) SelectMemberToRemove() (MemberStatus, error)
SelectMemberToRemove selects a member from the given list that should be removed in a scale down action. Returns an error if the list is empty.
type MonitoringSpec ¶
type MonitoringSpec struct {
TokenSecretName *string `json:"tokenSecretName,omitempty"`
}
MonitoringSpec holds monitoring specific configuration settings
func (*MonitoringSpec) DeepCopy ¶
func (in *MonitoringSpec) DeepCopy() *MonitoringSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MonitoringSpec.
func (*MonitoringSpec) DeepCopyInto ¶
func (in *MonitoringSpec) DeepCopyInto(out *MonitoringSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (MonitoringSpec) GetTokenSecretName ¶
func (s MonitoringSpec) GetTokenSecretName() string
GetTokenSecretName returns the value of tokenSecretName.
func (*MonitoringSpec) SetDefaults ¶
func (s *MonitoringSpec) SetDefaults(defaultTokenSecretName string)
SetDefaults fills in missing defaults
func (*MonitoringSpec) SetDefaultsFrom ¶
func (s *MonitoringSpec) SetDefaultsFrom(source MonitoringSpec)
SetDefaultsFrom fills unspecified fields with a value from given source spec.
type Percent ¶
type Percent int
Percent is a percentage between 0 and 100.
func NewPercent ¶
NewPercent returns a reference to a percent with given value.
func NewPercentOrNil ¶
NewPercentOrNil returns nil if input is nil, otherwise returns a clone of the given value.
func PercentOrDefault ¶
PercentOrDefault returns the default value or 0 if input is nil, otherwise returns the referenced value.
type Plan ¶
type Plan []Action
Plan is a list of actions that will be taken to update a deployment. Only 1 action is in progress at a time. The operator will wait for that action to be completely and then remove the action.
func (Plan) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Plan.
func (Plan) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RocksDBEncryptionSpec ¶
type RocksDBEncryptionSpec struct {
KeySecretName *string `json:"keySecretName,omitempty"`
}
RocksDBEncryptionSpec holds rocksdb encryption at rest specific configuration settings
func (*RocksDBEncryptionSpec) DeepCopy ¶
func (in *RocksDBEncryptionSpec) DeepCopy() *RocksDBEncryptionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RocksDBEncryptionSpec.
func (*RocksDBEncryptionSpec) DeepCopyInto ¶
func (in *RocksDBEncryptionSpec) DeepCopyInto(out *RocksDBEncryptionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (RocksDBEncryptionSpec) GetKeySecretName ¶
func (s RocksDBEncryptionSpec) GetKeySecretName() string
GetKeySecretName returns the value of keySecretName.
func (RocksDBEncryptionSpec) IsEncrypted ¶
func (s RocksDBEncryptionSpec) IsEncrypted() bool
IsEncrypted returns true when an encryption key secret name is provided, false otherwise.
type RocksDBSpec ¶
type RocksDBSpec struct {
Encryption RocksDBEncryptionSpec `json:"encryption"`
}
RocksDBSpec holds rocksdb specific configuration settings
func (*RocksDBSpec) DeepCopy ¶
func (in *RocksDBSpec) DeepCopy() *RocksDBSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RocksDBSpec.
func (*RocksDBSpec) DeepCopyInto ¶
func (in *RocksDBSpec) DeepCopyInto(out *RocksDBSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (RocksDBSpec) IsEncrypted ¶
func (s RocksDBSpec) IsEncrypted() bool
IsEncrypted returns true when an encryption key secret name is provided, false otherwise.
func (RocksDBSpec) ResetImmutableFields ¶
func (s RocksDBSpec) ResetImmutableFields(fieldPrefix string, target *RocksDBSpec) []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 given field prefix.
func (*RocksDBSpec) SetDefaults ¶
func (s *RocksDBSpec) SetDefaults()
SetDefaults fills in missing defaults
func (*RocksDBSpec) SetDefaultsFrom ¶
func (s *RocksDBSpec) SetDefaultsFrom(source RocksDBSpec)
SetDefaultsFrom fills unspecified fields with a value from given source spec.
type SecretHashes ¶
type SecretHashes struct { // AuthJWT contains the hash of the auth.jwtSecretName secret AuthJWT string `json:"auth-jwt,omitempty"` // RocksDBEncryptionKey contains the hash of the rocksdb.encryption.keySecretName secret RocksDBEncryptionKey string `json:"rocksdb-encryption-key,omitempty"` // TLSCA contains the hash of the tls.caSecretName secret TLSCA string `json:"tls-ca,omitempty"` // SyncTLSCA contains the hash of the sync.tls.caSecretName secret SyncTLSCA string `json:"sync-tls-ca,omitempty"` }
SecretHashes keeps track of the value of secrets so we can detect changes. For each used secret, a sha256 hash is stored.
func (*SecretHashes) DeepCopy ¶
func (in *SecretHashes) DeepCopy() *SecretHashes
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretHashes.
func (*SecretHashes) DeepCopyInto ¶
func (in *SecretHashes) DeepCopyInto(out *SecretHashes)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServerGroup ¶
type ServerGroup int
const ( ServerGroupSingle ServerGroup = 1 ServerGroupAgents ServerGroup = 2 ServerGroupDBServers ServerGroup = 3 ServerGroupCoordinators ServerGroup = 4 ServerGroupSyncMasters ServerGroup = 5 ServerGroupSyncWorkers ServerGroup = 6 )
func (ServerGroup) AsRole ¶
func (g ServerGroup) AsRole() string
AsRole returns the "role" value for the given group.
func (ServerGroup) AsRoleAbbreviated ¶
func (g ServerGroup) AsRoleAbbreviated() string
AsRoleAbbreviated returns the abbreviation of the "role" value for the given group.
func (ServerGroup) DefaultTerminationGracePeriod ¶
func (g ServerGroup) DefaultTerminationGracePeriod() time.Duration
DefaultTerminationGracePeriod returns the default period between SIGTERM & SIGKILL for a server in the given group.
func (ServerGroup) IsArangod ¶
func (g ServerGroup) IsArangod() bool
IsArangod returns true when the groups runs servers of type `arangod`.
func (ServerGroup) IsArangosync ¶
func (g ServerGroup) IsArangosync() bool
IsArangosync returns true when the groups runs servers of type `arangosync`.
func (ServerGroup) IsStateless ¶
func (g ServerGroup) IsStateless() bool
IsStateless returns true when the groups runs servers without a persistent volume.
type ServerGroupSpec ¶
type ServerGroupSpec struct { // Count holds the requested number of servers Count *int `json:"count,omitempty"` // Args holds additional commandline arguments Args []string `json:"args,omitempty"` // StorageClassName specifies the classname for storage of the servers. StorageClassName *string `json:"storageClassName,omitempty"` // Resources holds resource requests & limits Resources v1.ResourceRequirements `json:"resources,omitempty"` // Tolerations specifies the tolerations added to Pods in this group. Tolerations []v1.Toleration `json:"tolerations,omitempty"` // ServiceAccountName specifies the name of the service account used for Pods in this group. ServiceAccountName *string `json:"serviceAccountName,omitempty"` }
ServerGroupSpec contains the specification for all servers in a specific group (e.g. all agents)
func (*ServerGroupSpec) DeepCopy ¶
func (in *ServerGroupSpec) DeepCopy() *ServerGroupSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerGroupSpec.
func (*ServerGroupSpec) DeepCopyInto ¶
func (in *ServerGroupSpec) DeepCopyInto(out *ServerGroupSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (ServerGroupSpec) GetArgs ¶
func (s ServerGroupSpec) GetArgs() []string
GetArgs returns the value of args.
func (ServerGroupSpec) GetCount ¶
func (s ServerGroupSpec) GetCount() int
GetCount returns the value of count.
func (ServerGroupSpec) GetServiceAccountName ¶
func (s ServerGroupSpec) GetServiceAccountName() string
GetServiceAccountName returns the value of serviceAccountName.
func (ServerGroupSpec) GetStorageClassName ¶
func (s ServerGroupSpec) GetStorageClassName() string
GetStorageClassName returns the value of storageClassName.
func (ServerGroupSpec) GetTolerations ¶
func (s ServerGroupSpec) GetTolerations() []v1.Toleration
GetTolerations returns the value of tolerations.
func (ServerGroupSpec) ResetImmutableFields ¶
func (s ServerGroupSpec) ResetImmutableFields(group ServerGroup, fieldPrefix string, target *ServerGroupSpec) []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.
func (*ServerGroupSpec) SetDefaults ¶
func (s *ServerGroupSpec) SetDefaults(group ServerGroup, used bool, mode DeploymentMode)
SetDefaults fills in missing defaults
func (*ServerGroupSpec) SetDefaultsFrom ¶
func (s *ServerGroupSpec) SetDefaultsFrom(source ServerGroupSpec)
SetDefaultsFrom fills unspecified fields with a value from given source spec.
func (ServerGroupSpec) Validate ¶
func (s ServerGroupSpec) Validate(group ServerGroup, used bool, mode DeploymentMode, env Environment) error
Validate the given group spec
type StorageEngine ¶
type StorageEngine string
StorageEngine specifies the type of storage engine used by the cluster
const ( // StorageEngineMMFiles yields a cluster using the mmfiles storage engine StorageEngineMMFiles StorageEngine = "MMFiles" // StorageEngineRocksDB yields a cluster using the rocksdb storage engine StorageEngineRocksDB StorageEngine = "RocksDB" )
func NewStorageEngine ¶
func NewStorageEngine(input StorageEngine) *StorageEngine
NewStorageEngine returns a reference to a string with given value.
func NewStorageEngineOrNil ¶
func NewStorageEngineOrNil(input *StorageEngine) *StorageEngine
NewStorageEngineOrNil returns nil if input is nil, otherwise returns a clone of the given value.
func StorageEngineOrDefault ¶
func StorageEngineOrDefault(input *StorageEngine, defaultValue ...StorageEngine) StorageEngine
StorageEngineOrDefault returns the default value (or empty string) if input is nil, otherwise returns the referenced value.
func (StorageEngine) AsArangoArgument ¶
func (se StorageEngine) AsArangoArgument() string
AsArangoArgument returns the value for the given storage engine as it is to be used for arangod's --server.storage-engine option.
func (StorageEngine) Validate ¶
func (se StorageEngine) Validate() error
Validate the storage engine. Return errors when validation fails, nil on success.
type SyncAuthenticationSpec ¶
type SyncAuthenticationSpec struct { JWTSecretName *string `json:"jwtSecretName,omitempty"` // JWT secret for sync masters ClientCASecretName *string `json:"clientCASecretName,omitempty"` // Secret containing client authentication CA }
SyncAuthenticationSpec holds dc2dc sync authentication specific configuration settings
func (*SyncAuthenticationSpec) DeepCopy ¶
func (in *SyncAuthenticationSpec) DeepCopy() *SyncAuthenticationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SyncAuthenticationSpec.
func (*SyncAuthenticationSpec) DeepCopyInto ¶
func (in *SyncAuthenticationSpec) DeepCopyInto(out *SyncAuthenticationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (SyncAuthenticationSpec) GetClientCASecretName ¶
func (s SyncAuthenticationSpec) GetClientCASecretName() string
GetClientCASecretName returns the value of clientCASecretName.
func (SyncAuthenticationSpec) GetJWTSecretName ¶
func (s SyncAuthenticationSpec) GetJWTSecretName() string
GetJWTSecretName returns the value of jwtSecretName.
func (SyncAuthenticationSpec) ResetImmutableFields ¶
func (s SyncAuthenticationSpec) ResetImmutableFields(fieldPrefix string, target *SyncAuthenticationSpec) []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 given field prefix.
func (*SyncAuthenticationSpec) SetDefaults ¶
func (s *SyncAuthenticationSpec) SetDefaults(defaultJWTSecretName, defaultClientCASecretName string)
SetDefaults fills in missing defaults
func (*SyncAuthenticationSpec) SetDefaultsFrom ¶
func (s *SyncAuthenticationSpec) SetDefaultsFrom(source SyncAuthenticationSpec)
SetDefaultsFrom fills unspecified fields with a value from given source spec.
func (SyncAuthenticationSpec) Validate ¶
func (s SyncAuthenticationSpec) Validate() error
Validate the given spec
type SyncExternalAccessSpec ¶
type SyncExternalAccessSpec struct { ExternalAccessSpec MasterEndpoint []string `json:"masterEndpoint,omitempty"` AccessPackageSecretNames []string `json:"accessPackageSecretNames,omitempty"` }
SyncExternalAccessSpec holds configuration for the external access provided for the sync deployment.
func (*SyncExternalAccessSpec) DeepCopy ¶
func (in *SyncExternalAccessSpec) DeepCopy() *SyncExternalAccessSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SyncExternalAccessSpec.
func (*SyncExternalAccessSpec) DeepCopyInto ¶
func (in *SyncExternalAccessSpec) DeepCopyInto(out *SyncExternalAccessSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (SyncExternalAccessSpec) GetAccessPackageSecretNames ¶
func (s SyncExternalAccessSpec) GetAccessPackageSecretNames() []string
GetAccessPackageSecretNames returns the value of accessPackageSecretNames.
func (SyncExternalAccessSpec) GetMasterEndpoint ¶
func (s SyncExternalAccessSpec) GetMasterEndpoint() []string
GetMasterEndpoint returns the value of masterEndpoint.
func (SyncExternalAccessSpec) ResetImmutableFields ¶
func (s SyncExternalAccessSpec) ResetImmutableFields(fieldPrefix string, target *SyncExternalAccessSpec) []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 given field prefix.
func (SyncExternalAccessSpec) ResolveMasterEndpoint ¶
func (s SyncExternalAccessSpec) ResolveMasterEndpoint(syncServiceHostName string, syncServicePort int) []string
ResolveMasterEndpoint returns the value of `--master.endpoint` option passed to arangosync.
func (*SyncExternalAccessSpec) SetDefaults ¶
func (s *SyncExternalAccessSpec) SetDefaults()
SetDefaults fills in missing defaults
func (*SyncExternalAccessSpec) SetDefaultsFrom ¶
func (s *SyncExternalAccessSpec) SetDefaultsFrom(source SyncExternalAccessSpec)
SetDefaultsFrom fills unspecified fields with a value from given source spec.
func (SyncExternalAccessSpec) Validate ¶
func (s SyncExternalAccessSpec) Validate() error
Validate the given spec
type SyncSpec ¶
type SyncSpec struct { Enabled *bool `json:"enabled,omitempty"` ExternalAccess SyncExternalAccessSpec `json:"externalAccess"` Authentication SyncAuthenticationSpec `json:"auth"` TLS TLSSpec `json:"tls"` Monitoring MonitoringSpec `json:"monitoring"` }
SyncSpec holds dc2dc replication specific configuration settings
func (*SyncSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SyncSpec.
func (*SyncSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (SyncSpec) ResetImmutableFields ¶
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 given field prefix.
func (*SyncSpec) SetDefaults ¶
func (s *SyncSpec) SetDefaults(defaultJWTSecretName, defaultClientAuthCASecretName, defaultTLSCASecretName, defaultMonitoringSecretName string)
SetDefaults fills in missing defaults
func (*SyncSpec) SetDefaultsFrom ¶
SetDefaultsFrom fills unspecified fields with a value from given source spec.
func (SyncSpec) Validate ¶
func (s SyncSpec) Validate(mode DeploymentMode) error
Validate the given spec
type TLSSpec ¶
type TLSSpec struct { CASecretName *string `json:"caSecretName,omitempty"` AltNames []string `json:"altNames,omitempty"` TTL *Duration `json:"ttl,omitempty"` }
TLSSpec holds TLS specific configuration settings
func (*TLSSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSSpec.
func (*TLSSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (TLSSpec) GetAltNames ¶
GetAltNames returns the value of altNames.
func (TLSSpec) GetCASecretName ¶
GetCASecretName returns the value of caSecretName.
func (TLSSpec) GetParsedAltNames ¶
GetParsedAltNames splits the list of AltNames into DNS names, IP addresses & email addresses. When an entry is not valid for any of those categories, an error is returned.
func (*TLSSpec) SetDefaults ¶
SetDefaults fills in missing defaults
func (*TLSSpec) SetDefaultsFrom ¶
SetDefaultsFrom fills unspecified fields with a value from given source spec.
Source Files ¶
- authentication_spec.go
- chaos_spec.go
- conditions.go
- deployment.go
- deployment_mode.go
- deployment_phase.go
- deployment_spec.go
- deployment_status.go
- deployment_status_members.go
- doc.go
- duration.go
- environment.go
- errors.go
- external_access_spec.go
- external_access_type.go
- image_info.go
- member_phase.go
- member_status.go
- member_status_list.go
- monitoring_spec.go
- percent.go
- plan.go
- register.go
- rocksdb_spec.go
- secret_hashes.go
- server_group.go
- server_group_spec.go
- storage_engine.go
- sync_authentication_spec.go
- sync_external_access_spec.go
- sync_spec.go
- tls_spec.go
- zz_generated.deepcopy.go