diff --git a/charts/cp-kafka-connect/.helmignore b/charts/cp-kafka-connect/.helmignore new file mode 100644 index 0000000..f0c1319 --- /dev/null +++ b/charts/cp-kafka-connect/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/charts/cp-kafka-connect/Chart.yaml b/charts/cp-kafka-connect/Chart.yaml new file mode 100644 index 0000000..151dd0e --- /dev/null +++ b/charts/cp-kafka-connect/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Confluent Kafka Connect on Kubernetes +name: cp-kafka-connect +version: 0.1.0 diff --git a/charts/cp-kafka-connect/README.md b/charts/cp-kafka-connect/README.md new file mode 100644 index 0000000..f3b2fd8 --- /dev/null +++ b/charts/cp-kafka-connect/README.md @@ -0,0 +1,184 @@ +# CP-Kafka Connect Helm Chart + +This chart bootstraps a deployment of a Confluent Kafka Connect + +## Prerequisites + +* Kubernetes 1.9.2+ +* Helm 2.8.2+ +* A healthy and accessible Kafka Cluster + +## Developing Environment: + +* [Pivotal Container Service (PKS)](https://pivotal.io/platform/pivotal-container-service) +* [Google Kubernetes Engine (GKE)](https://cloud.google.com/kubernetes-engine/) + +## Docker Image Source: + +* [DockerHub -> ConfluentInc](https://hub.docker.com/u/confluentinc/) + +## Installing the Chart + +### Install along with cp-helm-charts + +```console +git clone https://github.com/confluentinc/cp-helm-charts.git +helm install cp-helm-charts +``` + +To install with a specific name, you can do: + +```console +helm install --name my-confluent cp-helm-charts +``` + +### Install with a existing CP-Kafka release + +```console +helm install --set kafka.bootstrapServers="PLAINTEXT://lolling-chinchilla-cp-kafka-headless:9092",cp-schema-registry.url="lolling-chinchilla-cp-schema-registry:8081" cp-helm-charts/charts/cp-kafka-connect +``` + +### Installed Components + +You can use `helm status ` to view all of the installed components. + +For example: + +```console +$ helm status kissing-macaw + +NAMESPACE: default +STATUS: DEPLOYED + +RESOURCES: +==> v1/Service +NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE +kissing-macaw-cp-kafka-connect ClusterIP 10.19.253.217 8083/TCP 34m + +==> v1beta2/Deployment +NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE +kissing-macaw-cp-kafka-connect 1 1 1 1 34m + +==> v1/Pod(related) +NAME READY STATUS RESTARTS AGE +kissing-macaw-cp-kafka-connect-6c77b8f5fd-cqlzq 1/1 Running 0 34m +``` + +There are +1. A [Deployment](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/) `kissing-macaw-cp-kafka-connect` which contains 1 Kafka Connect [Pod](https://kubernetes.io/docs/concepts/workloads/pods/pod-overview/): `kissing-macaw-cp-kafka-connect-6c77b8f5fd-cqlzq`. +2. A [Service](https://kubernetes.io/docs/concepts/services-networking/service/) `kissing-macaw-cp-kafka-connect` for clients to connect to Kafka Connect REST endpoint. + +## Configuration + +You can specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. + +Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, + +```console +helm install --name my-kafka-connect -f my-values.yaml ./cp-kafka-connect +``` + +> **Tip**: A default [values.yaml](values.yaml) is provided + +### Kafka Connect Deployment + +The configuration parameters in this section control the resources requested and utilized by the `cp-kafka-connect` chart. + +| Parameter | Description | Default | +| ----------------- | ------------------------------------- | --------- | +| `replicaCount` | The number of Kafka Connect Servers. | `1` | + +### Image + +| Parameter | Description | Default | +| --------- | ----------- | ------- | +| `image` | Docker Image of Confluent Kafka Connect. | `confluentinc/cp-kafka-connect` | +| `imageTag` | Docker Image Tag of Confluent Kafka Connect. | `6.1.0` | +| `imagePullPolicy` | Docker Image Tag of Confluent Kafka Connect. | `IfNotPresent` | +| `imagePullSecrets` | Secrets to be used for private registries. | see [values.yaml](values.yaml) for details | + +### Port + +| Parameter | Description | Default | +| --------- | ----------- | ------- | +| `servicePort` | The port on which the Kafka Connect will be available and serving requests. | `8083` | + +### Kafka Connect Worker Configurations + +| Parameter | Description | Default | +| --------- | ----------- | ------- | +| `configurationOverrides` | Kafka Connect [configuration](https://docs.confluent.io/current/connect/references/allconfigs.html) overrides in the dictionary format. | `{}` | +| `customEnv` | Custom environmental variables | `{}` | + +### Volumes + +| Parameter | Description | Default | +| --------- | ----------- | ------- | +| `volumes` | Volumes for connect-server container | see [values.yaml](values.yaml) for details | +| `volumeMounts` | Volume mounts for connect-server container | see [values.yaml](values.yaml) for details | + +### Secrets + +| Parameter | Description | Default | +| --------- | ----------- | ------- | +| `secrets` | Secret with one or more `key:value` pairs | see [values.yaml](values.yaml) for details | + +### Kafka Connect JVM Heap Options + +| Parameter | Description | Default | +| --------- | ----------- | ------- | +| `heapOptions` | The JVM Heap Options for Kafka Connect | `"-Xms512M -Xmx512M"` | + +### Resources + +| Parameter | Description | Default | +| --------- | ----------- | ------- | +| `resources.requests.cpu` | The amount of CPU to request. | see [values.yaml](values.yaml) for details | +| `resources.requests.memory` | The amount of memory to request. | see [values.yaml](values.yaml) for details | +| `resources.requests.limit` | The upper limit CPU usage for a Kafka Connect Pod. | see [values.yaml](values.yaml) for details | +| `resources.requests.limit` | The upper limit memory usage for a Kafka Connect Pod. | see [values.yaml](values.yaml) for details | + +### Annotations + +| Parameter | Description | Default | +| --------- | ----------- | ------- | +| `podAnnotations` | Map of custom annotations to attach to the pod spec. | `{}` | + +### JMX Configuration + +| Parameter | Description | Default | +| --------- | ----------- | ------- | +| `jmx.port` | The jmx port which JMX style metrics are exposed. | `5555` | + +### Prometheus JMX Exporter Configuration + +| Parameter | Description | Default | +| --------- | ----------- | ------- | +| `prometheus.jmx.enabled` | Whether or not to install Prometheus JMX Exporter as a sidecar container and expose JMX metrics to Prometheus. | `true` | +| `prometheus.jmx.image` | Docker Image for Prometheus JMX Exporter container. | `solsson/kafka-prometheus-jmx-exporter@sha256` | +| `prometheus.jmx.imageTag` | Docker Image Tag for Prometheus JMX Exporter container. | `6f82e2b0464f50da8104acd7363fb9b995001ddff77d248379f8788e78946143` | +| `prometheus.jmx.imagePullPolicy` | Docker Image Pull Policy for Prometheus JMX Exporter container. | `IfNotPresent` | +| `prometheus.jmx.port` | JMX Exporter Port which exposes metrics in Prometheus format for scraping. | `5556` | +| `prometheus.jmx.resources` | JMX Exporter resources configuration. | see [values.yaml](values.yaml) for details | + +### Running Custom Scripts + +| Parameter | Description | Default | +| --------- | ----------- | ------- | +| `customEnv.CUSTOM_SCRIPT_PATH` | Path to external bash script to run inside the container | see [values.yaml](values.yaml) for details | +| `livenessProbe` | Requirement of `livenessProbe` depends on the custom script to be run | see [values.yaml](values.yaml) for details | + +### Deployment Topology + +| Parameter | Description | Default | +| --------- | ----------- | ------- | +| `nodeSelector` | Dictionary containing key-value-pairs to match labels on nodes. When defined pods will only be scheduled on nodes, that have each of the indicated key-value pairs as labels. Further information can be found in the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/) | `{}` +| `tolerations`| Array containing taint references. When defined, pods can run on nodes, which would otherwise deny scheduling. Further information can be found in the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) | `{}` + +## Dependencies + +### Kafka + +| Parameter | Description | Default | +| --------- | ----------- | ------- | +| `kafka.bootstrapServers` | Bootstrap Servers for Kafka Connect | `""` | diff --git a/charts/cp-kafka-connect/templates/NOTES.txt b/charts/cp-kafka-connect/templates/NOTES.txt new file mode 100644 index 0000000..7fc1744 --- /dev/null +++ b/charts/cp-kafka-connect/templates/NOTES.txt @@ -0,0 +1,3 @@ +This chart installs a Confluent Kafka Connect + +https://docs.confluent.io/current/connect/index.html \ No newline at end of file diff --git a/charts/cp-kafka-connect/templates/_helpers.tpl b/charts/cp-kafka-connect/templates/_helpers.tpl new file mode 100644 index 0000000..902ef41 --- /dev/null +++ b/charts/cp-kafka-connect/templates/_helpers.tpl @@ -0,0 +1,81 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "cp-kafka-connect.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "cp-kafka-connect.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "cp-kafka-connect.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified kafka headless name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +*/}} +{{- define "cp-kafka-connect.cp-kafka-headless.fullname" -}} +{{- $name := "cp-kafka-headless" -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Form the Kafka URL. If Kafka is installed as part of this chart, use k8s service discovery, +else use user-provided URL +*/}} +{{- define "cp-kafka-connect.kafka.bootstrapServers" -}} +{{- if .Values.kafka.bootstrapServers -}} +{{- .Values.kafka.bootstrapServers -}} +{{- else -}} +{{- printf "PLAINTEXT://%s:9092" (include "cp-kafka-connect.cp-kafka-headless.fullname" .) -}} +{{- end -}} +{{- end -}} + +{{/* +Create a default fully qualified schema registry name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +*/}} +{{- define "cp-kafka-connect.cp-schema-registry.fullname" -}} +{{- $name := default "cp-schema-registry" (index .Values "cp-schema-registry" "nameOverride") -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "cp-kafka-connect.cp-schema-registry.service-name" -}} +{{- if (index .Values "cp-schema-registry" "url") -}} +{{- printf "%s" (index .Values "cp-schema-registry" "url") -}} +{{- else -}} +{{- printf "http://%s:8081" (include "cp-kafka-connect.cp-schema-registry.fullname" .) -}} +{{- end -}} +{{- end -}} + +{{/* +Default GroupId to Release Name but allow it to be overridden +*/}} +{{- define "cp-kafka-connect.groupId" -}} +{{- if .Values.overrideGroupId -}} +{{- .Values.overrideGroupId -}} +{{- else -}} +{{- .Release.Name -}} +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/charts/cp-kafka-connect/templates/deployment.yaml b/charts/cp-kafka-connect/templates/deployment.yaml new file mode 100644 index 0000000..4582f4a --- /dev/null +++ b/charts/cp-kafka-connect/templates/deployment.yaml @@ -0,0 +1,146 @@ +{{- if .Capabilities.APIVersions.Has "apps/v1" }} +apiVersion: apps/v1 +{{- else }} +apiVersion: apps/v1beta2 +{{- end }} +kind: Deployment +metadata: + name: {{ template "cp-kafka-connect.fullname" . }} + labels: + app: {{ template "cp-kafka-connect.name" . }} + chart: {{ template "cp-kafka-connect.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ template "cp-kafka-connect.name" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ template "cp-kafka-connect.name" . }} + release: {{ .Release.Name }} + {{- if or .Values.podAnnotations .Values.prometheus.jmx.enabled }} + annotations: + {{- range $key, $value := .Values.podAnnotations }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- if .Values.prometheus.jmx.enabled }} + prometheus.io/scrape: "true" + prometheus.io/port: {{ .Values.prometheus.jmx.port | quote }} + {{- end }} + {{- end }} + spec: + containers: + {{- if .Values.prometheus.jmx.enabled }} + - name: prometheus-jmx-exporter + image: "{{ .Values.prometheus.jmx.image }}:{{ .Values.prometheus.jmx.imageTag }}" + imagePullPolicy: "{{ .Values.prometheus.jmx.imagePullPolicy }}" + command: + - java + - -XX:+UnlockExperimentalVMOptions + - -XX:+UseCGroupMemoryLimitForHeap + - -XX:MaxRAMFraction=1 + - -XshowSettings:vm + - -jar + - jmx_prometheus_httpserver.jar + - {{ .Values.prometheus.jmx.port | quote }} + - /etc/jmx-kafka-connect/jmx-kafka-connect-prometheus.yml + ports: + - containerPort: {{ .Values.prometheus.jmx.port }} + resources: +{{ toYaml .Values.prometheus.jmx.resources | indent 12 }} + volumeMounts: + - name: jmx-config + mountPath: /etc/jmx-kafka-connect + {{- end }} + - name: {{ template "cp-kafka-connect.name" . }}-server + image: "{{ .Values.image }}:{{ .Values.imageTag }}" + imagePullPolicy: "{{ .Values.imagePullPolicy }}" + ports: + - name: kafka-connect + containerPort: {{ .Values.servicePort}} + protocol: TCP + {{- if .Values.prometheus.jmx.enabled }} + - containerPort: {{ .Values.jmx.port }} + name: jmx + {{- end }} + resources: +{{ toYaml .Values.resources | indent 12 }} + env: + - name: CONNECT_REST_ADVERTISED_HOST_NAME + valueFrom: + fieldRef: + fieldPath: status.podIP + - name: CONNECT_BOOTSTRAP_SERVERS + value: {{ template "cp-kafka-connect.kafka.bootstrapServers" . }} + - name: CONNECT_GROUP_ID + value: {{ template "cp-kafka-connect.groupId" . }} + - name: CONNECT_CONFIG_STORAGE_TOPIC + value: {{ template "cp-kafka-connect.fullname" . }}-config + - name: CONNECT_OFFSET_STORAGE_TOPIC + value: {{ template "cp-kafka-connect.fullname" . }}-offset + - name: CONNECT_STATUS_STORAGE_TOPIC + value: {{ template "cp-kafka-connect.fullname" . }}-status + - name: CONNECT_KEY_CONVERTER_SCHEMA_REGISTRY_URL + value: {{ template "cp-kafka-connect.cp-schema-registry.service-name" .}} + - name: CONNECT_VALUE_CONVERTER_SCHEMA_REGISTRY_URL + value: {{ template "cp-kafka-connect.cp-schema-registry.service-name" .}} + - name: KAFKA_HEAP_OPTS + value: "{{ .Values.heapOptions }}" + {{- range $key, $value := .Values.configurationOverrides }} + - name: {{ printf "CONNECT_%s" $key | replace "." "_" | upper | quote }} + value: {{ $value | quote }} + {{- end }} + {{- range $key, $value := .Values.customEnv }} + - name: {{ $key | quote }} + value: {{ $value | quote }} + {{- end }} + {{- if .Values.jmx.port }} + - name: KAFKA_JMX_PORT + value: "{{ .Values.jmx.port }}" + {{- end }} + {{- if .Values.customEnv.CUSTOM_SCRIPT_PATH }} + command: + - /bin/bash + - -c + - | + /etc/confluent/docker/run & + $CUSTOM_SCRIPT_PATH + sleep infinity + {{- if .Values.livenessProbe }} + livenessProbe: +{{ toYaml .Values.livenessProbe | trim | indent 12 }} + {{- end }} + {{- end }} + {{- if .Values.volumeMounts }} + volumeMounts: +{{ toYaml .Values.volumeMounts | indent 10 }} + {{- end}} + {{- if .Values.imagePullSecrets }} + imagePullSecrets: +{{ toYaml .Values.imagePullSecrets | indent 8 }} + {{- end }} + volumes: + {{- if .Values.volumes }} +{{ toYaml .Values.volumes | trim | indent 6 }} + {{- end}} + {{- if .Values.prometheus.jmx.enabled }} + - name: jmx-config + configMap: + name: {{ template "cp-kafka-connect.fullname" . }}-jmx-configmap + {{- end }} + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.tolerations }} + tolerations: +{{ toYaml .Values.tolerations | indent 8 }} + {{- end }} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 8 }} + {{- end }} diff --git a/charts/cp-kafka-connect/templates/jmx-configmap.yaml b/charts/cp-kafka-connect/templates/jmx-configmap.yaml new file mode 100644 index 0000000..d40f7c4 --- /dev/null +++ b/charts/cp-kafka-connect/templates/jmx-configmap.yaml @@ -0,0 +1,33 @@ +{{- if and .Values.prometheus.jmx.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "cp-kafka-connect.fullname" . }}-jmx-configmap + labels: + app: {{ template "cp-kafka-connect.name" . }} + chart: {{ template "cp-kafka-connect.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: + jmx-kafka-connect-prometheus.yml: |+ + jmxUrl: service:jmx:rmi:///jndi/rmi://localhost:{{ .Values.jmx.port }}/jmxrmi + lowercaseOutputName: true + lowercaseOutputLabelNames: true + ssl: false + whitelistObjectNames: + - kafka.connect:type=connect-worker-metrics + - kafka.connect:type=connect-metrics,client-id=* + - kafka.connect:type=connector-task-metrics,connector=*,task=* + rules: + - pattern : "kafka.connect([^:]+):" + name: "cp_kafka_connect_connect_worker_metrics_$1" + - pattern : "kafka.connect<>([^:]+)" + name: "cp_kafka_connect_connect_metrics_$1_$2" + - pattern : "kafka.connect<>status: ([^:]+)" + name: "cp_kafka_connect_connect_connector_metrics" + value: 1 + labels: + connector: $1 + task: $2 + status: $3 +{{- end }} diff --git a/charts/cp-kafka-connect/templates/secrets.yaml b/charts/cp-kafka-connect/templates/secrets.yaml new file mode 100644 index 0000000..bd066f8 --- /dev/null +++ b/charts/cp-kafka-connect/templates/secrets.yaml @@ -0,0 +1,16 @@ +{{- if .Values.secrets }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ template "cp-kafka-connect.fullname" . }} + labels: + app: {{ template "cp-kafka-connect.name" . }} + chart: {{ template "cp-kafka-connect.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +type: Opaque +data: + {{- range $key, $value := .Values.secrets }} + {{ $key }}: {{ $value | b64enc }} + {{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/cp-kafka-connect/templates/service.yaml b/charts/cp-kafka-connect/templates/service.yaml new file mode 100644 index 0000000..7ae84c2 --- /dev/null +++ b/charts/cp-kafka-connect/templates/service.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ template "cp-kafka-connect.fullname" . }} + labels: + app: {{ template "cp-kafka-connect.name" . }} + chart: {{ template "cp-kafka-connect.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + ports: + - name: kafka-connect + port: {{ .Values.servicePort }} + {{- if .Values.prometheus.jmx.enabled }} + - name: metrics + port: {{ .Values.prometheus.jmx.port }} + {{- end }} + selector: + app: {{ template "cp-kafka-connect.name" . }} + release: {{ .Release.Name }} diff --git a/charts/cp-kafka-connect/values.yaml b/charts/cp-kafka-connect/values.yaml new file mode 100644 index 0000000..ff2cad6 --- /dev/null +++ b/charts/cp-kafka-connect/values.yaml @@ -0,0 +1,135 @@ +# Default values for cp-kafka-connect. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +## Image Info +## ref: https://hub.docker.com/r/confluentinc/cp-kafka/ +image: confluentinc/cp-kafka-connect +imageTag: 6.1.0 + +## Specify a imagePullPolicy +## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images +imagePullPolicy: IfNotPresent + +## Specify an array of imagePullSecrets. +## Secrets must be manually created in the namespace. +## ref: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod +imagePullSecrets: + +servicePort: 8083 + +## Kafka Connect properties +## ref: https://docs.confluent.io/current/connect/userguide.html#configuring-workers +configurationOverrides: + "plugin.path": "/usr/share/java,/usr/share/confluent-hub-components" + "key.converter": "io.confluent.connect.avro.AvroConverter" + "value.converter": "io.confluent.connect.avro.AvroConverter" + "key.converter.schemas.enable": "false" + "value.converter.schemas.enable": "false" + "internal.key.converter": "org.apache.kafka.connect.json.JsonConverter" + "internal.value.converter": "org.apache.kafka.connect.json.JsonConverter" + "config.storage.replication.factor": "3" + "offset.storage.replication.factor": "3" + "status.storage.replication.factor": "3" + +## Kafka Connect JVM Heap Option +heapOptions: "-Xms512M -Xmx512M" + +## Additional env variables +## CUSTOM_SCRIPT_PATH is the path of the custom shell script to be ran mounted in a volume +customEnv: {} + # CUSTOM_SCRIPT_PATH: /etc/scripts/create-connectors.sh + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +## Custom pod annotations +podAnnotations: {} + +## Node labels for pod assignment +## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ +nodeSelector: {} + +## Taints to tolerate on node assignment: +## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ +tolerations: [] + +## Pod scheduling constraints +## Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity +affinity: {} + +## Monitoring +## Kafka Connect JMX Settings +## ref: https://kafka.apache.org/documentation/#connect_monitoring +jmx: + port: 5555 + +## Prometheus Exporter Configuration +## ref: https://prometheus.io/docs/instrumenting/exporters/ +prometheus: + ## JMX Exporter Configuration + ## ref: https://github.com/prometheus/jmx_exporter + jmx: + enabled: true + image: solsson/kafka-prometheus-jmx-exporter@sha256 + imageTag: 6f82e2b0464f50da8104acd7363fb9b995001ddff77d248379f8788e78946143 + imagePullPolicy: IfNotPresent + port: 5556 + + ## Resources configuration for the JMX exporter container. + ## See the `resources` documentation above for details. + resources: {} + +## You can list load balanced service endpoint, or list of all brokers (which is hard in K8s). e.g.: +## bootstrapServers: "PLAINTEXT://dozing-prawn-kafka-headless:9092" +kafka: + bootstrapServers: "" + +## If the Kafka Chart is disabled a URL and port are required to connect +## e.g. gnoble-panther-cp-schema-registry:8081 +cp-schema-registry: + url: "" + +## List of volumeMounts for connect server container +## ref: https://kubernetes.io/docs/concepts/storage/volumes/ +volumeMounts: +# - name: credentials +# mountPath: /etc/creds-volume + +## List of volumeMounts for connect server container +## ref: https://kubernetes.io/docs/concepts/storage/volumes/ +volumes: +# - name: credentials +# secret: +# secretName: creds + +## Secret with multiple keys to serve the purpose of multiple secrets +## Values for all the keys will be base64 encoded when the Secret is created or updated +## ref: https://kubernetes.io/docs/concepts/configuration/secret/ +secrets: + # username: kafka123 + # password: connect321 + +## These values are used only when "customEnv.CUSTOM_SCRIPT_PATH" is defined. +## "livenessProbe" is required only for the edge cases where the custom script to be ran takes too much time +## and errors by the ENTRYPOINT are ignored by the container +## As an example such a similar script is added to "cp-helm-charts/examples/create-connectors.sh" +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ +livenessProbe: + # httpGet: + # path: /connectors + # port: 8083 + # initialDelaySeconds: 30 + # periodSeconds: 5 + # failureThreshold: 10