k8sutil

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2021 License: MIT Imports: 26 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Int32ToPointer added in v1.5.0

func Int32ToPointer(value int32) *int32

func ResourceAlreadyExists

func ResourceAlreadyExists(err error) bool

ResourceAlreadyExists checks if error corresponds to Already exists error

func ResourceNotFound

func ResourceNotFound(err error) bool

ResourceNotFound checks if error corresponds to Not found error

func RestConfig

func RestConfig(kubeConfig string, outOfCluster bool) (*rest.Config, error)

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

func SameService

func SameService(cur, new *v1.Service) (match bool, reason string)

SameService compares the Services

Types

type KubernetesClient

KubernetesClient describes getters for Kubernetes objects

func ClientMissingObjects added in v1.5.0

func ClientMissingObjects() KubernetesClient

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

func (*KubernetesClient) SetPostgresCRDStatus added in v1.6.0

func (client *KubernetesClient) SetPostgresCRDStatus(clusterName spec.NamespacedName, status string) (*apiacidv1.Postgresql, error)

SetPostgresCRDStatus of Postgres cluster

type MockConfigMapsGetter added in v1.2.0

type MockConfigMapsGetter struct {
}

func (*MockConfigMapsGetter) ConfigMaps added in v1.2.0

func (mock *MockConfigMapsGetter) ConfigMaps(namespace string) corev1.ConfigMapInterface

ConfigMaps to be mocked

type MockDeploymentGetter added in v1.5.0

type MockDeploymentGetter struct {
}

func (*MockDeploymentGetter) Deployments added in v1.5.0

func (mock *MockDeploymentGetter) Deployments(namespace string) appsv1.DeploymentInterface

type MockDeploymentNotExistGetter added in v1.5.0

type MockDeploymentNotExistGetter struct {
}

func (*MockDeploymentNotExistGetter) Deployments added in v1.5.0

func (mock *MockDeploymentNotExistGetter) Deployments(namespace string) appsv1.DeploymentInterface

type MockSecretGetter added in v1.2.0

type MockSecretGetter struct {
}

func (*MockSecretGetter) Secrets added in v1.2.0

func (mock *MockSecretGetter) Secrets(namespace string) corev1.SecretInterface

Secrets to be mocked

type MockServiceGetter added in v1.5.0

type MockServiceGetter struct {
}

func (*MockServiceGetter) Services added in v1.5.0

func (mock *MockServiceGetter) Services(namespace string) corev1.ServiceInterface

type MockServiceNotExistGetter added in v1.5.0

type MockServiceNotExistGetter struct {
}

func (*MockServiceNotExistGetter) Services added in v1.5.0

func (mock *MockServiceNotExistGetter) Services(namespace string) corev1.ServiceInterface

Jump to

Keyboard shortcuts

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