Documentation ¶
Index ¶
- func Int32ToPointer(value int32) *int32
- func ResourceAlreadyExists(err error) bool
- func ResourceNotFound(err error) bool
- func RestConfig(kubeConfig string, outOfCluster bool) (*rest.Config, error)
- func SameLogicalBackupJob(cur, new *batchv1.CronJob) (match bool, reason string)
- func SamePDB(cur, new *apipolicyv1.PodDisruptionBudget) (match bool, reason string)
- func StringToPointer(str string) *string
- func UInt32ToPointer(value uint32) *uint32
- type KubernetesClient
- type MockConfigMapsGetter
- type MockDeploymentGetter
- type MockDeploymentNotExistGetter
- type MockSecretGetter
- type MockServiceGetter
- type MockServiceNotExistGetter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Int32ToPointer ¶
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 ¶
SameLogicalBackupJob compares Specs of logical backup cron jobs
func SamePDB ¶
func SamePDB(cur, new *apipolicyv1.PodDisruptionBudget) (match bool, reason string)
SamePDB compares the PodDisruptionBudgets
func StringToPointer ¶
func UInt32ToPointer ¶
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 corev1.EventsGetter appsv1.StatefulSetsGetter appsv1.DeploymentsGetter rbacv1.RoleBindingsGetter policyv1.PodDisruptionBudgetsGetter apiextv1.CustomResourceDefinitionsGetter clientbatchv1.CronJobsGetter acidv1.OperatorConfigurationsGetter acidv1.PostgresTeamsGetter acidv1.PostgresqlsGetter cosmicrocksv1.FabricEventStreamsGetter RESTClient rest.Interface AcidV1ClientSet *cosmicclient.Clientset CosmicRocksv1ClientSet *cosmicclient.Clientset }
KubernetesClient describes getters for Kubernetes objects
func ClientMissingObjects ¶
func ClientMissingObjects() KubernetesClient
func NewFromConfig ¶
func NewFromConfig(cfg *rest.Config) (KubernetesClient, error)
NewFromConfig create Kubernetes Interface using REST config
func NewMockKubernetesClient ¶
func NewMockKubernetesClient() KubernetesClient
NewMockKubernetesClient for other tests
func (*KubernetesClient) SetPostgresCRDStatus ¶
func (client *KubernetesClient) SetPostgresCRDStatus(clusterName spec.NamespacedName, status string) (*apiacidv1.Postgresql, error)
SetPostgresCRDStatus of Postgres cluster
type MockConfigMapsGetter ¶
type MockConfigMapsGetter struct { }
func (*MockConfigMapsGetter) ConfigMaps ¶
func (mock *MockConfigMapsGetter) ConfigMaps(namespace string) corev1.ConfigMapInterface
ConfigMaps to be mocked
type MockDeploymentGetter ¶
type MockDeploymentGetter struct { }
func (*MockDeploymentGetter) Deployments ¶
func (mock *MockDeploymentGetter) Deployments(namespace string) appsv1.DeploymentInterface
type MockDeploymentNotExistGetter ¶
type MockDeploymentNotExistGetter struct { }
func (*MockDeploymentNotExistGetter) Deployments ¶
func (mock *MockDeploymentNotExistGetter) Deployments(namespace string) appsv1.DeploymentInterface
type MockSecretGetter ¶
type MockSecretGetter struct { }
func (*MockSecretGetter) Secrets ¶
func (mock *MockSecretGetter) Secrets(namespace string) corev1.SecretInterface
Secrets to be mocked
type MockServiceGetter ¶
type MockServiceGetter struct { }
func (*MockServiceGetter) Services ¶
func (mock *MockServiceGetter) Services(namespace string) corev1.ServiceInterface
type MockServiceNotExistGetter ¶
type MockServiceNotExistGetter struct { }
func (*MockServiceNotExistGetter) Services ¶
func (mock *MockServiceNotExistGetter) Services(namespace string) corev1.ServiceInterface
Click to show internal directories.
Click to hide internal directories.