Documentation ¶
Index ¶
- Constants
- func CreatePersistentVolumeClaimName(deploymentName, role, id string) string
- func CreatePodHostName(deploymentName, role, id string) string
- func FixupResourceName(name string) string
- func PrefixResourceError(prefix string, err error) error
- func PrefixResourceErrors(prefix string, errs ...error) error
- func RenderResourceName(in string, keys map[string]string) string
- func StripArangodPrefix(id string) string
- func ValidateOptionalResourceName(name string) error
- func ValidateResourceName(name string) error
- func WithErrors(errs ...error) error
- type MergedErrors
- type ResourceError
Constants ¶
const ( // Arango constants ArangoPort = 8529 ArangoSyncMasterPort = 8629 ArangoSyncWorkerPort = 8729 ArangoExporterPort = 9101 ArangoExporterStatusEndpoint = "/_api/version" ArangoExporterClusterHealthEndpoint = "/_admin/cluster/health" ArangoExporterInternalEndpoint = "/_admin/metrics" ArangoExporterInternalEndpointV2 = "/_admin/metrics/v2" ArangoExporterDefaultEndpoint = "/metrics" ArangoSyncStatusEndpoint = "/_api/version" // K8s constants ClusterIPNone = "None" TopologyKeyHostname = "kubernetes.io/hostname" NodeArchAffinityLabel = "kubernetes.io/arch" NodeArchAffinityLabelBeta = "beta.kubernetes.io/arch" // Pod constants ServerContainerName = "server" ExporterContainerName = "exporter" ArangodVolumeName = "arangod-data" TlsKeyfileVolumeName = "tls-keyfile" ClientAuthCAVolumeName = "client-auth-ca" ClusterJWTSecretVolumeName = "cluster-jwt" MasterJWTSecretVolumeName = "master-jwt" LifecycleVolumeName = "lifecycle" FoxxAppEphemeralVolumeName = "ephemeral-apps" TMPEphemeralVolumeName = "ephemeral-tmp" ArangoDTimezoneVolumeName = "arangod-timezone" RocksdbEncryptionVolumeName = "rocksdb-encryption" ExporterJWTVolumeName = "exporter-jwt" ArangodVolumeMountDir = "/data" RocksDBEncryptionVolumeMountDir = "/secrets/rocksdb/encryption" TLSKeyfileVolumeMountDir = "/secrets/tls" TLSSNIKeyfileVolumeMountDir = "/secrets/sni" ClientAuthCAVolumeMountDir = "/secrets/client-auth/ca" ClusterJWTSecretVolumeMountDir = "/secrets/cluster/jwt" ExporterJWTVolumeMountDir = "/secrets/exporter/jwt" MasterJWTSecretVolumeMountDir = "/secrets/master/jwt" ServerPortName = "server" ExporterPortName = "exporter" )
Variables ¶
This section is empty.
Functions ¶
func CreatePersistentVolumeClaimName ¶
CreatePersistentVolumeClaimName returns the name of the persistent volume claim for a member with a given id in a deployment with a given name.
func CreatePodHostName ¶
CreatePodHostName returns the hostname of the pod for a member with a given id in a deployment with a given name.
func FixupResourceName ¶
FixupResourceName ensures that the given name complies with kubernetes name requirements. If the name is too long or contains invalid characters, it will be adjusted and a hash will be added.
func PrefixResourceError ¶
PrefixResourceError creates new prefixed error. If error is already prefixed then current key is appended
func PrefixResourceErrors ¶
PrefixResourceErrors creates new prefixed errors. If error is already prefixed then current key is appended
func StripArangodPrefix ¶
StripArangodPrefix removes well know arangod ID prefixes from the given id.
func ValidateOptionalResourceName ¶
ValidateOptionalResourceName validates a kubernetes resource name. If not empty and not valid, an error is returned.
func ValidateResourceName ¶
ValidateResourceName validates a kubernetes resource name. If not valid, an error is returned. See https://kubernetes.io/docs/concepts/overview/working-with-objects/names/
Types ¶
type MergedErrors ¶
type MergedErrors struct {
// contains filtered or unexported fields
}
func (MergedErrors) Error ¶
func (m MergedErrors) Error() string
func (MergedErrors) Errors ¶
func (m MergedErrors) Errors() []error
type ResourceError ¶
func (ResourceError) Error ¶
func (p ResourceError) Error() string
Error return string representation of error