// This module is included in:
//
// overview/assembly-configuration-points.adoc

[id="configuration-points-common_{context}"]
= Common configuration

Some of the configuration options common to resources are described here.
xref:security-overview_{context}[Security] and xref:metrics-overview_{context}[metrics collection] might also be adopted where applicable.

Bootstrap servers:: Bootstrap servers are used for host/port connection to a Kafka cluster for:
+
* Kafka Connect
* Kafka Bridge
* Kafka MirrorMaker producers and consumers
CPU and memory resources:: You request CPU and memory resources for components. Limits specify the maximum resources that can be consumed by a given container.
+
Resource requests and limits for the Topic Operator and User Operator are set in the `Kafka` resource.
Logging:: You define the logging level for the component. Logging can be defined directly (inline) or externally using a config map.
Healthchecks:: Healthcheck configuration introduces _liveness_ and _readiness_ probes to know when to restart a container (liveness) and when a container can accept traffic (readiness).
JVM options:: JVM options provide maximum and minimum memory allocation to optimize the performance of the component according to the platform it is running on.
Pod scheduling:: Pod schedules use _affinity/anti-affinity_ rules to determine under what circumstances a pod is scheduled onto a node.

[discrete]
== Example YAML showing common configuration
[source,yaml,subs=attributes+]
----
apiVersion: {KafkaApiVersion}
kind: KafkaConnect
metadata:
  name: my-cluster
spec:
  # ...
  bootstrapServers: my-cluster-kafka-bootstrap:9092
  resources:
    requests:
      cpu: 12
      memory: 64Gi
    limits:
      cpu: 12
      memory: 64Gi
  logging:
    type: inline
    loggers:
      connect.root.logger.level: "INFO"
  readinessProbe:
    initialDelaySeconds: 15
    timeoutSeconds: 5
  livenessProbe:
    initialDelaySeconds: 15
    timeoutSeconds: 5
  jvmOptions:
    "-Xmx": "2g"
    "-Xms": "2g"
  template:
    pod:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                  - key: node-type
                    operator: In
                    values:
                      - fast-network
  # ...
----
