Documentation ¶
Index ¶
- Constants
- func CheckStatefulSet(etcdReplicas int32, statefulSet *appsv1.StatefulSet) error
- func GetClientServiceName(etcd *druidv1alpha1.Etcd) string
- func GetConfigmapName(etcd *druidv1alpha1.Etcd) string
- func GetCronJobName(etcd *druidv1alpha1.Etcd) string
- func GetDeltaSnapshotLeaseName(etcd *druidv1alpha1.Etcd) string
- func GetFullSnapshotLeaseName(etcd *druidv1alpha1.Etcd) string
- func GetJobName(etcd *druidv1alpha1.Etcd) string
- func GetOrdinalPodName(etcd *druidv1alpha1.Etcd, order int) string
- func GetPeerServiceName(etcd *druidv1alpha1.Etcd) string
- func GetServiceAccountName(etcd *druidv1alpha1.Etcd) string
- func GetStoreValues(ctx context.Context, client client.Client, store *druidv1alpha1.StoreSpec, ...) (map[string]interface{}, error)
- func IsPodInCrashloopBackoff(status v1.PodStatus) bool
- func Key(namespaceOrName string, nameOpt ...string) client.ObjectKey
- func Max(x, y int) int
- func MergeMaps(a, b map[string]interface{}) map[string]interface{}
- func MergeStringMaps(oldMap map[string]string, newMaps ...map[string]string) map[string]string
- func StorageProviderFromInfraProvider(infra *druidv1alpha1.StorageProvider) (string, error)
- func TimeElapsed(timestamp *metav1.Time, duration time.Duration) bool
Constants ¶
const ( // LocalProviderDefaultMountPath is the default path where the buckets directory is mounted. LocalProviderDefaultMountPath = "/etc/gardener/local-backupbuckets" // EtcdBackupSecretHostPath is the hostPath field in the etcd-backup secret. EtcdBackupSecretHostPath = "hostPath" )
const ( // S3 is a constant for the AWS and S3 compliant storage provider. S3 = "S3" // ABS is a constant for the Azure storage provider. ABS = "ABS" // GCS is a constant for the Google storage provider. GCS = "GCS" // OSS is a constant for the Alicloud storage provider. OSS = "OSS" // Swift is a constant for the OpenStack storage provider. Swift = "Swift" // Local is a constant for the Local storage provider. Local = "Local" // ECS is a constant for the EMC storage provider. ECS = "ECS" // OSC is a constant for the OpenShift storage provider. OCS = "OCS" )
Variables ¶
This section is empty.
Functions ¶
func CheckStatefulSet ¶ added in v0.12.0
func CheckStatefulSet(etcdReplicas int32, statefulSet *appsv1.StatefulSet) error
CheckStatefulSet checks whether the given StatefulSet is healthy. A StatefulSet is considered healthy if its controller observed its current revision, it is not in an update (i.e. UpdateRevision is empty) and if its current replicas are equal to desired replicas specified in ETCD specs.
func GetClientServiceName ¶ added in v0.9.0
func GetClientServiceName(etcd *druidv1alpha1.Etcd) string
GetClientServiceName returns the client service name of ETCD cluster reachable by external client
func GetConfigmapName ¶ added in v0.9.0
func GetConfigmapName(etcd *druidv1alpha1.Etcd) string
GetConfigmapName returns the name of the configmap based on the given `etcd` object.
func GetCronJobName ¶ added in v0.9.0
func GetCronJobName(etcd *druidv1alpha1.Etcd) string
GetCronJobName returns the legacy compaction cron job name
func GetDeltaSnapshotLeaseName ¶ added in v0.12.0
func GetDeltaSnapshotLeaseName(etcd *druidv1alpha1.Etcd) string
GetDeltaSnapshotLeaseName returns the name of the delta snapshot lease based on the given `etcd` object.
func GetFullSnapshotLeaseName ¶ added in v0.12.0
func GetFullSnapshotLeaseName(etcd *druidv1alpha1.Etcd) string
GetFullSnapshotLeaseName returns the name of the full snapshot lease based on the given `etcd` object.
func GetJobName ¶ added in v0.9.0
func GetJobName(etcd *druidv1alpha1.Etcd) string
GetJobName returns the compaction job name
func GetOrdinalPodName ¶ added in v0.9.0
func GetOrdinalPodName(etcd *druidv1alpha1.Etcd, order int) string
GetOrdinalPodName returns the ETCD pod name based on the order
func GetPeerServiceName ¶ added in v0.9.0
func GetPeerServiceName(etcd *druidv1alpha1.Etcd) string
GetPeerServiceName returns the peer service name of ETCD cluster reachable by members within the ETCD cluster
func GetServiceAccountName ¶ added in v0.9.0
func GetServiceAccountName(etcd *druidv1alpha1.Etcd) string
GetServiceAccountName returns the service account name
func GetStoreValues ¶ added in v0.7.0
func GetStoreValues(ctx context.Context, client client.Client, store *druidv1alpha1.StoreSpec, namespace string) (map[string]interface{}, error)
GetStoreValues converts the values in the StoreSpec to a map, or returns an error if the storage provider is unsupported.
func IsPodInCrashloopBackoff ¶ added in v0.1.4
IsPodInCrashloopBackoff checks if the pod is in CrashloopBackoff from its status fields.
func Key ¶
Key creates a new client.ObjectKey from the given parameters. There are only two ways to call this function:
- If only namespaceOrName is set, then a client.ObjectKey with name set to namespaceOrName is returned.
- If namespaceOrName and one nameOpt is given, then a client.ObjectKey with namespace set to namespaceOrName and name set to nameOpt[0] is returned.
For all other cases, this method panics.
func MergeMaps ¶
MergeMaps takes two maps <a>, <b> and merges them. If <b> defines a value with a key already existing in the <a> map, the <a> value for that key will be overwritten.
func MergeStringMaps ¶
MergeStringMaps merges the content of the newMaps with the oldMap. If a key already exists then it gets overwritten by the last value with the same key.
func StorageProviderFromInfraProvider ¶
func StorageProviderFromInfraProvider(infra *druidv1alpha1.StorageProvider) (string, error)
StorageProviderFromInfraProvider converts infra to object store provider.
Types ¶
This section is empty.