From e33799d42113ecf35190641df74f4fdadc6962f2 Mon Sep 17 00:00:00 2001 From: Event Automation IBM Date: Fri, 29 Aug 2025 13:57:10 +0000 Subject: [PATCH] Changes for connectivity-pack-kafka-connectors Signed-off-by: Event Automation IBM --- README.md | 9 +- examples/kafka-connector-source.yaml | 1 - ibm-connectivity-pack/Chart.yaml | 4 +- ibm-connectivity-pack/connector-config.json | 16 +-- ibm-connectivity-pack/templates/_helpers.tpl | 68 ++++++++++- .../templates/connectors.template.yaml | 17 +++ .../templates/deployment.yaml | 6 +- ibm-connectivity-pack/templates/role.yaml | 3 +- .../templates/uninstallPostHook.yaml | 2 +- ibm-connectivity-pack/values.yaml | 26 +++-- systems/source systems/github.md | 8 +- systems/source systems/salesforce.md | 2 - systems/source systems/servicenow.md | 107 ++++++++++++++++++ 13 files changed, 233 insertions(+), 36 deletions(-) create mode 100644 ibm-connectivity-pack/templates/connectors.template.yaml create mode 100644 systems/source systems/servicenow.md diff --git a/README.md b/README.md index 692e65a..5985620 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,10 @@ By using the IBM Connectivity Pack, Connectivity Pack Kafka connectors enable data streaming between external systems and Kafka. +**Note:** +- Connectivity Pack v2.0.0 and earlier are compatible with Event Streams 11.8 and earlier, but not compatible with Kafka Connect 4.0.0. +- Connectivity Pack v3.0.0 is compatible with Event Streams 12.0.0 and later, and compatible with Kafka Connect 4.0.0. + ## Contents - [Prerequisites](#prerequisites) @@ -35,7 +39,7 @@ helm install --set license.lic Where: - `` is the release name of your choice. For example, `ibm-connectivity-pack` -- `` is the URL of the latest version of the Connectivity Pack Helm chart. For example: `https://github.com/ibm-messaging/connectivity-pack-kafka-connectors/releases/download/2.0.0/ibm-connectivity-pack-2.0.0.tgz` +- `` is the URL of the latest version of the Connectivity Pack Helm chart. For example: `https://github.com/ibm-messaging/connectivity-pack-kafka-connectors/releases/download/3.0.0/ibm-connectivity-pack-3.0.0.tgz` - `license.licenseId=` is the license identifier (ID) for the program that you purchased. For more information, see [licensing reference](https://ibm.github.io/event-automation/support/licensing/). - `license.accept` determines whether the license is accepted (default is `false` if not specified). - `` is the namespace where you want to install the Connectivity Pack. This must be in the same namespace where an Event Streams instance is deployed. @@ -204,7 +208,6 @@ Configure your connector with information about your external system by followin connectivitypack.source..CREATED_POLLER.subscription.pollingInterval: connectivitypack.source..CREATED_POLLER.subscription.timezone: connectivitypack.source..CREATED_POLLER.subscription.updatedField: - connectivitypack.source..CREATED_POLLER.subscription.timeFormat: connectivitypack.source..CREATED_POLLER.subscription.createdField: # Optional, sets the format for Kafka topic names created by the connector. @@ -281,4 +284,4 @@ Configure your connector with information about your external system by followin Copyright IBM Corp. 2025 -IBM Connectivity Pack is licensed under the [IBM Event Automation license and IBM Cloud Pak for Integration license](https://ibm.biz/ea-license), while the Helm chart and documentation are licensed under the [Apache License, Version 2.0](./ibm-connectivity-pack/license.md). \ No newline at end of file +IBM Connectivity Pack is licensed under the [IBM Event Automation license, IBM Cloud Pak for Integration license, and IBM webMethods Hybrid Integration license](https://ibm.biz/ea-license), while the Helm chart and documentation are licensed under the [Apache License, Version 2.0](./ibm-connectivity-pack/license.md). \ No newline at end of file diff --git a/examples/kafka-connector-source.yaml b/examples/kafka-connector-source.yaml index b378a30..5f326c4 100644 --- a/examples/kafka-connector-source.yaml +++ b/examples/kafka-connector-source.yaml @@ -64,7 +64,6 @@ spec: connectivitypack.source.Test_CustomObject__c.CREATED_POLLER.subscription.pollingInterval: 1 connectivitypack.source.Test_CustomObject__c.CREATED_POLLER.subscription.timezone: UTC connectivitypack.source.Test_CustomObject__c.CREATED_POLLER.subscription.updatedField: LastModifiedDate - connectivitypack.source.Test_CustomObject__c.CREATED_POLLER.subscription.timeFormat: 'YYYY-MM-DDTHH:mm:ssZ' connectivitypack.source.Test_CustomObject__c.CREATED_POLLER.subscription.createdField: CreatedDate # Optional, sets the format for Kafka topic names created by the connector. diff --git a/ibm-connectivity-pack/Chart.yaml b/ibm-connectivity-pack/Chart.yaml index 45042b7..3610649 100644 --- a/ibm-connectivity-pack/Chart.yaml +++ b/ibm-connectivity-pack/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -appVersion: 1.4.0 +appVersion: 1.4.8 description: Helm chart for IBM Connectivity Pack. The helm application is a Connectors as a Container offering that offers connectors as independently deployable application and provides a consistent interface for interaction. The application offers both action and event connectors. keywords: - ibm-connectivity-pack @@ -19,4 +19,4 @@ keywords: kubeVersion: '>=1.25.0' name: ibm-connectivity-pack type: application -version: 2.0.0 +version: 3.0.0 diff --git a/ibm-connectivity-pack/connector-config.json b/ibm-connectivity-pack/connector-config.json index 0caa199..b342477 100644 --- a/ibm-connectivity-pack/connector-config.json +++ b/ibm-connectivity-pack/connector-config.json @@ -1,19 +1,19 @@ { "action-connectors": { - "tag": "2.0.0", - "digest": "sha256:800b56a821200174ac82e12d5b2649434c1fdadfc1d2061d02be99fe3b4cedd7" + "tag": "3.0.0", + "digest": "sha256:cbe955a55b1652b408c7622699dbf657cf6137dcd1eca97e9bb70ffb424c6695" }, "event-connectors": { - "tag": "2.0.0", - "digest": "sha256:2368806303cbc30420bd0ba63274219a7d8f4c359dfe378f38624c6d15db26bc" + "tag": "3.0.0", + "digest": "sha256:2b116da33ce5202035374d1443e4af66e04223f174e033fbaf555df6aa6224aa" }, "java-tech-connectors": {}, "connectivity-pack-proxy": { - "tag": "2.0.0", - "digest": "sha256:887bb7629a16f5246e8777bc4cf2707347d4c537461f0bd4aa523cb84145df6d" + "tag": "3.0.0", + "digest": "sha256:708c72ca56391e6d336bc549546788aee66985a25c39880dd11ebd136b1c9ccd" }, "connectivity-pack-prehook": { - "tag": "2.0.0", - "digest": "sha256:c544bc6336c92e6002042fc8fdd84d2b5e2d09ca6e8cd53d9a4575ea3c2bf14f" + "tag": "3.0.0", + "digest": "sha256:8d4c21d45c8030cff35cc2e65c36567b20805691946ebde5442a8b0d5bb35929" } } diff --git a/ibm-connectivity-pack/templates/_helpers.tpl b/ibm-connectivity-pack/templates/_helpers.tpl index a0f1cb6..d8e4adc 100644 --- a/ibm-connectivity-pack/templates/_helpers.tpl +++ b/ibm-connectivity-pack/templates/_helpers.tpl @@ -303,7 +303,7 @@ Create the name for Horizontal Pod Autoscaler {{- end }} {{/* -Create the name of the service +Create the name of prehook job */}} {{- define "ibm-connectivity-pack.preHookJob" -}} {{- if .Release.Name }} @@ -311,6 +311,15 @@ Create the name of the service {{- end }} {{- end }} +{{/* +Create the name of the posthook job +*/}} +{{- define "ibm-connectivity-pack.postDeleteHookJob" -}} +{{- if .Release.Name }} +{{- default .Release.Name }}-post-delete-job +{{- end }} +{{- end }} + {{/* Create the name of the service @@ -356,4 +365,61 @@ Create the name of the service {{- if .Release.Name }} {{- default .Release.Name }}-env-config {{- end }} +{{- end }} + +{{/* +Create UDA connector configmap volume +*/}} +{{- define "ibm-connectivity-pack.udaConnectors" -}} +{{- if .Values.action.udaPersistentVolumeClaimName }} +- name: {{ .Values.action.udaPersistentVolumeClaimName }}-uda-vol + persistentVolumeClaim: + claimName: {{ .Values.action.udaPersistentVolumeClaimName }} +{{- else }} +{{- $files := .Files.Glob "connectors/*.{json,yaml,yml,car}" }} +{{- range $path, $file := $files }} +- name: {{ base $path | replace "." "-" | lower }}-vol + configMap: + name: {{ base $path | replace "." "-" | lower }}-config +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create UDA connector configmap volume mount +*/}} +{{- define "ibm-connectivity-pack.udaConnectorsMount" -}} +{{- if .Values.action.udaPersistentVolumeClaimName }} +- name: {{ .Values.action.udaPersistentVolumeClaimName }}-uda-vol + mountPath: /opt/ibm/app/connectors +{{- else }} +{{- $files := .Files.Glob "connectors/*.{json,yaml,yml,car}" }} +{{- range $path, $file := $files }} +- name: {{ base $path | replace "." "-" | lower }}-vol + mountPath: /opt/ibm/app/connectors/{{ base $path }} + subPath: {{ base $path }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Render environment variables for node-runtime-metrics +*/}} +{{- define "ibm-connectivity-pack.nodeRuntimeMetrics" }} +{{- if hasKey .Values.action "enableMetrics" }} +- name: ENABLE_METRICS + value: {{ ternary "true" "false" (eq .Values.action.enableMetrics "true") | quote }} +{{- end }} +{{- if hasKey .Values.action "metricsRotationWindowSec" }} +name: METRICS_ROTATION_WINDOW_SEC + value: {{ .Values.action.metricsRotationWindowSec | quote }} +{{- end }} +{{- if hasKey .Values.action "metricsDirectory" }} +name: METRICS_DIRECTORY + value: {{ .Values.action.metricsDirectory | quote }} +{{- end }} +{{- if hasKey .Values.action "metricsCollectIntervalMs" }} +- name: METRICS_COLLECT_INTERVAL_MS + value: {{ .Values.action.metricsCollectIntervalMs | quote }} +{{- end }} {{- end }} \ No newline at end of file diff --git a/ibm-connectivity-pack/templates/connectors.template.yaml b/ibm-connectivity-pack/templates/connectors.template.yaml new file mode 100644 index 0000000..ad87a2e --- /dev/null +++ b/ibm-connectivity-pack/templates/connectors.template.yaml @@ -0,0 +1,17 @@ +{{- $root := . }} +{{- $files := $root.Files.Glob "connectors/*.{json,yaml,yml,car}" }} +{{- range $path, $file := $files }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ base $path | replace "." "-" | lower }}-config + namespace: {{ include "ibm-connectivity-pack.namespace" $root }} + labels: + {{- include "ibm-connectivity-pack.labels" $root | nindent 4 }} + annotations: + {{- toYaml $root.Values.annotations | nindent 4 }} +data: + {{ base $path }}: | + {{ $file | toString | nindent 4 }} +--- +{{- end }} \ No newline at end of file diff --git a/ibm-connectivity-pack/templates/deployment.yaml b/ibm-connectivity-pack/templates/deployment.yaml index 1827838..29e29f5 100644 --- a/ibm-connectivity-pack/templates/deployment.yaml +++ b/ibm-connectivity-pack/templates/deployment.yaml @@ -59,6 +59,7 @@ spec: optional: true name: {{ include "ibm-connectivity-pack.envConfig" . }} env: + {{- include "ibm-connectivity-pack.nodeRuntimeMetrics" . | nindent 12 }} - name: CONNECTOR_SERVICE_ROUTE value: {{ include "ibm-connectivity-pack.actionServiceRoute" .}} - name: ENABLE_DYNAMIC_CREDENTIALS_MODE @@ -134,11 +135,10 @@ spec: valueFrom: fieldRef: fieldPath: status.podIP + securityContext: {{- toYaml .Values.securityContext | nindent 12 }} ports: - - containerPort: 3001 - protocol: TCP - containerPort: 3020 protocol: TCP imagePullPolicy: IfNotPresent @@ -158,6 +158,7 @@ spec: readOnly: true mountPath: "/opt/ibm/app/creds" {{ end }} + {{- include "ibm-connectivity-pack.udaConnectorsMount" . | nindent 12 }} image: {{ .Values.image.registry }}/{{ .Values.image.path }}/{{ .Values.action.image }}@{{ .Values.action.digest }} {{ if .Values.event.enable -}} - name: {{ .Values.event.name }} @@ -394,6 +395,7 @@ spec: secretName: {{ include "ibm-connectivity-pack.basicAuthCreds" . }} optional: true {{- include "ibm-connectivity-pack.stunnelvolume" . | nindent 8 }} + {{- include "ibm-connectivity-pack.udaConnectors" . | nindent 8 }} strategy: type: RollingUpdate rollingUpdate: diff --git a/ibm-connectivity-pack/templates/role.yaml b/ibm-connectivity-pack/templates/role.yaml index 69f1790..00a78c9 100644 --- a/ibm-connectivity-pack/templates/role.yaml +++ b/ibm-connectivity-pack/templates/role.yaml @@ -47,6 +47,7 @@ rules: - update - delete - create + - patch apiGroups: - '' resources: @@ -80,4 +81,4 @@ rules: - apiGroups: [""] resources: ["secrets"] verbs: ["create", "get", "list", "update", "patch", "delete"] -{{ end }} \ No newline at end of file +{{ end }} diff --git a/ibm-connectivity-pack/templates/uninstallPostHook.yaml b/ibm-connectivity-pack/templates/uninstallPostHook.yaml index 10da08d..ae7808e 100644 --- a/ibm-connectivity-pack/templates/uninstallPostHook.yaml +++ b/ibm-connectivity-pack/templates/uninstallPostHook.yaml @@ -2,7 +2,7 @@ apiVersion: batch/v1 kind: Job metadata: - name: {{ include "ibm-connectivity-pack.preHookJob" . }} + name: {{ include "ibm-connectivity-pack.postDeleteHookJob" . }} namespace: {{ include "ibm-connectivity-pack.namespace" . }} labels: {{- include "ibm-connectivity-pack.labels" . | nindent 4 }} diff --git a/ibm-connectivity-pack/values.yaml b/ibm-connectivity-pack/values.yaml index 24071aa..d5fcccb 100644 --- a/ibm-connectivity-pack/values.yaml +++ b/ibm-connectivity-pack/values.yaml @@ -1,6 +1,6 @@ ############################################################################### # -# © Copyright IBM Corp. 2025 +# © Copyright IBM Corp. 2024 # ############################################################################### # Default values for IBM Connectivity pack. @@ -15,7 +15,10 @@ bunyan: "'{\"loglevel\" : \"info\", \"logsrc\" : true, \"logstdouttext\" : {}}'" environmentVariables: {} # Yaml object ENV to be added on action and event pods enableRefreshTokenMode: false annotations: - productName: IBM Connectivity pack + productID: "0c44732a8b794b2d9e9b842b2dfc8361" + productName: "IBM Connectivity Pack - Free" + productMetric: "FREE" + productChargedContainers: "All" image: registry: cp.icr.io # Image registry base URL path: cp/ibm-eventstreams @@ -44,19 +47,20 @@ basicAuth: username: 'csuser' preHook: image: connectivity-pack-prehook - digest: sha256:c544bc6336c92e6002042fc8fdd84d2b5e2d09ca6e8cd53d9a4575ea3c2bf14f - tag: 2.0.0 + digest: sha256:8d4c21d45c8030cff35cc2e65c36567b20805691946ebde5442a8b0d5bb35929 + tag: 3.0.0 proxy: name: connectivity-pack-proxy image: connectivity-pack-proxy - digest: sha256:887bb7629a16f5246e8777bc4cf2707347d4c537461f0bd4aa523cb84145df6d - tag: 2.0.0 + digest: sha256:708c72ca56391e6d336bc549546788aee66985a25c39880dd11ebd136b1c9ccd + tag: 3.0.0 action: name: action-connectors fileStreamingTimeout: '120000' + udaPersistentVolumeClaimName: '' maxFileSize: '262144000' image: action-connectors - digest: sha256:800b56a821200174ac82e12d5b2649434c1fdadfc1d2061d02be99fe3b4cedd7 + digest: sha256:cbe955a55b1652b408c7622699dbf657cf6137dcd1eca97e9bb70ffb424c6695 resources: # Update below value for vertical scaling of container limits: cpu: '1' @@ -66,12 +70,12 @@ action: cpu: 250m ephemeral-storage: 5Gi memory: 256Mi - tag: 2.0.0 + tag: 3.0.0 event: enable: true # Set to true if Event container is needed name: event-connectors image: event-connectors # Update image - digest: sha256:2368806303cbc30420bd0ba63274219a7d8f4c359dfe378f38624c6d15db26bc + digest: sha256:2b116da33ce5202035374d1443e4af66e04223f174e033fbaf555df6aa6224aa resources: # Update below value for vertical scaling of container limits: cpu: '1' @@ -81,7 +85,7 @@ event: cpu: 250m ephemeral-storage: 5Gi memory: 400Mi - tag: 2.0.0 + tag: 3.0.0 javaservice: enable: false autoScaling: @@ -101,4 +105,4 @@ securityContext: seccompProfile: type: RuntimeDefault csCommon: - eventList: "['salesforceevent','jira','github','googlecalendar','googlebigquery']" + eventList: "['salesforceevent','jira','github','googlecalendar','googlebigquery','servicenow']" diff --git a/systems/source systems/github.md b/systems/source systems/github.md index 5b39350..9996b78 100644 --- a/systems/source systems/github.md +++ b/systems/source systems/github.md @@ -125,6 +125,10 @@ spec: # By default, the format is '${object}-${eventType}', but it's shown here for clarity. connectivitypack.topic.name.format: '${object}-${eventType}' + # `tasksMax` must be equal to the number of object-eventType combinations + # In this example it is 1 + tasksMax: 1 + # Specifies the converter class used to deserialize the message value. # Change this to a different converter (for example, AvroConverter) as applicable. value.converter: org.apache.kafka.connect.json.JsonConverter @@ -135,8 +139,4 @@ spec: # Optional, set the topic for producing the heartbeat events. connectivitypack.source.heartbeat.topic: heartbeat-${topic} - - # `tasksMax` must be equal to the number of object-eventType combinations - # In this example it is 1 - tasksMax: 1 ``` diff --git a/systems/source systems/salesforce.md b/systems/source systems/salesforce.md index d1f5c0c..4cbc75e 100644 --- a/systems/source systems/salesforce.md +++ b/systems/source systems/salesforce.md @@ -85,7 +85,6 @@ Subscription parameters configure how the Salesforce Polling connector polls for | **Parameter**| **Description**| **KafkaConnector configuration** | |--------------|----------------|------------------------------------| -| `timeFormat` | The date-time format to use when polling. For example, `YYYY-MM-DDTHH:mm:ssZ`. | `connectivitypack.source...subscription.timeFormat` | | `timeZone` | The time zone for polling operations. Default value is UTC. For the complete list of supported time zone values, see [supported time zone values](../connectors/supported-timezones.md).| `connectivitypack.source...subscription.timezone`| | `createdField` | The field that contains the object’s creation timestamp. | `connectivitypack.source...subscription.createdField` | | `updatedField` | The field that contains the object’s last modified timestamp. | `connectivitypack.source...subscription.updatedField` | @@ -146,7 +145,6 @@ spec: connectivitypack.source..CREATEDORUPDATED_POLLER.subscription.pollingInterval: 1 connectivitypack.source..CREATEDORUPDATED_POLLER.subscription.timezone: UTC connectivitypack.source..CREATEDORUPDATED_POLLER.subscription.updatedField: LastModifiedDate - connectivitypack.source..CREATEDORUPDATED_POLLER.subscription.timeFormat: 'YYYY-MM-DDTHH:mm:ssZ' connectivitypack.source..CREATEDORUPDATED_POLLER.subscription.createdField: CreatedDate # Optional, sets the format for Kafka topic names created by the connector. # You can use placeholders such as '${object}' and '${eventType}', which the connector will replace automatically. diff --git a/systems/source systems/servicenow.md b/systems/source systems/servicenow.md new file mode 100644 index 0000000..817efa5 --- /dev/null +++ b/systems/source systems/servicenow.md @@ -0,0 +1,107 @@ +# ServiceNow + +The ServiceNow connector uses the ServiceNow API to stream object events to Kafka topics. You can use this connector to track updates from ServiceNow objects such as assets, attachments, comments, departments, incidents, problems, system users, tickets, and more. + +## Pre-requisites + +To use the ServiceNow connector, ensure that you have the required credentials and API access to your ServiceNow instance. + +## Connecting to ServiceNow + +The `connectivitypack.source` and `connectivitypack.source.endpoint.url` configurations in the `KafkaConnector` custom resource specify the source system and its endpoint. + +| **Name** | **Value or Description** | +| -------- | -------------------------| +| `connectivitypack.source` | `servicenow` | +| `connectivitypack.source.endpoint.url` | Specifies the base URL of your ServiceNow instance. For example: `https://.service-now.com`.| + +## Supported authentication mechanisms + +You can configure the following authentication types in the `KafkaConnector` custom resource: + +| **Authentication type** | **Application type** | **Use case** | **Required credentials** | **KafkaConnector configuration** | +|-------------------------|----------------------|--------------|---------------------------|----------------------------------| +| Basic Authentication | ServiceNow | Supported with username and password authentication. | Username and password: Credentials of the ServiceNow user with the required roles and access. | `connectivitypack.source.authType: BASIC`
`connectivitypack.source.credentials.username: `
`connectivitypack.source.credentials.password: ` | +| OAuth2 Password | ServiceNow | Use when your ServiceNow instance is configured for OAuth2-based access. | - Username and password
- Client ID and client secret
- Endpoint URL | `connectivitypack.source.authType: OAUTH2_PASSWORD`
`connectivitypack.source.credentials.username: `
`connectivitypack.source.credentials.password: `
`connectivitypack.source.credentials.clientId: `
`connectivitypack.source.credentials.clientSecret: `
`connectivitypack.source.endpoint.url: https://.service-now.com` | + +## Supported objects and events + +You can specify ServiceNow objects and associated events in the `connectivitypack.source.objects` and `connectivitypack.source..events` sections of the `KafkaConnector` custom resource. + +| **Objects** | **Events** | **Description** | **KafkaConnector configuration** | +|---------------------|--------------------|----------------|--------------------------| +| `incident` | `CREATED`, `UPDATED`| Captures creation and updates of incident records. | `connectivitypack.source.objects: incident`
`connectivitypack.source.incident.events: CREATED, UPDATED` | +| `alm_asset` | `CREATED`, `UPDATED`| Captures creation and updates of asset records.| `connectivitypack.source.objects: alm_asset`
`connectivitypack.source.alm_asset.events: CREATED, UPDATED`| +| `cmn_department` | `CREATED`, `UPDATED`| Captures creation and updates of department records. | `connectivitypack.source.objects: cmn_department`
`connectivitypack.source.cmn_department.events: CREATED, UPDATED`| +| `sys_attachment` | `CREATED` | Captures creation of attachment records. | `connectivitypack.source.objects: sys_attachment`
`connectivitypack.source.sys_attachment.events: CREATED`| +| `sys_journal_field` | `CREATED` | Captures creation of comment records. | `connectivitypack.source.objects: sys_journal_field`
`connectivitypack.source.sys_journal_field.events: CREATED` | +| `problem` | `CREATED`, `UPDATED`| Captures creation and updates of problem records.| `connectivitypack.source.objects: problem`
`connectivitypack.source.problem.events: CREATED, UPDATED` | +| `sys_user` | `CREATED`, `UPDATED`| Captures creation and updates of user records.| `connectivitypack.source.objects: sys_user`
`connectivitypack.source.sys_user.events: CREATED, UPDATED` | +| `ticket` | `CREATED`, `UPDATED`| Captures creation and updates of ticket records.| `connectivitypack.source.objects: ticket`
`connectivitypack.source.ticket.events: CREATED, UPDATED` | + +## Topic + +Optional: The following parameter is used to configure the Kafka topic name. + +| **KafkaConnector configuration** | **Description** | +|----------------------------------|-----------------| +| `connectivitypack.topic.name.format`| Specifies the format of the Kafka topic. The default value is `${object}-${eventType}`. You can give any format consisting of `${object}` and `${eventType}`. For example, `servicenow-incident.CREATED`| + +## Heartbeat topic + +Optional: The heartbeat topic verifies that the connector is active and operational. It contains only tombstone records: entries that do not have any payload, consisting only of a timestamp. If a heartbeat topic is specified, then Single Message Transformations (SMTs) to filter out tombstone records are not required. The following parameter is used to configure the name of the heartbeat topic. + +| **KafkaConnector configuration** | **Description** | +|------------------------------------|--------------------| +| `connectivitypack.source.heartbeat.topic` | You can use the placeholder `${topic}` to dynamically insert the actual event topic name. This placeholder is optional. For example, if the topic is `servicenow-incident.CREATED` and the heartbeat topic is configured as `heartbeat-${topic}`, the resulting heartbeat topic will be `heartbeat-servicenow-incident.CREATED`. If you do not include `${topic}`, the exact value specified will be used as the topic name. If no heartbeat topic is explicitly configured, the default will be the same as the event topic, for example, `servicenow-incident.CREATED`.| + +## Example configuration + +The following is an example of a connector configuration for ServiceNow: + +```yaml +apiVersion: eventstreams.ibm.com/v1beta2 +kind: KafkaConnector +metadata: + name: + namespace: + labels: + eventstreams.ibm.com/cluster: + backup.eventstreams.ibm.com/component: kafkaconnector +spec: + tasksMax: 14 + autoRestart: + enabled: true + maxRestarts: 5 + class: com.ibm.eventstreams.connect.connectivitypack.source.ConnectivityPackSourceConnector + config: + connectivitypack.source: servicenow + connectivitypack.source.endpoint.url: https://.service-now.com/ + # Credentials to access the data source + connectivitypack.source.authType: BASIC + connectivitypack.source.credentials.username: ${file:/mnt/servicenow-credential:servicenow-basic-username} + connectivitypack.source.credentials.password: ${file:/mnt/servicenow-credential:servicenow-basic-password} + # Objects that support events + connectivitypack.source.objects: incident,alm_asset,cmn_department,sys_attachment,sys_journal_field,problem,sys_user,ticket + # Specifies the events (for example, CREATED, UPDATED) to capture for the object. + # The connector will process only events of the specified type for these objects + connectivitypack.source.incident.events: CREATED,UPDATED + connectivitypack.source.alm_asset.events: CREATED,UPDATED + connectivitypack.source.cmn_department.events: CREATED,UPDATED + connectivitypack.source.sys_attachment.events: CREATED + connectivitypack.source.sys_journal_field.events: CREATED + connectivitypack.source.problem.events: CREATED,UPDATED + connectivitypack.source.sys_user.events: CREATED,UPDATED + connectivitypack.source.ticket.events: CREATED,UPDATED + connectivitypack.topic.name.format: '${object}-${eventType}' + # To remove schema from topic + value.converter: org.apache.kafka.connect.json.JsonConverter + value.converter.schemas.enable: false + # To filter out tombstone records from topic + connectivitypack.source.heartbeat.topic: 'heartbeat-${topic}' +``` + +**Note:** ServiceNow personal developer instances go into hibernation and are subsequently reclaimed after a certain period of developer inactivity. If your flows include one or more ServiceNow events, and you have not accessed your ServiceNow instance in a while, the connection between connector and ServiceNow might be lost because the instance is hibernating or has been reclaimed. If you see a related message in your connector status or logs, you can re-establish the connection in one of the following ways: + + - If your instance is in hibernation, either extend your instance, or log in to the ServiceNow console and generate some developer activity. + - If your instance has been reclaimed, you will need to use another instance and reconnect the connector to that instance. \ No newline at end of file