Documentation ¶
Overview ¶
*
- Handles specific operations for Kafka Connection resource
Index ¶
- Variables
- func CheckIfConnectionsExist(ctx context.Context, c *KubernetesCluster, namespace string, ...) error
- func ExecuteServiceBinding(logger logging.Logger, localizer localize.Localizer, ...) error
- func IsKCInstalledOnCluster(ctx context.Context, c *KubernetesCluster) (bool, error)
- type BootstrapServerSpec
- type Cluster
- type ConnectArguments
- type CredentialsSpec
- type KafkaConnection
- type KafkaConnectionList
- type KafkaConnectionSpec
- type KafkaConnectionStatus
- type KubernetesClients
- type KubernetesCluster
- type ServiceBindingOptions
Constants ¶
This section is empty.
Variables ¶
var AKCGroup = "rhoas.redhat.com"
var AKCRMeta = metav1.TypeMeta{ Kind: "KafkaConnection", APIVersion: AKCGroup + "/" + AKCVersion, }
var AKCResource = schema.GroupVersionResource{ Group: AKCGroup, Version: AKCVersion, Resource: "kafkaconnections", }
var AKCVersion = "v1alpha1"
Functions ¶
func CheckIfConnectionsExist ¶
func CheckIfConnectionsExist(ctx context.Context, c *KubernetesCluster, namespace string, k *kafkamgmtv1.KafkaRequest) error
func ExecuteServiceBinding ¶
func IsKCInstalledOnCluster ¶
func IsKCInstalledOnCluster(ctx context.Context, c *KubernetesCluster) (bool, error)
checks the cluster to see if a KafkaConnection CRD is installed
Types ¶
type BootstrapServerSpec ¶
type BootstrapServerSpec struct { // Host full host to Kafka Service including port Host string `json:"host,omitempty"` }
BootstrapServerSpec contains server host information that can be used to connecto the Kafka
type Cluster ¶
type Cluster interface { Connect(ctx context.Context, opts *ConnectArguments) error IsRhoasOperatorAvailableOnCluster(ctx context.Context) (bool, error) CurrentNamespace() (string, error) }
Cluster defines methods used to interact with a cluster
func NewKubernetesClusterConnection ¶
func NewKubernetesClusterConnection(connection connection.Connection, config config.IConfig, logger logging.Logger, kubeconfig string, io *iostreams.IOStreams, localizer localize.Localizer) (Cluster, error)
NewKubernetesClusterConnection configures and connects to a Kubernetes cluster
type ConnectArguments ¶
type CredentialsSpec ¶
type CredentialsSpec struct { // Reference to secret name that needs to be fetched SecretName string `json:"serviceAccountSecretName,omitempty"` }
CredentialsSpec specification containing various formats of credentials
type KafkaConnection ¶
type KafkaConnection struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec KafkaConnectionSpec `json:"spec,omitempty"` Status KafkaConnectionStatus `json:"status,omitempty"` }
KafkaConnection schema
type KafkaConnectionList ¶
type KafkaConnectionList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []KafkaConnection `json:"items"` }
KafkaConnectionList contains a list of KafkaConnection
type KafkaConnectionSpec ¶
type KafkaConnectionSpec struct { AccessTokenSecretName string `json:"accessTokenSecretName,omitempty"` KafkaID string `json:"kafkaId,omitempty"` Credentials CredentialsSpec `json:"credentials"` }
KafkaConnectionSpec contains credentials and connection parameters to Kafka
type KafkaConnectionStatus ¶
type KafkaConnectionStatus struct { CreatedBy string `json:"createdBy,omitempty"` Message string `json:"message,omitempty"` Updated string `json:"updated,omitempty"` BootstrapServer BootstrapServerSpec `json:"bootstrapServer"` // Reference to secret name that needs to be fetched SecretName string `json:"serviceAccountSecretName,omitempty"` }
KafkaConnectionStatus defines the observed state of KafkaConnection
type KubernetesClients ¶
type KubernetesClients struct {
// contains filtered or unexported fields
}
type KubernetesCluster ¶
type KubernetesCluster struct {
// contains filtered or unexported fields
}
KubernetesCluster is a type which represents a Kubernetes cluster
func (*KubernetesCluster) Connect ¶
func (c *KubernetesCluster) Connect(ctx context.Context, cmdOptions *ConnectArguments) error
Connect connects a remote Kafka instance to the Kubernetes cluster
func (*KubernetesCluster) CurrentNamespace ¶
func (c *KubernetesCluster) CurrentNamespace() (string, error)
CurrentNamespace returns the currently set namespace
func (*KubernetesCluster) IsRhoasOperatorAvailableOnCluster ¶
func (c *KubernetesCluster) IsRhoasOperatorAvailableOnCluster(ctx context.Context) (bool, error)
IsRhoasOperatorAvailableOnCluster checks the cluster to see if a KafkaConnection CRD is installed