Adding annotations and limits of kafka connect created pods
resources:
requests:
memory: 1Gi
cpu: 500m
limits:
memory: 2Gi
cpu: 1000m
metadata:
name: my-connect
# ...
spec:
template:
deployment:
metadata:
annotations:
myanno: myvalue
metadata:
annotations:
myanno: myvalue
Trying to add pod annotations (for our log connector) and resource request/limits to the KafkaConnect created resources
What should I add in the resource so it would create the pods/deployment with them(I suspect I already sent this message but can't find it now)
template:
pod:
metadata:
annotations:
ad.datadoghq.com/kafka-connect-container-name.logs: [{"type":"file", "source":"java","sourcecategory":"sourcecode", "service":"kafka-connect"}]
And it didn't work and I saw errors in the pods of the operator
following the error log
at [Source: UNKNOWN; line: -1, column: -1] (through reference chain: io.fabric8.kubernetes.api.model.WatchEvent["object"]->io.strimzi.api.kafka.model.KafkaConnect["spec"]->io.strimzi.api.kafka.model.KafkaConnectSpec["template"]->io.strimzi.api.kafka.model.template.KafkaConnectTemplate["pod"]->io.strimzi.api.kafka.model.template.PodTemplate["metadata"]->io.strimzi.api.kafka.model.template.MetadataTemplate["annotations"]->java.util.LinkedHashMap["ad.datadoghq.com/kafka-connect-container-name.logs"])
I've guessed it's about the array, so wrapping the array as a quoted string fixed the issue
Thanks for the help again, and I'll hope this would be useful for someone else
Thanks, following your advice I've added:
template:
pod:
metadata:
annotations:
ad.datadoghq.com/kafka-connect-container-name.logs: [{"type":"file", "source":"java","sourcecategory":"sourcecode", "service":"kafka-connect"}]And it didn't work and I saw errors in the pods of the operator
following the error log
at [Source: UNKNOWN; line: -1, column: -1] (through reference chain: io.fabric8.kubernetes.api.model.WatchEvent["object"]->io.strimzi.api.kafka.model.KafkaConnect["spec"]->io.strimzi.api.kafka.model.KafkaConnectSpec["template"]->io.strimzi.api.kafka.model.template.KafkaConnectTemplate["pod"]->io.strimzi.api.kafka.model.template.PodTemplate["metadata"]->io.strimzi.api.kafka.model.template.MetadataTemplate["annotations"]->java.util.LinkedHashMap["ad.datadoghq.com/kafka-connect-container-name.logs"])
I've guessed it's about the array, so wrapping the array as a quoted string fixed the issue
Thanks for the help again, and I'll hope this would be useful for someone else
i have the following configuration:
i keep on getting: error: error validating "kafka-connect-prometeus.yaml": error validating data: ValidationError(KafkaConnect): unknown field "template" in io.strimzi.kafka.v1beta2.KafkaConnect; if you choose to ignore these errors, turn validation off with --validate=false
any advise on it (when removing it. all work smoothly...)
Thanks,
Amit
Hi,
i have the following configuration:
apiVersion: kafka.strimzi.io/v1beta2kind: KafkaConnectmetadata:name: my-connect-clusternamespace: kafkaannotations:spec:template:pod:metadata:annotations:ad.datadoghq.com/kafka-connect-container-name.logs: '[{"type":"file", "source":"java","sourcecategory":"sourcecode", "service":"kafka-connect"}]'ad.datadoghq.com/container.check_names: '["openmetrics"]'ad.datadoghq.com/container.instances: '[{"prometheus_url": "http://%%host%%:9404/metrics","namespace": "kafka","metrics": ["kafka_connect_connector_task_batch_size_avg"],"type_overrides": {"kafka_connect_incoming_byte_total": "gauge"}}]'image:
i keep on getting: error: error validating "kafka-connect-prometeus.yaml": error validating data: ValidationError(KafkaConnect): unknown field "template" in io.strimzi.kafka.v1beta2.KafkaConnect; if you choose to ignore these errors, turn validation off with --validate=false
any advise on it (when removing it. all work smoothly...)
Thanks,
Amit
The following is kafkaconnect that is integrated with datadog (named my-connect-cluster)