Documentation
¶
Index ¶
- func ResourceAlreadyExists(err error) bool
- func ResourceNotFound(err error) bool
- func RestConfig(kubeConfig string, outOfCluster bool) (*rest.Config, error)
- func SameLogicalBackupJob(cur, new *batchv1beta1.CronJob) (match bool, reason string)
- func SamePDB(cur, new *policybeta1.PodDisruptionBudget) (match bool, reason string)
- func SameService(cur, new *v1.Service) (match bool, reason string)
- type KubernetesClient
- type MockConfigMapsGetter
- type MockSecretGetter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResourceAlreadyExists ¶
ResourceAlreadyExists checks if error corresponds to Already exists error
func ResourceNotFound ¶
ResourceNotFound checks if error corresponds to Not found error
func RestConfig ¶
RestConfig creates REST config
func SameLogicalBackupJob ¶ added in v1.2.0
func SameLogicalBackupJob(cur, new *batchv1beta1.CronJob) (match bool, reason string)
SameLogicalBackupJob compares Specs of logical backup cron jobs
func SamePDB ¶
func SamePDB(cur, new *policybeta1.PodDisruptionBudget) (match bool, reason string)
SamePDB compares the PodDisruptionBudgets
Types ¶
type KubernetesClient ¶
type KubernetesClient struct { corev1.SecretsGetter corev1.ServicesGetter corev1.EndpointsGetter corev1.PodsGetter corev1.PersistentVolumesGetter corev1.PersistentVolumeClaimsGetter corev1.ConfigMapsGetter corev1.NodesGetter corev1.NamespacesGetter corev1.ServiceAccountsGetter appsv1.StatefulSetsGetter rbacv1beta1.RoleBindingsGetter policyv1beta1.PodDisruptionBudgetsGetter apiextbeta1.CustomResourceDefinitionsGetter clientbatchv1beta1.CronJobsGetter RESTClient rest.Interface AcidV1ClientSet *acidv1client.Clientset }
KubernetesClient describes getters for Kubernetes objects
func NewFromConfig ¶
func NewFromConfig(cfg *rest.Config) (KubernetesClient, error)
NewFromConfig create Kubernetes Interface using REST config
func NewMockKubernetesClient ¶ added in v1.2.0
func NewMockKubernetesClient() KubernetesClient
NewMockKubernetesClient for other tests
type MockConfigMapsGetter ¶ added in v1.2.0
type MockConfigMapsGetter struct { }
func (*MockConfigMapsGetter) ConfigMaps ¶ added in v1.2.0
func (c *MockConfigMapsGetter) ConfigMaps(namespace string) corev1.ConfigMapInterface
ConfigMaps to be mocked
type MockSecretGetter ¶ added in v1.2.0
type MockSecretGetter struct { }
func (*MockSecretGetter) Secrets ¶ added in v1.2.0
func (c *MockSecretGetter) Secrets(namespace string) corev1.SecretInterface
Secrets to be mocked
Click to show internal directories.
Click to hide internal directories.