package
0.0.0-20180911130330-d3ccc4fb1d66
Repository: https://github.com/rglyons/kube-arangodb.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# Functions

AddTolerationIfNotFound adds the given tolerations, if no such toleration has been set in the given source.
ConvertImageID2Image converts a ImageID from a ContainerStatus to an Image that can be used in a Container specification.
CreateArangodPod creates a Pod that runs `arangod`.
CreateArangoSyncPod creates a Pod that runs `arangosync`.
CreateCASecret creates a secret used to store a PEM encoded CA certificate & private key.
CreateDatabaseClientService prepares and creates a service in k8s, used by database clients within the k8s cluster.
CreateDatabaseClientServiceDNSName returns the DNS of the database client service.
CreateDatabaseClientServiceName returns the name of the service used by database clients for the given deployment name.
CreateDatabaseExternalAccessServiceName returns the name of the service used to access the database from output the kubernetes cluster.
CreateEncryptionKeySecret creates a secret used to store a RocksDB encryption key.
CreateExternalAccessService prepares and creates a service in k8s, used to access the database/sync from outside k8s cluster.
CreateHeadlessService prepares and creates a headless service in k8s, used to provide a stable DNS name for all pods.
CreateHeadlessServiceName returns the name of the headless service for the given deployment name.
CreatePersistentVolumeClaim creates a persistent volume claim with given name and configuration.
CreatePersistentVolumeClaimName returns the name of the persistent volume claim for a member with a given id in a deployment with a given name.
CreatePodDNSName returns the DNS of a pod with a given role & id in a given deployment.
CreatePodHostName returns the hostname of the pod for a member with a given id in a deployment with a given name.
CreatePodName returns the name of the pod for a member with a given id in a deployment with a given name.
CreateServiceURL creates a URL used to reach the given service.
CreateSyncMasterClientServiceDNSName returns the DNS of the syncmaster client service.
CreateSyncMasterClientServiceName returns the name of the service used by syncmaster clients for the given deployment name.
CreateTLSKeyfileSecret creates a secret used to store a PEM encoded keyfile in the format ArangoDB accepts it for its `--ssl.keyfile` option.
CreateTLSKeyfileSecretName returns the name of the Secret that holds the TLS keyfile for a member with a given id in a deployment with a given name.
CreateTokenSecret creates a secret with given name in given namespace with a given token as value.
DeploymentListOpt creates a ListOptions matching all labels for the given deployment name.
GetBasicAuthSecret loads a secret with given name in the given namespace and extracts the `username` & `password` field.
GetCACertficateSecret loads a secret with given name in the given namespace and extracts the `ca.crt` field.
GetCASecret loads a secret with given name in the given namespace and extracts the `ca.crt` & `ca.key` field.
GetContainerByName returns the container in the given pod with the given name.
GetPodOwner returns the ReplicaSet that owns the given Pod.
GetReplicaSetOwner returns the Deployment that owns the given ReplicaSet.
GetTLSKeyfileSecret loads a secret used to store a PEM encoded keyfile in the format ArangoDB accepts it for its `--ssl.keyfile` option.
GetTokenSecret loads the token secret from a Secret with given name.
InClusterConfig loads the environment into a rest config.
IsAlreadyExists returns true if the given error is or is caused by a kubernetes AlreadyExistsError,.
IsArangoDBImageIDAndVersionPod returns true if the given pod is used for fetching image ID and ArangoDB version of an image.
IsConflict returns true if the given error is or is caused by a kubernetes ConflictError,.
IsNotFound returns true if the given error is or is caused by a kubernetes NotFoundError,.
IsPersistentVolumeClaimMarkedForDeletion returns true if the pod has been marked for deletion.
IsPodFailed returns true if all containers of the pod have terminated and at least one of them wih a non-zero exit code.
IsPodMarkedForDeletion returns true if the pod has been marked for deletion.
IsPodNotScheduledFor returns true if the pod has not been scheduled for longer than the given duration.
IsPodReady returns true if the PodReady condition on the given pod is set to true.
IsPodScheduled returns true if the pod has been scheduled.
IsPodSucceeded returns true if all containers of the pod have terminated with exit code 0.
IsPodTerminating returns true if the pod has been marked for deletion but is still running.
LabelsForDeployment returns a map of labels, given to all resources for given deployment name.
LabelsForLocalStorage returns a map of labels, given to all resources for given local storage name.
LocalStorageListOpt creates a ListOptions matching all labels for the given local storage name.
NewAccessPackageCreatedEvent creates an event indicating that a secret containing an access package has been created.
NewAccessPackageDeletedEvent creates an event indicating that a secret containing an access package has been deleted.
NewCannotChangeStorageClassEvent creates an event indicating that an item would need to use a different StorageClass, but this is not possible for the given reason.
NewDowntimeNotAllowedEvent creates an event indicating that an operation cannot be executed because downtime is currently not allowed.
NewErrorEvent creates an even of type error.
NewImmutableFieldEvent creates an event indicating that an attempt was made to change a field that is immutable.
NewKubeClient creates a new k8s client.
NewKubeExtClient creates a new k8s api extensions client.
NewMemberAddEvent creates an event indicating that a member was added.
NewMemberRemoveEvent creates an event indicating that an existing member was removed.
NewNoExecuteToleration is a helper to create a Toleration with Key=key, Operator='Exists' Effect='NoExecute', TolerationSeconds=tolerationDuration.Seconds().
NewPersistentVolumeClaimCache creates a cached version of the given PersistentVolumeClaimInterface.
NewPlanAbortedEvent creates an event indicating that an item on a reconciliation plan wants to abort the entire plan.
NewPlanTimeoutEvent creates an event indicating that an item on a reconciliation plan did not finish before its deadline.
NewPodCreatedEvent creates an event indicating that a pod has been created.
NewPodGoneEvent creates an event indicating that a pod is missing.
NewPodsSchedulingFailureEvent creates an event indicating that one of more cannot be scheduled.
NewPodsSchedulingResolvedEvent creates an event indicating that an earlier problem with pod scheduling has been resolved.
NewResourceWatcher creates a helper that watches for changes in a resource of a specific type.
NewSecretCache creates a cached version of the given SecretInterface.
NewSecretsChangedEvent creates an event indicating that one of more secrets have changed.
NewSecretsRestoredEvent creates an event indicating that all secrets have been restored to their original values.
NewServiceCache creates a cached version of the given ServiceInterface.
NewUpgradeNotAllowedEvent creates an event indicating that an upgrade (or downgrade) is not allowed.
PatchStorageClassIsDefault changes the default flag of the given storage class.
RemoveFinalizers is a helper used to remove finalizers from an object.
RemovePodFinalizers removes the given finalizers from the given pod.
RemovePVCFinalizers removes the given finalizers from the given PVC.
StorageClassIsDefault returns true if the given storage class is marked default, false otherwise.
ValidateCACertificateSecret checks that a secret with given name in given namespace exists and it contains a 'ca.crt' data field.
ValidateEncryptionKeySecret checks that a secret with given name in given namespace exists and it contains a 'key' data field of exactly 32 bytes.
ValidateOptionalResourceName validates a kubernetes resource name.
ValidateResourceName validates a kubernetes resource name.
ValidateTokenSecret checks that a secret with given name in given namespace exists and it contains a 'token' data field.

# Constants

AppName is the fixed value for the "app" label.
No description provided by the author
Arango constants.
No description provided by the author
No description provided by the author
No description provided by the author
K8s constants.
No description provided by the author
Role use by identification pods.
No description provided by the author
No description provided by the author
LabelKeyApp is the key of the label used to store the application name in (fixed to AppName).
LabelKeyArangoDeployment is the key of the label used to store the ArangoDeployment name in.
LabelKeyArangoLocalStorage is the key of the label used to store the ArangoLocalStorage name in.
LabelKeyRole is the key of the label used to store the role of the resource in.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

EnvValue is a helper structure for environment variable sources.
Event is used to create events using an EventRecorder.
HTTPProbeConfig contains settings for creating a liveness/readiness probe.
ResourceWatcher is a helper to watch for events in a specific type of resource.
TolerationDuration is a duration spec for tolerations.

# Interfaces

APIObject helps to abstract an object from our custom API.
PersistentVolumeClaimInterface has methods to work with PersistentVolumeClaim resources.
SecretInterface has methods to work with Secret resources.
ServiceInterface has methods to work with Service resources.