util

package
v0.0.0-...-31fda41 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2020 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolPointer

func BoolPointer(b bool) *bool

func CreationSpecsEqual

func CreationSpecsEqual(m1 metav1.ObjectMeta, m2 metav1.ObjectMeta) bool

func DeviceIntToString

func DeviceIntToString(i int) string

func DeviceLabels

func DeviceLabels(cr *androidv1alpha1.AndroidDevice) map[string]string

func GetClusterSuffix

func GetClusterSuffix() string

func GetPodADBPort

func GetPodADBPort(pod corev1.Pod) (int32, error)

func Int64Ptr

func Int64Ptr(i int64) *int64

func IntFromDeviceString

func IntFromDeviceString(s string) (int, error)

func IsFarmedDevice

func IsFarmedDevice(cr *androidv1alpha1.AndroidDevice) bool

func IsMarkedForDeletion

func IsMarkedForDeletion(cr *androidv1alpha1.AndroidFarm) bool

func ReconcileCertificate

func ReconcileCertificate(reqLogger logr.Logger, c client.Client, cert *cm.Certificate, wait bool) error

func ReconcileConfigMap

func ReconcileConfigMap(reqLogger logr.Logger, c client.Client, cm *corev1.ConfigMap) error

ReconcileConfigMap will reconcile a given configmap definition with the cluster.

func ReconcileDeployment

func ReconcileDeployment(reqLogger logr.Logger, c client.Client, deployment *appsv1.Deployment, wait bool) error

ReconcileDeployment reconciles a given deployment configuration with the cluster. If wait is true, then the deployment is checked for readiness and requeued if not all replicas are available.

func ReconcileDevice

func ReconcileDevice(reqLogger logr.Logger, c client.Client, device *androidv1alpha1.AndroidDevice, checkUpdate func(string) bool) error

ReconcileDevice reconciles an AndroidDevice CR with the cluster. The checkUpdate function provided will be called if an update is required. If the function returns false, the request is requeued.

func ReconcileJob

func ReconcileJob(reqLogger logr.Logger, c client.Client, job *batchv1.Job, wait bool) error

ReconcileJob will ensure a job runs on the cluster. If wait is true, the request will be requeued if the job exists and has not yet completed.

func ReconcilePod

func ReconcilePod(reqLogger logr.Logger, c client.Client, pod *corev1.Pod) (bool, error)

ReconcilePod will reconcile a given pod definition with the cluster. If a pod with the same name exists but has a different configuration, the pod will be deleted and requeued. If the found pod has a deletion timestamp (e.g. it is still terminating) then the request will also be requued.

func ReconcileService

func ReconcileService(reqLogger logr.Logger, c client.Client, svc *corev1.Service) error

ReconcileService will reconcile a provided service spec with the cluster.

func ReconcileStatefulSet

func ReconcileStatefulSet(reqLogger logr.Logger, c client.Client, ss *appsv1.StatefulSet) error

ReconcileStatefulSet reconciles a statefulset configuration with the cluster.

func SetCreationSpecAnnotation

func SetCreationSpecAnnotation(meta *metav1.ObjectMeta, obj runtime.Object) error

Types

type FarmReconcileFunc

type FarmReconcileFunc func(logr.Logger, *androidv1alpha1.AndroidFarm) error

Directories

Path Synopsis
adb

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL