apiVersion: kafka.strimzi.io/v1beta1
kind: KafkaMirrorMaker
metadata:
name: my-mirror-maker
spec:
replicas: 3
consumer:
bootstrapServers: my-source-cluster-kafka-bootstrap:9092
groupId: "my-group"
numStreams: 2
offsetCommitInterval: 120000
tls:
trustedCertificates:
- secretName: my-source-cluster-ca-cert
certificate: ca.crt
authentication:
type: tls
certificateAndKey:
secretName: my-source-secret
certificate: public.crt
key: private.key
config:
max.poll.records: 100
receive.buffer.bytes: 32768
ssl.cipher.suites: "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"
ssl.enabled.protocols: "TLSv1.2"
ssl.protocol: "TLSv1.2"
ssl.endpoint.identification.algorithm: HTTPS
producer:
bootstrapServers: my-target-cluster-kafka-bootstrap:9092
abortOnSendFailure: false
tls:
trustedCertificates:
- secretName: my-target-cluster-ca-cert
certificate: ca.crt
authentication:
type: tls
certificateAndKey:
secretName: my-target-secret
certificate: public.crt
key: private.key
config:
compression.type: gzip
batch.size: 8192
ssl.cipher.suites: "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"
ssl.enabled.protocols: "TLSv1.2"
ssl.protocol: "TLSv1.2"
ssl.endpoint.identification.algorithm: HTTPS
whitelist: "my-topic|other-topic"
resources:
requests:
cpu: "1"
memory: 2Gi
limits:
cpu: "2"
memory: 2Gi
logging:
type: inline
loggers:
mirrormaker.root.logger: "INFO"
readinessProbe:
initialDelaySeconds: 15
timeoutSeconds: 5
livenessProbe:
initialDelaySeconds: 15
timeoutSeconds: 5
metrics:
lowercaseOutputName: true
rules:
- pattern: "kafka.server<type=(.+), name=(.+)PerSec\\w*><>Count"
name: "kafka_server_$1_$2_total"
- pattern: "kafka.server<type=(.+), name=(.+)PerSec\\w*,
topic=(.+)><>Count"
name: "kafka_server_$1_$2_total"
labels:
topic: "$3"
jvmOptions:
"-Xmx": "1g"
"-Xms": "1g"
image: my-org/my-image:latest
template:
pod:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: application
operator: In
values:
- postgresql
- mongodb
topologyKey: "kubernetes.io/hostname"
connectContainer:
env:
- name: JAEGER_SERVICE_NAME
value: my-jaeger-service
- name: JAEGER_AGENT_HOST
value: jaeger-agent-name
- name: JAEGER_AGENT_PORT
value: "6831"
tracing:
type: jaeger
apiVersion: kafka.strimzi.io/v1beta1
kind: KafkaMirrorMaker
metadata:
name: my-mirror-maker
spec:
replicas: 3
1
consumer:
bootstrapServers: my-source-cluster-kafka-bootstrap:9092
2
groupId: "my-group"
3
numStreams: 2
4
offsetCommitInterval: 120000
5
tls:
6
trustedCertificates:
- secretName: my-source-cluster-ca-cert
certificate: ca.crt
authentication:
7
type: tls
certificateAndKey:
secretName: my-source-secret
certificate: public.crt
key: private.key
config:
8
max.poll.records: 100
receive.buffer.bytes: 32768
ssl.cipher.suites: "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"
9
ssl.enabled.protocols: "TLSv1.2"
ssl.protocol: "TLSv1.2"
ssl.endpoint.identification.algorithm: HTTPS
10
producer:
bootstrapServers: my-target-cluster-kafka-bootstrap:9092
abortOnSendFailure: false
11
tls:
trustedCertificates:
- secretName: my-target-cluster-ca-cert
certificate: ca.crt
authentication:
type: tls
certificateAndKey:
secretName: my-target-secret
certificate: public.crt
key: private.key
config:
compression.type: gzip
batch.size: 8192
ssl.cipher.suites: "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"
12
ssl.enabled.protocols: "TLSv1.2"
ssl.protocol: "TLSv1.2"
ssl.endpoint.identification.algorithm: HTTPS
13
whitelist: "my-topic|other-topic"
14
resources:
15
requests:
cpu: "1"
memory: 2Gi
limits:
cpu: "2"
memory: 2Gi
logging:
16
type: inline
loggers:
mirrormaker.root.logger: "INFO"
readinessProbe:
17
initialDelaySeconds: 15
timeoutSeconds: 5
livenessProbe:
initialDelaySeconds: 15
timeoutSeconds: 5
metrics:
18
lowercaseOutputName: true
rules:
- pattern: "kafka.server<type=(.+), name=(.+)PerSec\\w*><>Count"
name: "kafka_server_$1_$2_total"
- pattern: "kafka.server<type=(.+), name=(.+)PerSec\\w*,
topic=(.+)><>Count"
name: "kafka_server_$1_$2_total"
labels:
topic: "$3"
jvmOptions:
19
"-Xmx": "1g"
"-Xms": "1g"
image: my-org/my-image:latest
20
template:
21
pod:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: application
operator: In
values:
- postgresql
- mongodb
topologyKey: "kubernetes.io/hostname"
connectContainer:
22
env:
- name: JAEGER_SERVICE_NAME
value: my-jaeger-service
- name: JAEGER_AGENT_HOST
value: jaeger-agent-name
- name: JAEGER_AGENT_PORT
value: "6831"
tracing:
23
type: jaeger