v1beta1

package
v0.28.8 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Overview

Package v1beta1 contains API Schema definitions for the banzaicloud v1beta1 API group +kubebuilder:object:generate=true +groupName=kafka.banzaicloud.io

Index

Constants

View Source
const (
	// Configured states the broker is running
	Configured RackAwarenessState = "Configured"
	// WaitingForRackAwareness states the broker is waiting for the rack awareness config
	WaitingForRackAwareness RackAwarenessState = "WaitingForRackAwareness"

	// Upscale cruise control states
	// GracefulUpscaleRequired states that a broker upscale is required
	GracefulUpscaleRequired CruiseControlState = "GracefulUpscaleRequired"
	// GracefulUpscaleRunning states that the broker upscale task is still running in CC
	GracefulUpscaleRunning CruiseControlState = "GracefulUpscaleRunning"
	// GracefulUpscaleScheduled states that the broker upscale CCOperation is created and the task is waiting for execution
	GracefulUpscaleScheduled CruiseControlState = "GracefulUpscaleScheduled"
	// GracefulUpscaleSucceeded states the broker is updated gracefully OR
	// states that the broker is part of the initial cluster creation where CC topic is still in creating stage
	GracefulUpscaleSucceeded CruiseControlState = "GracefulUpscaleSucceeded"
	// GracefulUpscaleCompletedWithError states that the broker upscale task completed with an error
	GracefulUpscaleCompletedWithError CruiseControlState = "GracefulUpscaleCompletedWithError"
	// GracefulUpscalePaused states that the broker upscale task is completed with an error and it will not be retried, it is paused
	GracefulUpscalePaused CruiseControlState = "GracefulUpscalePaused"
	// Downscale cruise control states
	// GracefulDownscaleRequired states that a broker downscale is required
	GracefulDownscaleRequired CruiseControlState = "GracefulDownscaleRequired"
	// GracefulDownscaleScheduled states that the broker downscale CCOperation is created and the task is waiting for execution
	GracefulDownscaleScheduled CruiseControlState = "GracefulDownscaleScheduled"
	// GracefulDownscaleRunning states that the broker downscale is still running in CC
	GracefulDownscaleRunning CruiseControlState = "GracefulDownscaleRunning"
	// GracefulDownscaleSucceeded states that the broker downscaled gracefully
	GracefulDownscaleSucceeded CruiseControlState = "GracefulDownscaleSucceeded"
	// GracefulDownscaleCompletedWithError states that the broker downscale task completed with an error
	GracefulDownscaleCompletedWithError CruiseControlState = "GracefulDownscaleCompletedWithError"
	// GracefulDownscalePaused states that the broker downscale task is completed with an error and it will not be retried, it is paused. In this case further downscale tasks can be executed
	GracefulDownscalePaused CruiseControlState = "GracefulDownscalePaused"

	// Disk rebalance cruise control states
	// GracefulDiskRebalanceRequired states that the broker volume needs a CC disk rebalance
	GracefulDiskRebalanceRequired CruiseControlVolumeState = "GracefulDiskRebalanceRequired"
	// GracefulDiskRebalanceRunning states that for the broker volume a CC disk rebalance is in progress
	GracefulDiskRebalanceRunning CruiseControlVolumeState = "GracefulDiskRebalanceRunning"
	// GracefulDiskRebalanceSucceeded states that the for the broker volume rebalance has succeeded
	GracefulDiskRebalanceSucceeded CruiseControlVolumeState = "GracefulDiskRebalanceSucceeded"
	// GracefulDiskRebalanceScheduled states that the broker volume rebalance CCOperation is created and the task is waiting for execution
	GracefulDiskRebalanceScheduled CruiseControlVolumeState = "GracefulDiskRebalanceScheduled"
	// GracefulDiskRebalanceCompletedWithError states that the broker volume rebalance task completed with an error
	GracefulDiskRebalanceCompletedWithError CruiseControlVolumeState = "GracefulDiskRebalanceCompletedWithError"
	// GracefulDiskRebalancePaused states that the broker volume rebalance task is completed with an error and it will not be retried, it is paused
	GracefulDiskRebalancePaused CruiseControlVolumeState = "GracefulDiskRebalancePaused"

	// CruiseControlTopicNotReady states the CC required topic is not yet created
	CruiseControlTopicNotReady CruiseControlTopicStatus = "CruiseControlTopicNotReady"
	// CruiseControlTopicReady states the CC required topic is created
	CruiseControlTopicReady CruiseControlTopicStatus = "CruiseControlTopicReady"
	// CruiseControlTaskActive states the CC task is scheduled but not yet running
	CruiseControlTaskActive CruiseControlUserTaskState = "Active"
	// CruiseControlTaskInExecution states the CC task is executing
	CruiseControlTaskInExecution CruiseControlUserTaskState = "InExecution"
	// CruiseControlTaskCompleted states the CC task completed successfully
	CruiseControlTaskCompleted CruiseControlUserTaskState = "Completed"
	// CruiseControlTaskCompletedWithError states the CC task completed with error
	CruiseControlTaskCompletedWithError CruiseControlUserTaskState = "CompletedWithError"
	// KafkaClusterReconciling states that the cluster is still in reconciling stage
	KafkaClusterReconciling ClusterState = "ClusterReconciling"
	// KafkaClusterRollingUpgrading states that the cluster is rolling upgrading
	KafkaClusterRollingUpgrading ClusterState = "ClusterRollingUpgrading"
	// KafkaClusterRunning states that the cluster is in running state
	KafkaClusterRunning ClusterState = "ClusterRunning"

	// ConfigInSync states that the generated brokerConfig is in sync with the Broker
	ConfigInSync ConfigurationState = "ConfigInSync"
	// ConfigOutOfSync states that the generated brokerConfig is out of sync with the Broker
	ConfigOutOfSync ConfigurationState = "ConfigOutOfSync"
	// PerBrokerConfigInSync states that the generated per-broker brokerConfig is in sync with the Broker
	PerBrokerConfigInSync PerBrokerConfigurationState = "PerBrokerConfigInSync"
	// PerBrokerConfigOutOfSync states that the generated per-broker brokerConfig is out of sync with the Broker
	PerBrokerConfigOutOfSync PerBrokerConfigurationState = "PerBrokerConfigOutOfSync"
	// PerBrokerConfigError states that the generated per-broker brokerConfig can not be set in the Broker
	PerBrokerConfigError PerBrokerConfigurationState = "PerBrokerConfigError"

	// SecurityProtocolSSL
	SecurityProtocolSSL SecurityProtocol = "ssl"
	// SecurityProtocolPlaintext
	SecurityProtocolPlaintext SecurityProtocol = "plaintext"
	// SecurityProtocolSaslSSL
	SecurityProtocolSaslSSL SecurityProtocol = "sasl_ssl"
	// SecurityProtocolSaslPlaintext
	SecurityProtocolSaslPlaintext SecurityProtocol = "sasl_plaintext"

	// SSLClientAuthRequired states that the client authentication is required when SSL is enabled
	SSLClientAuthRequired SSLClientAuthentication = "required"
)
View Source
const (
	AppLabelKey      = "app"
	KafkaCRLabelKey  = "kafka_cr"
	BrokerIdLabelKey = "brokerId"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "kafka.banzaicloud.io", Version: "v1beta1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type AlertManagerConfig

type AlertManagerConfig struct {
	// DownScaleLimit the limit for auto-downscaling the Kafka cluster.
	// Once the size of the cluster (number of brokers) reaches or falls below this limit the auto-downscaling triggered by alerts is disabled until the cluster size exceeds this limit.
	// This limit is not enforced if this field is omitted or is <= 0.
	DownScaleLimit int `json:"downScaleLimit,omitempty"`
	// UpScaleLimit the limit for auto-upscaling the Kafka cluster.
	// Once the size of the cluster (number of brokers) reaches or exceeds this limit the auto-upscaling triggered by alerts is disabled until the cluster size falls below this limit.
	// This limit is not enforced if this field is omitted or is <= 0.
	UpScaleLimit int `json:"upScaleLimit,omitempty"`
}

AlertManagerConfig defines configuration for alert manager

func (*AlertManagerConfig) DeepCopy

func (in *AlertManagerConfig) DeepCopy() *AlertManagerConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertManagerConfig.

func (*AlertManagerConfig) DeepCopyInto

func (in *AlertManagerConfig) DeepCopyInto(out *AlertManagerConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Broker

type Broker struct {
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:Maximum=65535
	// +kubebuilder:validation:ExclusiveMaximum=true
	Id                int32         `json:"id"`
	BrokerConfigGroup string        `json:"brokerConfigGroup,omitempty"`
	ReadOnlyConfig    string        `json:"readOnlyConfig,omitempty"`
	BrokerConfig      *BrokerConfig `json:"brokerConfig,omitempty"`
}

Broker defines the broker basic configuration

func (*Broker) DeepCopy

func (in *Broker) DeepCopy() *Broker

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Broker.

func (*Broker) DeepCopyInto

func (in *Broker) DeepCopyInto(out *Broker)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Broker) GetBrokerConfig

func (b *Broker) GetBrokerConfig(kafkaClusterSpec KafkaClusterSpec) (*BrokerConfig, error)

GetBrokerConfig composes the brokerConfig for a given broker using the broker's config group

type BrokerConfig

type BrokerConfig struct {
	Image                string                        `json:"image,omitempty"`
	MetricsReporterImage string                        `json:"metricsReporterImage,omitempty"`
	Config               string                        `json:"config,omitempty"`
	StorageConfigs       []StorageConfig               `json:"storageConfigs,omitempty"`
	ServiceAccountName   string                        `json:"serviceAccountName,omitempty"`
	Resources            *corev1.ResourceRequirements  `json:"resourceRequirements,omitempty"`
	ImagePullSecrets     []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
	NodeSelector         map[string]string             `json:"nodeSelector,omitempty"`
	Tolerations          []corev1.Toleration           `json:"tolerations,omitempty"`
	KafkaHeapOpts        string                        `json:"kafkaHeapOpts,omitempty"`
	KafkaJVMPerfOpts     string                        `json:"kafkaJvmPerfOpts,omitempty"`
	// Override for the default log4j configuration
	Log4jConfig string `json:"log4jConfig,omitempty"`
	// Custom annotations for the broker pods - e.g.: Prometheus scraping annotations:
	// prometheus.io/scrape: "true"
	// prometheus.io/port: "9020"
	BrokerAnnotations map[string]string `json:"brokerAnnotations,omitempty"`
	// Custom labels for the broker pods, example use case: for Prometheus monitoring to capture the group for each broker as a label, e.g.:
	// kafka_broker_group: "default_group"
	// these labels will not override the reserved labels that the operator relies on, for example, "app", "brokerId", and "kafka_cr"
	// +optional
	BrokerLabels map[string]string `json:"brokerLabels,omitempty"`
	// Network throughput information in kB/s used by Cruise Control to determine broker network capacity.
	// By default it is set to `125000` which means 1Gbit/s in network throughput.
	NetworkConfig *NetworkConfig `json:"networkConfig,omitempty"`
	// External listeners that use NodePort type service to expose the broker outside the Kubernetes clusterT and their
	// external IP to advertise Kafka broker external listener. The external IP value is ignored in case of external listeners that use LoadBalancer
	// type service to expose the broker outside the Kubernetes cluster. Also, when "hostnameOverride" field of the external listener is set
	// it will override the broker's external listener advertise address according to the description of the "hostnameOverride" field.
	NodePortExternalIP map[string]string `json:"nodePortExternalIP,omitempty"`
	// When "hostNameOverride" and brokerConfig.nodePortExternalIP are empty and NodePort access method is selected for an external listener
	// the NodePortNodeAdddressType defines the Kafka broker's Kubernetes node's address type that shall be used in the advertised.listeners property.
	// https://kubernetes.io/docs/concepts/architecture/nodes/#addresses
	// The NodePortNodeAddressType's possible values can be Hostname, ExternalIP, InternalIP, InternalDNS,ExternalDNS
	// +kubebuilder:validation:Enum=Hostname;ExternalIP;InternalIP;InternalDNS;ExternalDNS
	// +optional
	NodePortNodeAddressType corev1.NodeAddressType `json:"nodePortNodeAddressType,omitempty"`
	// Any definition received through this field will override the default behaviour of OneBrokerPerNode flag
	// and the operator supposes that the user is aware of how scheduling is done by kubernetes
	// Affinity could be set through brokerConfigGroups definitions and can be set for individual brokers as well
	// where letter setting will override the group setting
	Affinity           *corev1.Affinity           `json:"affinity,omitempty"`
	PodSecurityContext *corev1.PodSecurityContext `json:"podSecurityContext,omitempty"`
	// SecurityContext allows to set security context for the kafka container
	SecurityContext *corev1.SecurityContext `json:"securityContext,omitempty"`
	// BrokerIngressMapping allows to set specific ingress to a specific broker mappings.
	// If left empty, all broker will inherit the default one specified under external listeners config
	// Only used when ExternalListeners.Config is populated
	BrokerIngressMapping []string `json:"brokerIngressMapping,omitempty"`
	// InitContainers add extra initContainers to the Kafka broker pod
	InitContainers []corev1.Container `json:"initContainers,omitempty"`
	// Containers add extra Containers to the Kafka broker pod
	Containers []corev1.Container `json:"containers,omitempty"`
	// Volumes define some extra Kubernetes Volumes for the Kafka broker Pods.
	Volumes []corev1.Volume `json:"volumes,omitempty"`
	// VolumeMounts define some extra Kubernetes VolumeMounts for the Kafka broker Pods.
	VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`
	// Envs defines environment variables for Kafka broker Pods.
	// Adding the "+" prefix to the name prepends the value to that environment variable instead of overwriting it.
	// Add the "+" suffix to append.
	Envs []corev1.EnvVar `json:"envs,omitempty"`
	// TerminationGracePeriod defines the pod termination grace period
	// +kubebuilder:default=120
	// +optional
	TerminationGracePeriod *int64 `json:"terminationGracePeriodSeconds,omitempty"`
	// PriorityClassName specifies the priority class name for a broker pod(s).
	// If specified, the PriorityClass resource with this PriorityClassName must be created beforehand.
	// If not specified, the broker pods' priority is default to zero.
	// +optional
	PriorityClassName string `json:"priorityClassName,omitempty"`
}

BrokerConfig defines the broker configuration

func (*BrokerConfig) DeepCopy

func (in *BrokerConfig) DeepCopy() *BrokerConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BrokerConfig.

func (*BrokerConfig) DeepCopyInto

func (in *BrokerConfig) DeepCopyInto(out *BrokerConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*BrokerConfig) GetBrokerAnnotations

func (bConfig *BrokerConfig) GetBrokerAnnotations() map[string]string

GetBrokerAnnotations returns the annotations that are applied to broker pods

func (*BrokerConfig) GetBrokerLabels added in v0.17.0

func (bConfig *BrokerConfig) GetBrokerLabels(kafkaClusterName string, brokerId int32) map[string]string

GetBrokerLabels returns the labels that are applied to broker pods

func (*BrokerConfig) GetImagePullSecrets

func (bConfig *BrokerConfig) GetImagePullSecrets() []corev1.LocalObjectReference

GetImagePullSecrets returns the list of Secrets needed to pull Containers images from private repositories

func (*BrokerConfig) GetKafkaHeapOpts

func (bConfig *BrokerConfig) GetKafkaHeapOpts() string

GetKafkaHeapOpts returns the broker specific Heap settings

func (*BrokerConfig) GetKafkaPerfJvmOpts added in v0.28.8

func (bConfig *BrokerConfig) GetKafkaPerfJvmOpts() string

GetKafkaPerfJvmOpts returns the broker specific Perf JVM settings

func (*BrokerConfig) GetNodeSelector

func (bConfig *BrokerConfig) GetNodeSelector() map[string]string

GetNodeSelector returns the node selector for the given broker

func (*BrokerConfig) GetPriorityClassName added in v0.21.0

func (bConfig *BrokerConfig) GetPriorityClassName() string

GetPriorityClassName returns the priority class name for the given broker

func (*BrokerConfig) GetResources

func (bConfig *BrokerConfig) GetResources() *corev1.ResourceRequirements

GetResources returns the broker specific Kubernetes resource

func (*BrokerConfig) GetServiceAccount

func (bConfig *BrokerConfig) GetServiceAccount() string

GetServiceAccount returns the Kubernetes Service Account to use for Kafka Cluster

func (*BrokerConfig) GetTerminationGracePeriod added in v0.15.0

func (bConfig *BrokerConfig) GetTerminationGracePeriod() int64

GetTerminationGracePeriod returns the termination grace period for the broker pod

func (*BrokerConfig) GetTolerations

func (bConfig *BrokerConfig) GetTolerations() []corev1.Toleration

GetTolerations returns the tolerations for the given broker

type BrokerState

type BrokerState struct {
	// RackAwarenessState holds info about rack awareness status
	RackAwarenessState RackAwarenessState `json:"rackAwarenessState"`
	// GracefulActionState holds info about cc action status
	GracefulActionState GracefulActionState `json:"gracefulActionState"`
	// ConfigurationState holds info about the config
	ConfigurationState ConfigurationState `json:"configurationState"`
	// PerBrokerConfigurationState holds info about the per-broker (dynamically updatable) config
	PerBrokerConfigurationState PerBrokerConfigurationState `json:"perBrokerConfigurationState"`
	// ExternalListenerConfigNames holds info about what listener config is in use with the broker
	ExternalListenerConfigNames ExternalListenerConfigNames `json:"externalListenerConfigNames,omitempty"`
	// Version holds the current version of the broker in semver format
	Version string `json:"version,omitempty"`
	// Image specifies the current docker image of the broker
	Image string `json:"image,omitempty"`
	// Compressed data from broker configuration to restore broker pod in specific cases
	ConfigurationBackup string `json:"configurationBackup,omitempty"`
}

BrokerState holds information about broker state

func (*BrokerState) DeepCopy

func (in *BrokerState) DeepCopy() *BrokerState

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BrokerState.

func (*BrokerState) DeepCopyInto

func (in *BrokerState) DeepCopyInto(out *BrokerState)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterState

type ClusterState string

ClusterState holds info about the cluster state

type CommonListenerSpec

type CommonListenerSpec struct {
	// +kubebuilder:validation:Enum=ssl;plaintext;sasl_ssl;sasl_plaintext
	Type SecurityProtocol `json:"type"`
	// ServerSSLCertSecret is a reference to the Kubernetes secret that contains the server certificate for the listener to be used for SSL communication.
	// The secret must contain the keystore, truststore jks files and the password for them in base64 encoded format under the keystore.jks, truststore.jks, password data fields.
	// If this field is omitted koperator will auto-create a self-signed server certificate using the configuration provided in 'sslSecrets' field.
	ServerSSLCertSecret *corev1.LocalObjectReference `json:"serverSSLCertSecret,omitempty"`
	// SSLClientAuth specifies whether client authentication is required, requested, or not required.
	// This field defaults to "required" if it is omitted
	// +kubebuilder:validation:Enum=required;requested;none
	SSLClientAuth SSLClientAuthentication `json:"sslClientAuth,omitempty"`
	// +kubebuilder:validation:Pattern=^[a-z0-9\-]+
	Name string `json:"name"`
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:ExclusiveMinimum=true
	// +kubebuilder:validation:Maximum=65535
	ContainerPort int32 `json:"containerPort"`
}

CommonListenerSpec defines the common building block for Listener type

func (*CommonListenerSpec) DeepCopy

func (in *CommonListenerSpec) DeepCopy() *CommonListenerSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommonListenerSpec.

func (*CommonListenerSpec) DeepCopyInto

func (in *CommonListenerSpec) DeepCopyInto(out *CommonListenerSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CommonListenerSpec) GetListenerServiceName

func (lP *CommonListenerSpec) GetListenerServiceName() string

GetListenerName returns the prepared listener name

func (*CommonListenerSpec) GetServerSSLCertSecretName added in v0.15.0

func (c *CommonListenerSpec) GetServerSSLCertSecretName() string

type Config

type Config struct {
	DefaultIngressConfig string                   `json:"defaultIngressConfig"`
	IngressConfig        map[string]IngressConfig `json:"ingressConfig,omitempty"`
}

Config defines the external access ingress controller configuration

func (*Config) DeepCopy

func (in *Config) DeepCopy() *Config

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Config.

func (*Config) DeepCopyInto

func (in *Config) DeepCopyInto(out *Config)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ConfigurationState

type ConfigurationState string

ConfigurationState holds info about the configuration state

type CruiseControlConfig

type CruiseControlConfig struct {
	CruiseControlTaskSpec      CruiseControlTaskSpec         `json:"cruiseControlTaskSpec,omitempty"`
	CruiseControlOperationSpec *CruiseControlOperationSpec   `json:"cruiseControlOperationSpec,omitempty"`
	CruiseControlEndpoint      string                        `json:"cruiseControlEndpoint,omitempty"`
	Resources                  *corev1.ResourceRequirements  `json:"resourceRequirements,omitempty"`
	ServiceAccountName         string                        `json:"serviceAccountName,omitempty"`
	ImagePullSecrets           []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
	NodeSelector               map[string]string             `json:"nodeSelector,omitempty"`
	Tolerations                []corev1.Toleration           `json:"tolerations,omitempty"`
	Config                     string                        `json:"config,omitempty"`
	CapacityConfig             string                        `json:"capacityConfig,omitempty"`
	ClusterConfig              string                        `json:"clusterConfig,omitempty"`
	Log4jConfig                string                        `json:"log4jConfig,omitempty"`
	Image                      string                        `json:"image,omitempty"`
	TopicConfig                *TopicConfig                  `json:"topicConfig,omitempty"`
	Affinity                   *corev1.Affinity              `json:"affinity,omitempty"`
	//  Annotations to be applied to CruiseControl pod
	// +optional
	CruiseControlAnnotations map[string]string `json:"cruiseControlAnnotations,omitempty"`
	// InitContainers add extra initContainers to CruiseControl pod
	InitContainers []corev1.Container `json:"initContainers,omitempty"`
	// Volumes define some extra Kubernetes Volumes for the CruiseControl Pods.
	Volumes []corev1.Volume `json:"volumes,omitempty"`
	// VolumeMounts define some extra Kubernetes Volume mounts for the CruiseControl Pods.
	VolumeMounts       []corev1.VolumeMount       `json:"volumeMounts,omitempty"`
	PodSecurityContext *corev1.PodSecurityContext `json:"podSecurityContext,omitempty"`
	// SecurityContext allows to set security context for the CruiseControl container
	SecurityContext *corev1.SecurityContext `json:"securityContext,omitempty"`
	// PriorityClassName specifies the priority class name for the CruiseControl pod.
	// If specified, the PriorityClass resource with this PriorityClassName must be created beforehand.
	// If not specified, the CruiseControl pod's priority is default to zero.
	// +optional
	PriorityClassName string `json:"priorityClassName,omitempty"`
}

CruiseControlConfig defines the config for Cruise Control

func (*CruiseControlConfig) DeepCopy

func (in *CruiseControlConfig) DeepCopy() *CruiseControlConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CruiseControlConfig.

func (*CruiseControlConfig) DeepCopyInto

func (in *CruiseControlConfig) DeepCopyInto(out *CruiseControlConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CruiseControlConfig) GetAffinity added in v0.26.0

func (cConfig *CruiseControlConfig) GetAffinity() *corev1.Affinity

GetAffinity returns the Affinity config for cruise control

func (*CruiseControlConfig) GetCCImage

func (cConfig *CruiseControlConfig) GetCCImage() string

GetCCImage returns the used Cruise Control image

func (*CruiseControlConfig) GetCCLog4jConfig

func (cConfig *CruiseControlConfig) GetCCLog4jConfig() string

GetCCLog4jConfig returns the used Cruise Control log4j configuration

func (*CruiseControlConfig) GetCruiseControlAnnotations

func (cConfig *CruiseControlConfig) GetCruiseControlAnnotations() map[string]string

GetCruiseControlAnnotations return the annotations which applied to CruiseControl pod

func (*CruiseControlConfig) GetImagePullSecrets

func (cConfig *CruiseControlConfig) GetImagePullSecrets() []corev1.LocalObjectReference

GetImagePullSecrets returns the list of Secrets needed to pull Containers images from private repositories

func (*CruiseControlConfig) GetNodeSelector

func (cConfig *CruiseControlConfig) GetNodeSelector() map[string]string

GetNodeSelector returns the node selector for cruise control

func (*CruiseControlConfig) GetPriorityClassName added in v0.21.0

func (cConfig *CruiseControlConfig) GetPriorityClassName() string

GetPriorityClassName returns the priority class name for the CruiseControl pod

func (*CruiseControlConfig) GetResources

func (cConfig *CruiseControlConfig) GetResources() *corev1.ResourceRequirements

GetResources returns the CC specific Kubernetes resource

func (*CruiseControlConfig) GetServiceAccount

func (cConfig *CruiseControlConfig) GetServiceAccount() string

GetServiceAccount returns the Kubernetes Service Account to use for CruiseControl

func (*CruiseControlConfig) GetTolerations

func (cConfig *CruiseControlConfig) GetTolerations() []corev1.Toleration

GetTolerations returns the tolerations for cruise control

type CruiseControlOperationSpec added in v0.22.0

type CruiseControlOperationSpec struct {
	// When TTLSecondsAfterFinished is specified, the created and finished (completed successfully or completedWithError and errorPolicy: ignore)
	// cruiseControlOperation custom resource will be deleted after the given time elapsed.
	// When it is 0 then the resource is going to be deleted instantly after the operation is finished.
	// When it is not specified the resource is not going to be removed.
	// Value can be only zero and positive integers.
	// +kubebuilder:validation:Minimum=0
	TTLSecondsAfterFinished *int `json:"ttlSecondsAfterFinished,omitempty"`
}

CruiseControlOperationSpec specifies the configuration of the CruiseControlOperation handling

func (*CruiseControlOperationSpec) DeepCopy added in v0.22.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CruiseControlOperationSpec.

func (*CruiseControlOperationSpec) DeepCopyInto added in v0.22.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CruiseControlOperationSpec) GetTTLSecondsAfterFinished added in v0.22.0

func (c *CruiseControlOperationSpec) GetTTLSecondsAfterFinished() *int

GetTTLSecondsAfterFinished returns NIL when CruiseControlOperationSpec is not specified otherwise it returns itself

type CruiseControlState

type CruiseControlState string

CruiseControlState holds info about the state of Cruise Control

func (CruiseControlState) IsActive added in v0.17.0

func (r CruiseControlState) IsActive() bool

IsActive returns true if CruiseControlState is in active state the controller needs to take care of.

func (CruiseControlState) IsDownscale

func (r CruiseControlState) IsDownscale() bool

IsDownscale returns true if CruiseControlState in GracefulDownscale* state.

func (CruiseControlState) IsRequiredState

func (r CruiseControlState) IsRequiredState() bool

IsRequiredState returns true if CruiseControlVolumeState indicates that either upscaling or downscaling (GracefulDownscaleRequired or GracefulUpscaleRequired) operation needs to be performed.

func (CruiseControlState) IsRunningState

func (r CruiseControlState) IsRunningState() bool

IsRunningState returns true if CruiseControlState indicates that the CC operation is scheduled and in-progress

func (CruiseControlState) IsSucceeded added in v0.22.0

func (r CruiseControlState) IsSucceeded() bool

IsSucceeded returns true if CruiseControlState is succeeded

func (CruiseControlState) IsUpscale

func (r CruiseControlState) IsUpscale() bool

IsUpscale returns true if CruiseControlState in GracefulUpscale* state.

type CruiseControlTaskSpec

type CruiseControlTaskSpec struct {
	// RetryDurationMinutes describes the amount of time the Operator waits for the task
	RetryDurationMinutes int `json:"RetryDurationMinutes"`
}

CruiseControlTaskSpec specifies the configuration of the CC Tasks

func (*CruiseControlTaskSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CruiseControlTaskSpec.

func (*CruiseControlTaskSpec) DeepCopyInto

func (in *CruiseControlTaskSpec) DeepCopyInto(out *CruiseControlTaskSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CruiseControlTaskSpec) GetDurationMinutes

func (cTaskSpec *CruiseControlTaskSpec) GetDurationMinutes() float64

type CruiseControlTopicStatus

type CruiseControlTopicStatus string

CruiseControlTopicStatus holds info about the CC topic status

type CruiseControlUserTaskState

type CruiseControlUserTaskState string

CruiseControlUserTaskState holds info about the CC user task state

type CruiseControlVolumeState

type CruiseControlVolumeState string

CruiseControlVolumeState holds information about the state of volume rebalance

func (CruiseControlVolumeState) IsActive added in v0.17.0

func (s CruiseControlVolumeState) IsActive() bool

IsActive returns true if CruiseControlVolumeState is in active state the controller needs to take care of.

func (CruiseControlVolumeState) IsRequiredState added in v0.22.0

func (s CruiseControlVolumeState) IsRequiredState() bool

IsRequiredState returns true if CruiseControlVolumeState is in GracefulDiskRebalanceRequired state

func (CruiseControlVolumeState) IsRunningState added in v0.17.0

func (s CruiseControlVolumeState) IsRunningState() bool

IsRunningState returns true if CruiseControlVolumeState indicates that the CC operation is scheduled and in-progress

func (CruiseControlVolumeState) IsSucceeded added in v0.22.0

func (r CruiseControlVolumeState) IsSucceeded() bool

IsSucceeded returns true if CruiseControlVolumeState is succeeded

type DisruptionBudget

type DisruptionBudget struct {
	// If set to true, will create a podDisruptionBudget
	// +optional
	Create bool `json:"create,omitempty"`
	// The budget to set for the PDB, can either be static number or a percentage
	// +kubebuilder:validation:Pattern:="^[0-9]+$|^[0-9]{1,2}%$|^100%$"
	Budget string `json:"budget,omitempty"`
}

DisruptionBudget defines the configuration for PodDisruptionBudget where the workload is managed by the kafka-operator

func (*DisruptionBudget) DeepCopy

func (in *DisruptionBudget) DeepCopy() *DisruptionBudget

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DisruptionBudget.

func (*DisruptionBudget) DeepCopyInto

func (in *DisruptionBudget) DeepCopyInto(out *DisruptionBudget)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DisruptionBudgetWithStrategy

type DisruptionBudgetWithStrategy struct {
	// PodDisruptionBudget default settings
	DisruptionBudget `json:",inline"`
	// The strategy to be used, either minAvailable or maxUnavailable
	// +kubebuilder:validation:Enum=minAvailable;maxUnavailable
	Stategy string `json:"strategy,omitempty"`
}

DisruptionBudgetWithStrategy defines the configuration for PodDisruptionBudget where the workload is managed by an external controller (eg. Deployments)

func (*DisruptionBudgetWithStrategy) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DisruptionBudgetWithStrategy.

func (*DisruptionBudgetWithStrategy) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type EnvoyCommandLineArgs added in v0.15.0

type EnvoyCommandLineArgs struct {
	// Envoy --concurrency command line argument.
	// See https://www.envoyproxy.io/docs/envoy/latest/operations/cli#cmdoption-concurrency
	// +optional
	// +kubebuilder:validation:Minimum=1
	Concurrency int32 `json:"concurrency,omitempty"`
}

EnvoyCommandLineArgs defines envoy command line arguments

func (*EnvoyCommandLineArgs) DeepCopy added in v0.15.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyCommandLineArgs.

func (*EnvoyCommandLineArgs) DeepCopyInto added in v0.15.0

func (in *EnvoyCommandLineArgs) DeepCopyInto(out *EnvoyCommandLineArgs)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type EnvoyConfig

type EnvoyConfig struct {
	Image     string                       `json:"image,omitempty"`
	Resources *corev1.ResourceRequirements `json:"resourceRequirements,omitempty"`
	// +kubebuilder:validation:Minimum=1
	Replicas int32 `json:"replicas,omitempty"`
	// ServiceAccountName is the name of service account
	ServiceAccountName string `json:"serviceAccountName,omitempty"`
	// ImagePullSecrets for the envoy image pull
	ImagePullSecrets          []corev1.LocalObjectReference     `json:"imagePullSecrets,omitempty"`
	Affinity                  *corev1.Affinity                  `json:"affinity,omitempty"`
	TopologySpreadConstraints []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
	// NodeSelector is the node selector expression for envoy pods
	NodeSelector map[string]string   `json:"nodeSelector,omitempty"`
	Tolerations  []corev1.Toleration `json:"tolerations,omitempty"`
	// Annotations defines the annotations placed on the envoy ingress controller deployment
	Annotations map[string]string `json:"annotations,omitempty"`
	// If specified and supported by the platform, traffic through the
	// cloud-provider load-balancer will be restricted to the specified client
	// IPs. This field will be ignored if the
	// cloud-provider does not support the feature.
	// More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/
	LoadBalancerSourceRanges []string `json:"loadBalancerSourceRanges,omitempty"`
	// LoadBalancerIP can be used to specify an exact IP for the LoadBalancer service
	LoadBalancerIP string `json:"loadBalancerIP,omitempty"`
	// Envoy admin port
	AdminPort *int32 `json:"adminPort,omitempty"`
	// Envoy health-check port
	HealthCheckPort *int32 `json:"healthCheckPort,omitempty"`
	// DisruptionBudget is the pod disruption budget attached to Envoy Deployment(s)
	DisruptionBudget *DisruptionBudgetWithStrategy `json:"disruptionBudget,omitempty"`
	// Envoy command line arguments
	// +optional
	// +kubebuilder:pruning:PreserveUnknownFields
	CommandLineArgs *EnvoyCommandLineArgs `json:"envoyCommandLineArgs,omitempty"`
	// PriorityClassName specifies the priority class name for the Envoy pod(s)
	// If specified, the PriorityClass resource with this PriorityClassName must be created beforehand
	// If not specified, the Envoy pods' priority is default to zero
	// +optional
	PriorityClassName string `json:"priorityClassName,omitempty"`
	// EnableHealthCheckHttp10 is a toggle for adding HTTP1.0 support to Envoy health-check, default false
	// +optional
	EnableHealthCheckHttp10 bool `json:"enableHealthCheckHttp10,omitempty"`

	// PodSecurityContext holds pod-level security attributes and common container
	// settings for the Envoy pods.
	PodSecurityContext *corev1.PodSecurityContext `json:"podSecurityContext,omitempty"`
}

EnvoyConfig defines the config for Envoy

func (*EnvoyConfig) DeepCopy

func (in *EnvoyConfig) DeepCopy() *EnvoyConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyConfig.

func (*EnvoyConfig) DeepCopyInto

func (in *EnvoyConfig) DeepCopyInto(out *EnvoyConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*EnvoyConfig) GetAffinity

func (eConfig *EnvoyConfig) GetAffinity() *corev1.Affinity

GetAffinity returns the Affinity config for envoy

func (*EnvoyConfig) GetAnnotations

func (eConfig *EnvoyConfig) GetAnnotations() map[string]string

GetAnnotations returns Annotations to use for Envoy generated Deployment and Pods

func (*EnvoyConfig) GetConcurrency added in v0.15.0

func (eConfig *EnvoyConfig) GetConcurrency() int32

GetConcurrency returns envoy concurrency. Defines the number of worker threads envoy pod should run. If not specified defaults to the number of hardware threads on the underlying kubernetes node. See https://www.envoyproxy.io/docs/envoy/latest/operations/cli#cmdoption-concurrency

func (*EnvoyConfig) GetDistruptionBudget

func (eConfig *EnvoyConfig) GetDistruptionBudget() DisruptionBudgetWithStrategy

GetDistruptionBudget returns DisruptionBudget to use for Envoy generated Pods

func (*EnvoyConfig) GetEnvoyAdminPort

func (eConfig *EnvoyConfig) GetEnvoyAdminPort() int32

GetEnvoyAdminPort returns the envoy admin port

func (*EnvoyConfig) GetEnvoyHealthCheckPort added in v0.13.0

func (eConfig *EnvoyConfig) GetEnvoyHealthCheckPort() int32

GetEnvoyHealthCheckPort returns the envoy admin port

func (*EnvoyConfig) GetEnvoyImage

func (eConfig *EnvoyConfig) GetEnvoyImage() string

GetEnvoyImage returns the used envoy image

func (*EnvoyConfig) GetImagePullSecrets

func (eConfig *EnvoyConfig) GetImagePullSecrets() []corev1.LocalObjectReference

GetImagePullSecrets returns the list of Secrets needed to pull Containers images from private repositories

func (*EnvoyConfig) GetLoadBalancerSourceRanges

func (eConfig *EnvoyConfig) GetLoadBalancerSourceRanges() []string

GetLoadBalancerSourceRanges returns LoadBalancerSourceRanges to use for Envoy generated LoadBalancer

func (*EnvoyConfig) GetNodeSelector

func (eConfig *EnvoyConfig) GetNodeSelector() map[string]string

GetNodeSelector returns the node selector for envoy

func (*EnvoyConfig) GetPodSecurityContext added in v0.25.0

func (eConfig *EnvoyConfig) GetPodSecurityContext() *corev1.PodSecurityContext

GetPodSecurityContext returns the security context for the envoy deployment podspec.

func (*EnvoyConfig) GetPriorityClassName added in v0.21.0

func (eConfig *EnvoyConfig) GetPriorityClassName() string

GetPriorityClassName returns the priority class name for envoy

func (*EnvoyConfig) GetReplicas

func (eConfig *EnvoyConfig) GetReplicas() int32

GetReplicas returns replicas used by the Envoy deployment

func (*EnvoyConfig) GetResources

func (eConfig *EnvoyConfig) GetResources() *corev1.ResourceRequirements

GetResources returns the envoy specific Kubernetes resource

func (*EnvoyConfig) GetServiceAccount

func (eConfig *EnvoyConfig) GetServiceAccount() string

GetServiceAccount returns the Kubernetes Service Account to use for EnvoyConfig

func (*EnvoyConfig) GetTolerations

func (eConfig *EnvoyConfig) GetTolerations() []corev1.Toleration

GetTolerations returns the tolerations for envoy

func (*EnvoyConfig) GetTopologySpreadConstaints added in v0.13.0

func (eConfig *EnvoyConfig) GetTopologySpreadConstaints() []corev1.TopologySpreadConstraint

GetTopologySpreadConstaints returns the Affinity config for envoy

type ExternalListenerConfig

type ExternalListenerConfig struct {
	CommonListenerSpec     `json:",inline"`
	IngressServiceSettings `json:",inline"`
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:Maximum=65535
	// externalStartingPort is added to each broker ID to get the port number that will be used for external access to the broker.
	// The choice of broker ID and externalStartingPort must satisfy 0 < broker ID + externalStartingPort <= 65535
	// If accessMethod is Nodeport and externalStartingPort is set to 0 then the broker IDs are not added and the Nodeport port numbers will be chosen automatically by the K8s Service controller
	ExternalStartingPort int32 `json:"externalStartingPort"`
	// configuring AnyCastPort allows kafka cluster access without specifying the exact broker
	// If not defined, 29092 will be used for external clients to reach the kafka cluster
	AnyCastPort *int32 `json:"anyCastPort,omitempty"`
	// +kubebuilder:validation:Minimum=1024
	// +kubebuilder:validation:Maximum=65535
	// +optional
	// IngressControllerTargetPort defines the container port that the ingress controller uses for handling external traffic.
	// If not defined, 29092 will be used as the default IngressControllerTargetPort value.
	IngressControllerTargetPort *int32 `json:"ingressControllerTargetPort,omitempty"`
	// +kubebuilder:validation:Enum=LoadBalancer;NodePort
	// accessMethod defines the method which the external listener is exposed through.
	// Two types are supported LoadBalancer and NodePort.
	// The recommended and default is the LoadBalancer.
	// NodePort should be used in Kubernetes environments with no support for provisioning Load Balancers.
	// +optional
	AccessMethod corev1.ServiceType `json:"accessMethod,omitempty"`
	// Config allows to specify ingress controller configuration per external listener
	// if set, it overrides the default `KafkaClusterSpec.IstioIngressConfig` or `KafkaClusterSpec.EnvoyConfig` for this external listener.
	// +optional
	Config *Config `json:"config,omitempty"`
}

ExternalListenerConfig defines the external listener config for Kafka

func (*ExternalListenerConfig) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalListenerConfig.

func (*ExternalListenerConfig) DeepCopyInto

func (in *ExternalListenerConfig) DeepCopyInto(out *ExternalListenerConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (ExternalListenerConfig) GetAccessMethod

func (c ExternalListenerConfig) GetAccessMethod() corev1.ServiceType

func (ExternalListenerConfig) GetAnyCastPort

func (c ExternalListenerConfig) GetAnyCastPort() int32

func (ExternalListenerConfig) GetIngressControllerTargetPort added in v0.28.3

func (c ExternalListenerConfig) GetIngressControllerTargetPort() int32

GetIngressControllerTargetPort returns the IngressControllerTargetPort if it is defined, otherwise it returns the DefaultIngressControllerTargetPort value

type ExternalListenerConfigNames

type ExternalListenerConfigNames []string

ExternalListenerConfigNames type describes a collection of external listener names

func (ExternalListenerConfigNames) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalListenerConfigNames.

func (ExternalListenerConfigNames) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GracefulActionState

type GracefulActionState struct {
	// CruiseControlState holds the information about graceful action state
	CruiseControlState CruiseControlState `json:"cruiseControlState"`
	// CruiseControlOperationReference refers to the created CruiseControlOperation to execute a CC task
	CruiseControlOperationReference *corev1.LocalObjectReference `json:"cruiseControlOperationReference,omitempty"`
	// VolumeStates holds the information about the CC disk rebalance states and CruiseControlOperation reference
	VolumeStates map[string]VolumeState `json:"volumeStates,omitempty"`
}

GracefulActionState holds information about GracefulAction State

func (*GracefulActionState) DeepCopy

func (in *GracefulActionState) DeepCopy() *GracefulActionState

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GracefulActionState.

func (*GracefulActionState) DeepCopyInto

func (in *GracefulActionState) DeepCopyInto(out *GracefulActionState)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type IngressConfig

type IngressConfig struct {
	IngressServiceSettings `json:",inline"`
	IstioIngressConfig     *IstioIngressConfig `json:"istioIngressConfig,omitempty"`
	EnvoyConfig            *EnvoyConfig        `json:"envoyConfig,omitempty"`
}

func (*IngressConfig) DeepCopy

func (in *IngressConfig) DeepCopy() *IngressConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressConfig.

func (*IngressConfig) DeepCopyInto

func (in *IngressConfig) DeepCopyInto(out *IngressConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type IngressServiceSettings

type IngressServiceSettings struct {
	// In case of external listeners using LoadBalancer access method the value of this field is used to advertise the
	// Kafka broker external listener instead of the public IP of the provisioned LoadBalancer service (e.g. can be used to
	// advertise the listener using a URL recorded in DNS instead of public IP).
	// In case of external listeners using NodePort access method the broker instead of node public IP (see "brokerConfig.nodePortExternalIP")
	// is advertised on the address having the following format: <kafka-cluster-name>-<broker-id>.<namespace><value-specified-in-hostnameOverride-field>
	HostnameOverride string `json:"hostnameOverride,omitempty"`
	// ServiceAnnotations defines annotations which will
	// be placed to the service or services created for the external listener
	ServiceAnnotations map[string]string `json:"serviceAnnotations,omitempty"`
	// externalTrafficPolicy denotes if this Service desires to route external
	// traffic to node-local or cluster-wide endpoints. "Local" preserves the
	// client source IP and avoids a second hop for LoadBalancer and Nodeport
	// type services, but risks potentially imbalanced traffic spreading.
	// "Cluster" obscures the client source IP and may cause a second hop to
	// another node, but should have good overall load-spreading.
	// +optional
	ExternalTrafficPolicy corev1.ServiceExternalTrafficPolicyType `json:"externalTrafficPolicy,omitempty"`
	// Service Type string describes ingress methods for a service
	// Only "NodePort" and "LoadBalancer" is supported.
	// Default value is LoadBalancer
	ServiceType corev1.ServiceType `json:"serviceType,omitempty"`
}

func (*IngressServiceSettings) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressServiceSettings.

func (*IngressServiceSettings) DeepCopyInto

func (in *IngressServiceSettings) DeepCopyInto(out *IngressServiceSettings)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (IngressServiceSettings) GetServiceAnnotations

func (c IngressServiceSettings) GetServiceAnnotations() map[string]string

GetServiceAnnotations returns a copy of the ServiceAnnotations field.

func (IngressServiceSettings) GetServiceType

func (c IngressServiceSettings) GetServiceType() corev1.ServiceType

GetServiceType returns the field value of ServiceType defaults to LoadBalancer.

type InternalListenerConfig

type InternalListenerConfig struct {
	CommonListenerSpec              `json:",inline"`
	UsedForInnerBrokerCommunication bool `json:"usedForInnerBrokerCommunication"`
	UsedForControllerCommunication  bool `json:"usedForControllerCommunication,omitempty"`
}

InternalListenerConfig defines the internal listener config for Kafka

func (*InternalListenerConfig) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InternalListenerConfig.

func (*InternalListenerConfig) DeepCopyInto

func (in *InternalListenerConfig) DeepCopyInto(out *InternalListenerConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type IstioControlPlaneReference added in v0.16.0

type IstioControlPlaneReference struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
}

IstioControlPlaneReference is a reference to the IstioControlPlane resource.

func (*IstioControlPlaneReference) DeepCopy added in v0.16.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IstioControlPlaneReference.

func (*IstioControlPlaneReference) DeepCopyInto added in v0.16.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type IstioIngressConfig

type IstioIngressConfig struct {
	Resources *corev1.ResourceRequirements `json:"resourceRequirements,omitempty"`
	// +kubebuilder:validation:Minimum=1
	Replicas     int32                `json:"replicas,omitempty"`
	NodeSelector map[string]string    `json:"nodeSelector,omitempty"`
	Tolerations  []*corev1.Toleration `json:"tolerations,omitempty"`
	// Annotations defines the annotations placed on the istio ingress controller deployment
	Annotations               map[string]string   `json:"annotations,omitempty"`
	TLSOptions                *v1beta1.TLSOptions `json:"gatewayConfig,omitempty"`
	VirtualServiceAnnotations map[string]string   `json:"virtualServiceAnnotations,omitempty"`
	// Envs allows to add additional env vars to the istio meshgateway resource
	Envs []*corev1.EnvVar `json:"envs,omitempty"`
	// If specified and supported by the platform, traffic through the
	// cloud-provider load-balancer will be restricted to the specified client
	// IPs. This field will be ignored if the
	// cloud-provider does not support the feature."
	// More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/
	// +optional
	LoadBalancerSourceRanges []string `json:"loadBalancerSourceRanges,omitempty"`
}

IstioIngressConfig defines the config for the Istio Ingress Controller

func (*IstioIngressConfig) DeepCopy

func (in *IstioIngressConfig) DeepCopy() *IstioIngressConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IstioIngressConfig.

func (*IstioIngressConfig) DeepCopyInto

func (in *IstioIngressConfig) DeepCopyInto(out *IstioIngressConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*IstioIngressConfig) GetAnnotations

func (iIConfig *IstioIngressConfig) GetAnnotations() map[string]string

func (*IstioIngressConfig) GetLoadBalancerSourceRanges added in v0.19.0

func (iIConfig *IstioIngressConfig) GetLoadBalancerSourceRanges() []string

GetLoadBalancerSourceRanges returns LoadBalancerSourceRanges to use for Istio Meshagetway generated LoadBalancer

func (*IstioIngressConfig) GetReplicas

func (iIConfig *IstioIngressConfig) GetReplicas() int32

GetReplicas returns replicas used by the Istio Ingress deployment

func (*IstioIngressConfig) GetResources

func (iIConfig *IstioIngressConfig) GetResources() *corev1.ResourceRequirements

GetResources returns the IstioIngress specific Kubernetes resources

func (*IstioIngressConfig) GetVirtualServiceAnnotations

func (iIConfig *IstioIngressConfig) GetVirtualServiceAnnotations() map[string]string

GetVirtualServiceAnnotations returns a copy of the VirtualServiceAnnotations field

type KafkaCluster

type KafkaCluster struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   KafkaClusterSpec   `json:"spec,omitempty"`
	Status KafkaClusterStatus `json:"status,omitempty"`
}

KafkaCluster is the Schema for the kafkaclusters API

func (*KafkaCluster) DeepCopy

func (in *KafkaCluster) DeepCopy() *KafkaCluster

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KafkaCluster.

func (*KafkaCluster) DeepCopyInto

func (in *KafkaCluster) DeepCopyInto(out *KafkaCluster)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*KafkaCluster) DeepCopyObject

func (in *KafkaCluster) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type KafkaClusterList

type KafkaClusterList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []KafkaCluster `json:"items"`
}

KafkaClusterList contains a list of KafkaCluster

func (*KafkaClusterList) DeepCopy

func (in *KafkaClusterList) DeepCopy() *KafkaClusterList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KafkaClusterList.

func (*KafkaClusterList) DeepCopyInto

func (in *KafkaClusterList) DeepCopyInto(out *KafkaClusterList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*KafkaClusterList) DeepCopyObject

func (in *KafkaClusterList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type KafkaClusterSpec

type KafkaClusterSpec struct {
	HeadlessServiceEnabled bool            `json:"headlessServiceEnabled"`
	ListenersConfig        ListenersConfig `json:"listenersConfig"`
	// Custom ports to expose in the container. Example use case: a custom kafka distribution, that includes an integrated metrics api endpoint
	AdditionalPorts []corev1.ContainerPort `json:"additionalPorts,omitempty"`
	// ZKAddresses specifies the ZooKeeper connection string
	// in the form hostname:port where host and port are the host and port of a ZooKeeper server.
	ZKAddresses []string `json:"zkAddresses"`
	// ZKPath specifies the ZooKeeper chroot path as part
	// of its ZooKeeper connection string which puts its data under some path in the global ZooKeeper namespace.
	ZKPath                      string                  `json:"zkPath,omitempty"`
	RackAwareness               *RackAwareness          `json:"rackAwareness,omitempty"`
	ClusterImage                string                  `json:"clusterImage,omitempty"`
	ClusterMetricsReporterImage string                  `json:"clusterMetricsReporterImage,omitempty"`
	ReadOnlyConfig              string                  `json:"readOnlyConfig,omitempty"`
	ClusterWideConfig           string                  `json:"clusterWideConfig,omitempty"`
	BrokerConfigGroups          map[string]BrokerConfig `json:"brokerConfigGroups,omitempty"`
	Brokers                     []Broker                `json:"brokers"`
	DisruptionBudget            DisruptionBudget        `json:"disruptionBudget,omitempty"`
	RollingUpgradeConfig        RollingUpgradeConfig    `json:"rollingUpgradeConfig"`
	// +kubebuilder:validation:Enum=envoy;istioingress
	// IngressController specifies the type of the ingress controller to be used for external listeners. The `istioingress` ingress controller type requires the `spec.istioControlPlane` field to be populated as well.
	IngressController string `json:"ingressController,omitempty"`
	// IstioControlPlane is a reference to the IstioControlPlane resource for envoy configuration. It must be specified if istio ingress is used.
	IstioControlPlane *IstioControlPlaneReference `json:"istioControlPlane,omitempty"`
	// If true OneBrokerPerNode ensures that each kafka broker will be placed on a different node unless a custom
	// Affinity definition overrides this behavior
	OneBrokerPerNode bool `json:"oneBrokerPerNode"`
	// RemoveUnusedIngressResources when true, the unnecessary resources from the previous ingress state will be removed.
	// when false, they will be kept so the Kafka cluster remains available for those Kafka clients which are still using the previous ingress setting.
	// +kubebuilder:default=false
	// +optional
	RemoveUnusedIngressResources bool                `json:"removeUnusedIngressResources,omitempty"`
	PropagateLabels              bool                `json:"propagateLabels,omitempty"`
	CruiseControlConfig          CruiseControlConfig `json:"cruiseControlConfig"`
	EnvoyConfig                  EnvoyConfig         `json:"envoyConfig,omitempty"`
	MonitoringConfig             MonitoringConfig    `json:"monitoringConfig,omitempty"`
	AlertManagerConfig           *AlertManagerConfig `json:"alertManagerConfig,omitempty"`
	IstioIngressConfig           IstioIngressConfig  `json:"istioIngressConfig,omitempty"`
	// Envs defines environment variables for Kafka broker Pods.
	// Adding the "+" prefix to the name prepends the value to that environment variable instead of overwriting it.
	// Add the "+" suffix to append.
	Envs                    []corev1.EnvVar `json:"envs,omitempty"`
	KubernetesClusterDomain string          `json:"kubernetesClusterDomain,omitempty"`
	// ClientSSLCertSecret is a reference to the Kubernetes secret where custom client SSL certificate can be provided.
	// It will be used by the koperator, cruise control, cruise control metrics reporter
	// to communicate on SSL with that internal listener which is used for interbroker communication.
	// The client certificate must share the same chain of trust as the server certificate used by the corresponding internal listener.
	// The secret must contain the keystore, truststore jks files and the password for them in base64 encoded format
	// under the keystore.jks, truststore.jks, password data fields.
	ClientSSLCertSecret *corev1.LocalObjectReference `json:"clientSSLCertSecret,omitempty"`
}

KafkaClusterSpec defines the desired state of KafkaCluster

func (*KafkaClusterSpec) DeepCopy

func (in *KafkaClusterSpec) DeepCopy() *KafkaClusterSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KafkaClusterSpec.

func (*KafkaClusterSpec) DeepCopyInto

func (in *KafkaClusterSpec) DeepCopyInto(out *KafkaClusterSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*KafkaClusterSpec) GetClientSSLCertSecretName added in v0.15.0

func (k *KafkaClusterSpec) GetClientSSLCertSecretName() string

GetClientSSLCertSecretName returns the ClientSSLCertSecretName. It returns empty string if It's not specified

func (*KafkaClusterSpec) GetClusterImage

func (kSpec *KafkaClusterSpec) GetClusterImage() string

GetClusterImage returns the default container image for Kafka Cluster

func (*KafkaClusterSpec) GetClusterMetricsReporterImage added in v0.14.0

func (kSpec *KafkaClusterSpec) GetClusterMetricsReporterImage() string

GetClusterMetricsReporterImage returns the default container image for Kafka Cluster

func (*KafkaClusterSpec) GetIngressController

func (kSpec *KafkaClusterSpec) GetIngressController() string

GetIngressController returns the default Envoy ingress controller if not specified otherwise

func (*KafkaClusterSpec) GetKubernetesClusterDomain

func (kSpec *KafkaClusterSpec) GetKubernetesClusterDomain() string

GetKubernetesClusterDomain returns the default domain if not specified otherwise

func (*KafkaClusterSpec) GetZkPath

func (kSpec *KafkaClusterSpec) GetZkPath() string

GetZkPath returns the default "/" ZkPath if not specified otherwise

func (*KafkaClusterSpec) IsClientSSLSecretPresent added in v0.15.0

func (k *KafkaClusterSpec) IsClientSSLSecretPresent() bool

IsClientSSLSecretPresent returns true if ssl client certifications have been set for the operator and cruise control.

type KafkaClusterStatus

type KafkaClusterStatus struct {
	BrokersState             map[string]BrokerState   `json:"brokersState,omitempty"`
	CruiseControlTopicStatus CruiseControlTopicStatus `json:"cruiseControlTopicStatus,omitempty"`
	State                    ClusterState             `json:"state"`
	RollingUpgrade           RollingUpgradeStatus     `json:"rollingUpgradeStatus,omitempty"`
	AlertCount               int                      `json:"alertCount"`
	ListenerStatuses         ListenerStatuses         `json:"listenerStatuses,omitempty"`
}

KafkaClusterStatus defines the observed state of KafkaCluster

func (*KafkaClusterStatus) DeepCopy

func (in *KafkaClusterStatus) DeepCopy() *KafkaClusterStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KafkaClusterStatus.

func (*KafkaClusterStatus) DeepCopyInto

func (in *KafkaClusterStatus) DeepCopyInto(out *KafkaClusterStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type KafkaVersion

type KafkaVersion struct {
	// Version holds the current version of the broker in semver format
	Version string `json:"version,omitempty"`
	// Image specifies the current docker image of the broker
	Image string `json:"image,omitempty"`
}

KafkaVersion type describes the kafka version and docker version

func (*KafkaVersion) DeepCopy

func (in *KafkaVersion) DeepCopy() *KafkaVersion

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KafkaVersion.

func (*KafkaVersion) DeepCopyInto

func (in *KafkaVersion) DeepCopyInto(out *KafkaVersion)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ListenerStatus

type ListenerStatus struct {
	Name    string `json:"name"`
	Address string `json:"address"`
}

ListenerStatus holds information about the address of the listener

func (*ListenerStatus) DeepCopy

func (in *ListenerStatus) DeepCopy() *ListenerStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ListenerStatus.

func (*ListenerStatus) DeepCopyInto

func (in *ListenerStatus) DeepCopyInto(out *ListenerStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ListenerStatusList

type ListenerStatusList []ListenerStatus

ListenerStatusList can hold various amount of statuses based on the listener configuration.

func (ListenerStatusList) DeepCopy

func (in ListenerStatusList) DeepCopy() ListenerStatusList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ListenerStatusList.

func (ListenerStatusList) DeepCopyInto

func (in ListenerStatusList) DeepCopyInto(out *ListenerStatusList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (ListenerStatusList) Len

func (l ListenerStatusList) Len() int

func (ListenerStatusList) Less

func (l ListenerStatusList) Less(i, j int) bool

func (ListenerStatusList) Swap

func (l ListenerStatusList) Swap(i, j int)

type ListenerStatuses

type ListenerStatuses struct {
	InternalListeners map[string]ListenerStatusList `json:"internalListeners,omitempty"`
	ExternalListeners map[string]ListenerStatusList `json:"externalListeners,omitempty"`
}

ListenerStatuses holds information about the statuses of the configured listeners. The internal and external listeners are stored in separate maps, and each listener can be looked up by name.

func (*ListenerStatuses) DeepCopy

func (in *ListenerStatuses) DeepCopy() *ListenerStatuses

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ListenerStatuses.

func (*ListenerStatuses) DeepCopyInto

func (in *ListenerStatuses) DeepCopyInto(out *ListenerStatuses)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ListenersConfig

type ListenersConfig struct {
	ExternalListeners  []ExternalListenerConfig `json:"externalListeners,omitempty"`
	InternalListeners  []InternalListenerConfig `json:"internalListeners"`
	SSLSecrets         *SSLSecrets              `json:"sslSecrets,omitempty"`
	ServiceAnnotations map[string]string        `json:"serviceAnnotations,omitempty"`
}

ListenersConfig defines the Kafka listener types

func (*ListenersConfig) DeepCopy

func (in *ListenersConfig) DeepCopy() *ListenersConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ListenersConfig.

func (*ListenersConfig) DeepCopyInto

func (in *ListenersConfig) DeepCopyInto(out *ListenersConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (ListenersConfig) GetServiceAnnotations

func (c ListenersConfig) GetServiceAnnotations() map[string]string

GetServiceAnnotations returns a copy of the ServiceAnnotations field.

type MonitoringConfig

type MonitoringConfig struct {
	JmxImage               string `json:"jmxImage,omitempty"`
	PathToJar              string `json:"pathToJar,omitempty"`
	KafkaJMXExporterConfig string `json:"kafkaJMXExporterConfig,omitempty"`
	CCJMXExporterConfig    string `json:"cCJMXExporterConfig,omitempty"`
}

MonitoringConfig defines the config for monitoring Kafka and Cruise Control

func (*MonitoringConfig) DeepCopy

func (in *MonitoringConfig) DeepCopy() *MonitoringConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MonitoringConfig.

func (*MonitoringConfig) DeepCopyInto

func (in *MonitoringConfig) DeepCopyInto(out *MonitoringConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*MonitoringConfig) GetCCJMXExporterConfig

func (mConfig *MonitoringConfig) GetCCJMXExporterConfig() string

GetCCJMXExporterConfig returns the config for CC Prometheus JMX exporter

func (*MonitoringConfig) GetImage

func (mConfig *MonitoringConfig) GetImage() string

GetImage returns the used image for Prometheus JMX exporter

func (*MonitoringConfig) GetKafkaJMXExporterConfig

func (mConfig *MonitoringConfig) GetKafkaJMXExporterConfig() string

GetKafkaJMXExporterConfig returns the config for Kafka Prometheus JMX exporter

func (*MonitoringConfig) GetPathToJar

func (mConfig *MonitoringConfig) GetPathToJar() string

GetPathToJar returns the path in the used Image for Prometheus JMX exporter

type NetworkConfig

type NetworkConfig struct {
	IncomingNetworkThroughPut string `json:"incomingNetworkThroughPut,omitempty"`
	OutgoingNetworkThroughPut string `json:"outgoingNetworkThroughPut,omitempty"`
}

func (*NetworkConfig) DeepCopy

func (in *NetworkConfig) DeepCopy() *NetworkConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkConfig.

func (*NetworkConfig) DeepCopyInto

func (in *NetworkConfig) DeepCopyInto(out *NetworkConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PKIBackend

type PKIBackend string

PKIBackend represents an interface implementing the PKIManager

const (
	// PKIBackendCertManager invokes cert-manager for user certificate management
	PKIBackendCertManager PKIBackend = "cert-manager"
	// PKIBackendProvided used to point the operator to use the PKI set in the cluster CR
	// for admin and users required for the cluster to run
	PKIBackendProvided PKIBackend = "pki-backend-provided"
	// PKIBackendK8sCSR invokes kubernetes csr API for user certificate management
	PKIBackendK8sCSR PKIBackend = "k8s-csr"
)

type PerBrokerConfigurationState

type PerBrokerConfigurationState string

PerBrokerConfigurationState holds info about the per-broker configuration state

type RackAwareness

type RackAwareness struct {
	Labels []string `json:"labels"`
}

RackAwareness defines the required fields to enable kafka's rack aware feature

func (*RackAwareness) DeepCopy

func (in *RackAwareness) DeepCopy() *RackAwareness

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RackAwareness.

func (*RackAwareness) DeepCopyInto

func (in *RackAwareness) DeepCopyInto(out *RackAwareness)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RackAwarenessState

type RackAwarenessState string

RackAwarenessState stores info about rack awareness status

type RollingUpgradeConfig

type RollingUpgradeConfig struct {
	// FailureThreshold controls how many failures the cluster can tolerate during a rolling upgrade. Once the number of
	// failures reaches this threshold a rolling upgrade flow stops. The number of failures is computed as the sum of
	// distinct broker replicas with either offline replicas or out of sync replicas and the number of alerts triggered by
	// alerts with 'rollingupgrade'
	FailureThreshold int `json:"failureThreshold"`

	// ConcurrentBrokerRestartCountPerRack controls how many brokers can be restarted in parallel during a rolling upgrade. If
	// it is set to a value greater than 1, the operator will restart up to that amount of brokers in parallel, if the
	// brokers are within the same rack (as specified by "broker.rack" in broker read-only configs). Since using Kafka broker
	// racks spreads out the replicas, we know that restarting multiple brokers in the same rack will not cause more than
	// 1/Nth of the replicas of a topic-partition to be unavailable at the same time, where N is the number of racks used.
	// This is a safe way to speed up the rolling upgrade. Note that for the rack distribution explained above, Cruise Control
	// requires `com.linkedin.kafka.cruisecontrol.analyzer.goals.RackAwareDistributionGoal` to be configured. Default value is 1.
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:default=1
	// +optional
	ConcurrentBrokerRestartCountPerRack int `json:"concurrentBrokerRestartCountPerRack,omitempty"`
}

RollingUpgradeConfig defines the desired config of the RollingUpgrade

func (*RollingUpgradeConfig) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RollingUpgradeConfig.

func (*RollingUpgradeConfig) DeepCopyInto

func (in *RollingUpgradeConfig) DeepCopyInto(out *RollingUpgradeConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RollingUpgradeStatus

type RollingUpgradeStatus struct {
	LastSuccess string `json:"lastSuccess"`
	// ErrorCount keeps track the number of errors reported by alerts labeled with 'rollingupgrade'.
	// It's reset once these alerts stop firing.
	ErrorCount int `json:"errorCount"`
}

RollingUpgradeStatus defines status of rolling upgrade

func (*RollingUpgradeStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RollingUpgradeStatus.

func (*RollingUpgradeStatus) DeepCopyInto

func (in *RollingUpgradeStatus) DeepCopyInto(out *RollingUpgradeStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SSLClientAuthentication added in v0.17.0

type SSLClientAuthentication string

SSLClientAuthentication specifies whether client authentication is required, requested, or not required. Valid values are: required, requested, none

type SSLSecrets

type SSLSecrets struct {
	TLSSecretName   string                  `json:"tlsSecretName"`
	JKSPasswordName string                  `json:"jksPasswordName,omitempty"`
	Create          bool                    `json:"create,omitempty"`
	IssuerRef       *cmmeta.ObjectReference `json:"issuerRef,omitempty"`
	// +kubebuilder:validation:Enum={"cert-manager"}
	PKIBackend PKIBackend `json:"pkiBackend,omitempty"`
}

SSLSecrets defines the Kafka SSL secrets

func (*SSLSecrets) DeepCopy

func (in *SSLSecrets) DeepCopy() *SSLSecrets

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SSLSecrets.

func (*SSLSecrets) DeepCopyInto

func (in *SSLSecrets) DeepCopyInto(out *SSLSecrets)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SecurityProtocol

type SecurityProtocol string

SecurityProtocol is the protocol used to communicate with brokers. Valid values are: plaintext, ssl, sasl_plaintext, sasl_ssl.

func (SecurityProtocol) Equal

Equal checks the equality between two SecurityProtocols

func (SecurityProtocol) IsPlaintext

func (r SecurityProtocol) IsPlaintext() bool

IsPlaintext determines if the receiver is using plaintext

func (SecurityProtocol) IsSSL

func (r SecurityProtocol) IsSSL() bool

IsSSL determines if the receiver is using SSL

func (SecurityProtocol) IsSasl

func (r SecurityProtocol) IsSasl() bool

IsSasl determines if the receiver is using Sasl

func (SecurityProtocol) ToUpperString

func (r SecurityProtocol) ToUpperString() string

ToUpperString converts SecurityProtocol to an upper string

type StorageConfig

type StorageConfig struct {
	MountPath string `json:"mountPath"`

	// If set https://kubernetes.io/docs/concepts/storage/volumes/#persistentvolumeclaim is used
	// as storage for Kafka broker log dirs. Either `pvcSpec` or `emptyDir` has to be set.
	// When both `pvcSpec` and `emptyDir` fields are set
	// the `pvcSpec` is used by default.
	// +optional
	PvcSpec *corev1.PersistentVolumeClaimSpec `json:"pvcSpec,omitempty"`

	// If set https://kubernetes.io/docs/concepts/storage/volumes#emptydir is used
	// as storage for Kafka broker log dirs. The use of empty dir as Kafka broker storage is useful in development
	// environments where data loss is not a concern as data stored on emptydir backed storage is lost at pod restarts.
	// Either `pvcSpec` or `emptyDir` has to be set.
	// When both `pvcSpec` and `emptyDir` fields are set
	// the `pvcSpec` is used by default.
	// +optional
	EmptyDir *corev1.EmptyDirVolumeSource `json:"emptyDir,omitempty"`
}

StorageConfig defines the broker storage configuration

func (*StorageConfig) DeepCopy

func (in *StorageConfig) DeepCopy() *StorageConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageConfig.

func (*StorageConfig) DeepCopyInto

func (in *StorageConfig) DeepCopyInto(out *StorageConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TopicConfig

type TopicConfig struct {
	Partitions int32 `json:"partitions"`
	// +kubebuilder:validation:Minimum=2
	ReplicationFactor int32 `json:"replicationFactor"`
}

TopicConfig holds info for topic configuration regarding partitions and replicationFactor

func (*TopicConfig) DeepCopy

func (in *TopicConfig) DeepCopy() *TopicConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TopicConfig.

func (*TopicConfig) DeepCopyInto

func (in *TopicConfig) DeepCopyInto(out *TopicConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VolumeState

type VolumeState struct {
	// CruiseControlVolumeState holds the information about CC disk rebalance state
	CruiseControlVolumeState CruiseControlVolumeState `json:"cruiseControlVolumeState"`
	// CruiseControlOperationReference refers to the created CruiseControlOperation to execute a CC task
	CruiseControlOperationReference *corev1.LocalObjectReference `json:"cruiseControlOperationReference,omitempty"`
}

func (*VolumeState) DeepCopy

func (in *VolumeState) DeepCopy() *VolumeState

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeState.

func (*VolumeState) DeepCopyInto

func (in *VolumeState) DeepCopyInto(out *VolumeState)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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