Documentation ¶
Index ¶
- Constants
- Variables
- func Apply(resourcesAbsoluteDirectoryPath, namespace string)
- func BuildKubeConfig(kubeconfig string) (*rest.Config, error)
- func Delete(resourcesAbsoluteDirectoryPath, namespace string)
- func DeleteInstances(namespace, name string)
- func DeletePVCs(containsString string) error
- func GetKafkaKeyTabs(brokers int, namespace string) []string
- func GetKubernetesClient() (*kubernetes.Clientset, error)
- func GetRandString(length int) (string, error)
- func InstallKudoOperator(namespace, name, operatorPathEnv string, parameters map[string]string)
- func Retry(attempts int, sleep time.Duration, condition string, f func() (string, error)) (resp string, err error)
- func Setup(namespace string)
- func SetupWithKerberos(namespace string, tlsEnabled bool)
- func String(s string) *string
- func TearDown(namespace string)
- type KDCClient
- type KafkaClient
- func (c *KafkaClient) BrokerAddressIsRegistered(podName, container string) bool
- func (c *KafkaClient) CheckForValueInFile(expectedValue, filePath, ns, pod, containerName string) (string, error)
- func (c *KafkaClient) CreateTopic(podName, container, topicName, replicationAssignment string) (string, error)
- func (c *KafkaClient) DescribeTopic(podName, container, topicName string) (string, error)
- func (c *KafkaClient) ExecInPod(namespace, name, container string, commands []string) (string, error)
- func (c *KafkaClient) GetPortForInstance() (string, error)
- func (c *KafkaClient) ReadFromTopic(podName, container, topicName, message string) (string, error)
- func (c *KafkaClient) WaitForBrokersToBeRegisteredWithService(podName, container string, timeoutSeconds time.Duration) error
- func (c *KafkaClient) WriteInTopic(podName, container, topicName, message string) (string, error)
- type KafkaClientConfiguration
- type KubernetesTestClient
- func (c *KubernetesTestClient) CheckIfPodExists(name, namespace string) bool
- func (c *KubernetesTestClient) CreateNamespace(name string, updateIfExists bool) (*v1.Namespace, error)
- func (c *KubernetesTestClient) CreateTLSCertSecret(namespace, secretName, commonName string) (*v1.Secret, error)
- func (c *KubernetesTestClient) DeleteInstance(namespace, name string)
- func (c *KubernetesTestClient) DeleteNamespace(name string) error
- func (c *KubernetesTestClient) DeletePVCs(containsString string) error
- func (c *KubernetesTestClient) ExecInPod(namespace string, podName string, containerName string, commands []string) (string, error)
- func (c *KubernetesTestClient) GetInstancesInNamespace(namespace string) (*v1beta1.InstanceList, error)
- func (c *KubernetesTestClient) GetOperatorVersionForKudoInstance(name, namespace string) (string, error)
- func (c *KubernetesTestClient) GetParamForKudoFrameworkVersion(ref corev1.ObjectReference, namespace, param string) (string, error)
- func (c *KubernetesTestClient) GetParamForKudoInstance(name, namespace, param string) (string, error)
- func (c *KubernetesTestClient) GetPlanStatusForInstance(name, namespace string) (v1beta1.ExecutionStatus, error)
- func (c *KubernetesTestClient) GetPod(name, namespace string) (*v1.Pod, error)
- func (c *KubernetesTestClient) GetServices(name string, namespace string) *v1.ServiceList
- func (c *KubernetesTestClient) GetServicesCount(name string, namespace string) int
- func (c *KubernetesTestClient) GetStatefulSet(name, namespace string) *apps_v1.StatefulSet
- func (c *KubernetesTestClient) GetStatefulSetCount(name, namespace string) int
- func (c *KubernetesTestClient) GetStatefulSetReadyReplicasCount(name, namespace string) int
- func (c *KubernetesTestClient) InstallOperatorFromPath(resourcesAbsoluteDirectoryPath, namespace, name string, ...)
- func (c *KubernetesTestClient) InstallOperatorFromRepository(namespace, operatorName, instanceName, version string, ...)
- func (c *KubernetesTestClient) ListStatefulSets(namespace string)
- func (c *KubernetesTestClient) LogObjectsOfKinds(namespace string, components []string)
- func (c *KubernetesTestClient) PrintLogsOfNamespace(namespace string)
- func (c *KubernetesTestClient) PrintLogsOfPod(containerName, podName, namespace string)
- func (c *KubernetesTestClient) UpdateInstanceParams(name, namespace string, mapParam map[string]string) error
- func (c *KubernetesTestClient) UpdateInstancesCount(name, namespace string, count int) error
- func (c *KubernetesTestClient) UpdateNamespace(name string) (*v1.Namespace, error)
- func (c *KubernetesTestClient) UpgardeInstanceFromPath(resourcesAbsoluteDirectoryPath, namespace, name string, ...)
- func (c *KubernetesTestClient) UpgardeInstanceFromRepository(namespace, operatorName, instanceName, version string, ...)
- func (c *KubernetesTestClient) WaitForContainerToBeReady(containerName, podName, namespace string, timeoutSeconds time.Duration) error
- func (c *KubernetesTestClient) WaitForPod(name, namespace string, timeoutSeconds time.Duration) error
- func (c *KubernetesTestClient) WaitForStatefulSetCount(name, namespace string, count int, timeoutSeconds time.Duration) error
- func (c *KubernetesTestClient) WaitForStatefulSetReadyReplicasCount(name, namespace string, count int, timeoutSeconds time.Duration) error
- func (c *KubernetesTestClient) WaitForStatus(name, namespace string, expectedStatus v1beta1.ExecutionStatus, ...) error
- type TLSGenerator
Constants ¶
View Source
const ( EMPTY_CONDITION = "" KAFKA_INSTANCE = "kafka" ZK_INSTANCE = "zookeeper-instance" )
View Source
const ( POD_NAME = "kdc" CONTAINER_NAME = "kdc" )
View Source
const ( KAFKA_FRAMEWORK_DIR_ENV = "KAFKA_FRAMEWORK_DIR" ZK_FRAMEWORK_DIR_ENV = "ZK_FRAMEWORK_DIR" )
View Source
const (
Alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
)
Variables ¶
View Source
var ( KClient = &KubernetesTestClient{client, context.TODO()} KubeConfig, _ = BuildKubeConfig(kubeconfig) )
View Source
var (
DefaultStatefulReadyWaitSeconds = 300 * time.Second
)
Functions ¶
func DeleteInstances ¶
func DeleteInstances(namespace, name string)
func DeletePVCs ¶
func GetKafkaKeyTabs ¶
func GetKubernetesClient ¶
func GetKubernetesClient() (*kubernetes.Clientset, error)
func GetRandString ¶
func InstallKudoOperator ¶
func SetupWithKerberos ¶
Types ¶
type KDCClient ¶
type KDCClient struct { Namespace string // contains filtered or unexported fields }
KDCClient Struct defining the KDC Client
func (*KDCClient) CreateKeytabSecret ¶
func (k *KDCClient) CreateKeytabSecret(principals []string, serviceName string, secretName string) error
CreateKeytabSecret Pass it string array of principals and it will create a keytab secret
func (*KDCClient) SetNamespace ¶
setNamespace Set Namespace
type KafkaClient ¶
type KafkaClient struct {
// contains filtered or unexported fields
}
func NewKafkaClient ¶
func NewKafkaClient(kuberentesTestClient *KubernetesTestClient, configuration *KafkaClientConfiguration) *KafkaClient
func (*KafkaClient) BrokerAddressIsRegistered ¶
func (c *KafkaClient) BrokerAddressIsRegistered(podName, container string) bool
func (*KafkaClient) CheckForValueInFile ¶
func (c *KafkaClient) CheckForValueInFile(expectedValue, filePath, ns, pod, containerName string) (string, error)
func (*KafkaClient) CreateTopic ¶
func (c *KafkaClient) CreateTopic(podName, container, topicName, replicationAssignment string) (string, error)
func (*KafkaClient) DescribeTopic ¶
func (c *KafkaClient) DescribeTopic(podName, container, topicName string) (string, error)
func (*KafkaClient) ExecInPod ¶
func (c *KafkaClient) ExecInPod(namespace, name, container string, commands []string) (string, error)
func (*KafkaClient) GetPortForInstance ¶
func (c *KafkaClient) GetPortForInstance() (string, error)
func (*KafkaClient) ReadFromTopic ¶
func (c *KafkaClient) ReadFromTopic(podName, container, topicName, message string) (string, error)
func (*KafkaClient) WaitForBrokersToBeRegisteredWithService ¶
func (c *KafkaClient) WaitForBrokersToBeRegisteredWithService(podName, container string, timeoutSeconds time.Duration) error
func (*KafkaClient) WriteInTopic ¶
func (c *KafkaClient) WriteInTopic(podName, container, topicName, message string) (string, error)
type KubernetesTestClient ¶
type KubernetesTestClient struct { *kubernetes.Clientset Ctx context.Context }
func (*KubernetesTestClient) CheckIfPodExists ¶
func (c *KubernetesTestClient) CheckIfPodExists(name, namespace string) bool
func (*KubernetesTestClient) CreateNamespace ¶
func (*KubernetesTestClient) CreateTLSCertSecret ¶
func (c *KubernetesTestClient) CreateTLSCertSecret(namespace, secretName, commonName string) (*v1.Secret, error)
func (*KubernetesTestClient) DeleteInstance ¶
func (c *KubernetesTestClient) DeleteInstance(namespace, name string)
func (*KubernetesTestClient) DeleteNamespace ¶
func (c *KubernetesTestClient) DeleteNamespace(name string) error
func (*KubernetesTestClient) DeletePVCs ¶
func (c *KubernetesTestClient) DeletePVCs(containsString string) error
func (*KubernetesTestClient) GetInstancesInNamespace ¶
func (c *KubernetesTestClient) GetInstancesInNamespace(namespace string) (*v1beta1.InstanceList, error)
func (*KubernetesTestClient) GetOperatorVersionForKudoInstance ¶
func (c *KubernetesTestClient) GetOperatorVersionForKudoInstance(name, namespace string) (string, error)
func (*KubernetesTestClient) GetParamForKudoFrameworkVersion ¶
func (c *KubernetesTestClient) GetParamForKudoFrameworkVersion(ref corev1.ObjectReference, namespace, param string) (string, error)
func (*KubernetesTestClient) GetParamForKudoInstance ¶
func (c *KubernetesTestClient) GetParamForKudoInstance(name, namespace, param string) (string, error)
func (*KubernetesTestClient) GetPlanStatusForInstance ¶
func (c *KubernetesTestClient) GetPlanStatusForInstance(name, namespace string) (v1beta1.ExecutionStatus, error)
func (*KubernetesTestClient) GetPod ¶
func (c *KubernetesTestClient) GetPod(name, namespace string) (*v1.Pod, error)
func (*KubernetesTestClient) GetServices ¶
func (c *KubernetesTestClient) GetServices(name string, namespace string) *v1.ServiceList
func (*KubernetesTestClient) GetServicesCount ¶
func (c *KubernetesTestClient) GetServicesCount(name string, namespace string) int
func (*KubernetesTestClient) GetStatefulSet ¶
func (c *KubernetesTestClient) GetStatefulSet(name, namespace string) *apps_v1.StatefulSet
func (*KubernetesTestClient) GetStatefulSetCount ¶
func (c *KubernetesTestClient) GetStatefulSetCount(name, namespace string) int
func (*KubernetesTestClient) GetStatefulSetReadyReplicasCount ¶
func (c *KubernetesTestClient) GetStatefulSetReadyReplicasCount(name, namespace string) int
func (*KubernetesTestClient) InstallOperatorFromPath ¶
func (c *KubernetesTestClient) InstallOperatorFromPath(resourcesAbsoluteDirectoryPath, namespace, name string, params map[string]string)
func (*KubernetesTestClient) InstallOperatorFromRepository ¶
func (c *KubernetesTestClient) InstallOperatorFromRepository(namespace, operatorName, instanceName, version string, params map[string]string)
func (*KubernetesTestClient) ListStatefulSets ¶
func (c *KubernetesTestClient) ListStatefulSets(namespace string)
func (*KubernetesTestClient) LogObjectsOfKinds ¶
func (c *KubernetesTestClient) LogObjectsOfKinds(namespace string, components []string)
func (*KubernetesTestClient) PrintLogsOfNamespace ¶
func (c *KubernetesTestClient) PrintLogsOfNamespace(namespace string)
func (*KubernetesTestClient) PrintLogsOfPod ¶
func (c *KubernetesTestClient) PrintLogsOfPod(containerName, podName, namespace string)
func (*KubernetesTestClient) UpdateInstanceParams ¶
func (c *KubernetesTestClient) UpdateInstanceParams(name, namespace string, mapParam map[string]string) error
func (*KubernetesTestClient) UpdateInstancesCount ¶
func (c *KubernetesTestClient) UpdateInstancesCount(name, namespace string, count int) error
func (*KubernetesTestClient) UpdateNamespace ¶
func (c *KubernetesTestClient) UpdateNamespace(name string) (*v1.Namespace, error)
func (*KubernetesTestClient) UpgardeInstanceFromPath ¶
func (c *KubernetesTestClient) UpgardeInstanceFromPath(resourcesAbsoluteDirectoryPath, namespace, name string, params map[string]string)
func (*KubernetesTestClient) UpgardeInstanceFromRepository ¶
func (c *KubernetesTestClient) UpgardeInstanceFromRepository(namespace, operatorName, instanceName, version string, params map[string]string)
func (*KubernetesTestClient) WaitForContainerToBeReady ¶
func (c *KubernetesTestClient) WaitForContainerToBeReady(containerName, podName, namespace string, timeoutSeconds time.Duration) error
func (*KubernetesTestClient) WaitForPod ¶
func (c *KubernetesTestClient) WaitForPod(name, namespace string, timeoutSeconds time.Duration) error
func (*KubernetesTestClient) WaitForStatefulSetCount ¶
func (*KubernetesTestClient) WaitForStatefulSetReadyReplicasCount ¶
func (*KubernetesTestClient) WaitForStatus ¶
func (c *KubernetesTestClient) WaitForStatus(name, namespace string, expectedStatus v1beta1.ExecutionStatus, timeoutSeconds time.Duration) error
type TLSGenerator ¶
type TLSGenerator struct{}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.