Documentation ¶
Index ¶
- Constants
- func ConfigmapDataCheckSum(configMapData map[string]string) string
- func GetAuthConfigFromKubernetes(ctx context.Context, secretName string, secretNamespace string) *client.KafkaAuthConfig
- func GetAuthConfigFromSecret(secret *corev1.Secret) *client.KafkaAuthConfig
- func InitializeKafkaConfigMapWatcher(ctx context.Context, watcher configmap.Watcher, logger *zap.SugaredLogger, ...) error
- func JoinStringMaps(map1 map[string]string, map2 map[string]string) map[string]string
- type EKChannelConfig
- type EKCloudEventConfig
- type EKDispatcherConfig
- type EKKafkaConfig
- type EKKubernetesConfig
- type EKReceiverConfig
- type EKSaramaConfig
- type EKSourceConfig
- type EventingKafkaConfig
- type LoggingObserver
Constants ¶
const ( TlsEnabled = "tls.enabled" TlsCacert = "ca.crt" TlsUsercert = "user.crt" TlsUserkey = "user.key" SaslUser = "user" SaslType = "saslType" SaslPassword = "password" )
Variables ¶
This section is empty.
Functions ¶
func ConfigmapDataCheckSum ¶ added in v0.23.0
func GetAuthConfigFromKubernetes ¶ added in v0.24.0
func GetAuthConfigFromKubernetes(ctx context.Context, secretName string, secretNamespace string) *client.KafkaAuthConfig
GetAuthConfigFromKubernetes Looks Up And Returns Kafka Auth ConfigAnd Brokers From Named Secret
func GetAuthConfigFromSecret ¶ added in v0.24.0
func GetAuthConfigFromSecret(secret *corev1.Secret) *client.KafkaAuthConfig
GetAuthConfigFromSecret Looks Up And Returns Kafka Auth Config And Brokers From Provided Secret
func InitializeKafkaConfigMapWatcher ¶
func InitializeKafkaConfigMapWatcher(ctx context.Context, watcher configmap.Watcher, logger *zap.SugaredLogger, handler LoggingObserver, namespace string) error
Initialize The Specified Context With A ConfigMap Watcher Much Of This Function Is Taken From The knative.dev sharedmain Package
Types ¶
type EKChannelConfig ¶ added in v0.24.0
type EKChannelConfig struct { Dispatcher EKDispatcherConfig `json:"dispatcher,omitempty"` // Consolidated and Distributed channels Receiver EKReceiverConfig `json:"receiver,omitempty"` // Distributed channel only AdminType string `json:"adminType,omitempty"` // Distributed channel only }
EKChannelConfig contains items relevant to the eventing-kafka channels NOTE: Currently the consolidated channel type does not make use of most of these fields
type EKCloudEventConfig ¶
type EKCloudEventConfig struct { MaxIdleConns int `json:"maxIdleConns,omitempty"` MaxIdleConnsPerHost int `json:"maxIdleConnsPerHost,omitempty"` }
EKCloudEventConfig contains the values send to the Knative cloudevents' ConfigureConnectionArgs function If they are not provided in the configmap, the DefaultMaxIdleConns and DefaultMaxIdleConnsPerHost constants are used
type EKDispatcherConfig ¶
type EKDispatcherConfig struct {
EKKubernetesConfig
}
EKDispatcherConfig has the base Kubernetes fields (Cpu, Memory, Replicas) only
type EKKafkaConfig ¶
type EKKafkaConfig struct { Brokers string `json:"brokers,omitempty"` AuthSecretName string `json:"authSecretName,omitempty"` AuthSecretNamespace string `json:"authSecretNamespace,omitempty"` }
EKKafkaConfig contains items relevant to Kafka specifically
type EKKubernetesConfig ¶
type EKKubernetesConfig struct { DeploymentAnnotations map[string]string `json:"deploymentAnnotations,omitempty"` DeploymentLabels map[string]string `json:"deploymentLabels,omitempty"` PodAnnotations map[string]string `json:"podAnnotations,omitempty"` PodLabels map[string]string `json:"podLabels,omitempty"` ServiceAnnotations map[string]string `json:"serviceAnnotations,omitempty"` ServiceLabels map[string]string `json:"serviceLabels,omitempty"` CpuLimit resource.Quantity `json:"cpuLimit,omitempty"` CpuRequest resource.Quantity `json:"cpuRequest,omitempty"` MemoryLimit resource.Quantity `json:"memoryLimit,omitempty"` MemoryRequest resource.Quantity `json:"memoryRequest,omitempty"` Replicas int `json:"replicas,omitempty"` }
EKKubernetesConfig and these EK sub-structs contain our custom configuration settings, stored in the config-kafka configmap. The sub-structs are explicitly declared so that they can have their own JSON tags in the overall EventingKafkaConfig. The user is responsible for providing valid values depending on use case (e.g. respecting Kubernetes label naming conventions) or the reconciliation of the respective resource will fail.
type EKReceiverConfig ¶
type EKReceiverConfig struct {
EKKubernetesConfig
}
EKReceiverConfig has the base Kubernetes fields (Cpu, Memory, Replicas) only
type EKSaramaConfig ¶ added in v0.24.0
type EKSaramaConfig struct { EnableLogging bool `json:"enableLogging,omitempty"` Config *sarama.Config `json:"-"` // Sarama config string is converted to sarama.Config struct, stored here }
EKSaramaConfig holds the sarama.Config struct (populated separately), and the global Sarama debug logging flag
type EKSourceConfig ¶ added in v0.24.0
type EKSourceConfig struct { }
EKSourceConfig is reserved for configuration fields needed by the Kafka Source component
type EventingKafkaConfig ¶
type EventingKafkaConfig struct { Channel EKChannelConfig `json:"channel,omitempty"` CloudEvents EKCloudEventConfig `json:"cloudevents,omitempty"` Kafka EKKafkaConfig `json:"kafka,omitempty"` Sarama EKSaramaConfig `json:"sarama,omitempty"` Source EKSourceConfig `json:"source,omitempty"` Auth *client.KafkaAuthConfig `json:"-"` // Not directly part of the configmap; loaded from the secret }
EventingKafkaConfig is the main struct that holds the Receiver, Dispatcher, and Kafka sub-items