-
Notifications
You must be signed in to change notification settings - Fork 831
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Helm chart for Kafka cluster setup (#477)
* Remove trailing whitespace in CRDs in Helm chart * Add Chart manifest for Kafka cluster * Move Kafka cluster & user manifests to chart templates * Add basic parameterisation for Kafka cluster values * Add enable toggles for plaintext & TLS listeners Also change structure of Helm values to be nested for plaintext & TLS listener config. * Parameterise listener types & change to internal by default * Add Helm vars for broker probe timeouts * Add Helm vars for topic config * Add Helm vars for broker storage config * Add Helm vars for Zookeeper probe timeouts * Add Helm vars for Zookeeper storage config * Separate metrics config to separate Helm template * Reorder Ansible Kafka vars for logical grouping * Use feature gate toggle in Kafka role instead of duplicating logic * Use Kafka cluster Helm chart in Ansible * Fix whitespace chomping issues in cluster template * Add Python requirements for Ansible playbooks * Add Ansible Galaxy requirements for playbooks * Disable Grafana installation in Ansible ecosystem * Remove unused value Variables set in one role are not visible to others. Inheritence is hierarchical and does not include siblings. * Force reinstallation of Kafka Helm chart in case of changes to the chart itself This is mostly a convenience when developing, as we would otherwise expect published chart versions which should not be changing (patches are new versions). * Allow passing Helm values to Kafka chart via Ansible * Allow disabling Kafka metrics in Helm chart * Allow disabling KafkaUser CR creation in Helm chart
- Loading branch information
Showing
11 changed files
with
172 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ansible>=4.2.0,<5.0.0 | ||
docker>=5.0.0,<6.0.0 | ||
openshift>=0.12.0,<0.13.0 | ||
passlib>=1.7.4,<2.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
collections: | ||
- name: https://github.com/SeldonIO/ansible-k8s-collection.git | ||
type: git | ||
version: ddad72dcff53dd8ca05ca477f74df7992fd489fc | ||
- name: kubernetes.core | ||
version: 2.3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: v2 | ||
type: application | ||
|
||
version: 0.1.0 | ||
appVersion: "0.2.0-dev" | ||
name: "seldon-core-v2-kafka" | ||
description: "A Kafka cluster suitable for Seldon Core v2" | ||
maintainers: | ||
- name: Seldon Technologies Ltd | ||
email: hello@seldon.io | ||
url: www.seldon.io | ||
home: https://docs.seldon.io/projects/seldon-core-v2 | ||
sources: | ||
- https://github.com/SeldonIO/seldon-core-v2/kafka/strimzi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
apiVersion: kafka.strimzi.io/v1beta2 | ||
kind: Kafka | ||
metadata: | ||
name: {{ .Values.cluster.name }} | ||
spec: | ||
entityOperator: | ||
userOperator: {} | ||
kafka: | ||
version: {{ .Values.cluster.version }} | ||
replicas: {{ .Values.broker.replicas }} | ||
listeners: | ||
{{- if .Values.broker.plaintext.enabled }} | ||
- name: plain | ||
port: {{ .Values.broker.plaintext.port }} | ||
type: {{ .Values.broker.plaintext.listenerType }} | ||
tls: false | ||
{{- end }} | ||
{{- if .Values.broker.tls.enabled }} | ||
- name: tls | ||
port: {{ .Values.broker.tls.port }} | ||
type: {{ .Values.broker.tls.listenerType }} | ||
tls: true | ||
authentication: | ||
type: tls | ||
{{- end }} | ||
readinessProbe: | ||
initialDelaySeconds: {{ .Values.broker.readiness.initialDelaySeconds }} | ||
timeoutSeconds: {{ .Values.broker.readiness.timeoutSeconds }} | ||
livenessProbe: | ||
initialDelaySeconds: {{ .Values.broker.liveness.initialDelaySeconds }} | ||
timeoutSeconds: {{ .Values.broker.liveness.timeoutSeconds }} | ||
config: | ||
auto.create.topics.enable: {{ .Values.topic.autoCreate }} | ||
offsets.topic.replication.factor: {{ .Values.topic.offsetReplicationFactor }} | ||
transaction.state.log.replication.factor: {{ .Values.topic.txStateReplicationFactor }} | ||
transaction.state.log.min.isr: {{ .Values.topic.txStateMinISR }} | ||
default.replication.factor: {{ .Values.topic.defaultReplicationFactor }} | ||
min.insync.replicas: {{ .Values.topic.minISR }} | ||
inter.broker.protocol.version: {{ .Values.broker.interBrokerProtocolVersion }} | ||
template: | ||
pod: | ||
tmpDirSizeLimit: {{ .Values.broker.tmpDirSizeLimit }} | ||
storage: | ||
type: jbod | ||
volumes: | ||
- id: 0 | ||
type: persistent-claim | ||
size: {{ .Values.broker.pvcSize }} | ||
deleteClaim: false | ||
metricsConfig: | ||
type: jmxPrometheusExporter | ||
valueFrom: | ||
configMapKeyRef: | ||
name: kafka-metrics | ||
key: kafka-metrics-config.yml | ||
# zookeeper settings should not be use in case of STRIMZI_FEATURE_GATES=+UseStrimziPodSets,+UseKRaft (raft) | ||
# to enable raft run: | ||
# `kubectl set env deployment/strimzi-cluster-operator STRIMZI_FEATURE_GATES=+UseStrimziPodSets,+UseKRaft -n kafka` | ||
# which is the default with ansible install | ||
zookeeper: | ||
replicas: {{ .Values.zookeeper.replicas }} | ||
readinessProbe: | ||
initialDelaySeconds: {{ .Values.zookeeper.readiness.initialDelaySeconds }} | ||
timeoutSeconds: {{ .Values.zookeeper.readiness.timeoutSeconds }} | ||
livenessProbe: | ||
initialDelaySeconds: {{ .Values.zookeeper.liveness.initialDelaySeconds }} | ||
timeoutSeconds: {{ .Values.zookeeper.liveness.timeoutSeconds }} | ||
storage: | ||
type: persistent-claim | ||
size: {{ .Values.zookeeper.pvcSize }} | ||
deleteClaim: false | ||
kafkaExporter: | ||
topicRegex: ".*" | ||
groupRegex: ".*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
cluster: | ||
name: "seldon" | ||
version: "3.2.0" | ||
|
||
metrics: | ||
enabled: true | ||
|
||
broker: | ||
replicas: 3 | ||
|
||
plaintext: | ||
enabled: true | ||
port: 9092 | ||
listenerType: internal | ||
|
||
tls: | ||
enabled: true | ||
port: 9093 | ||
listenerType: internal | ||
|
||
readiness: | ||
initialDelaySeconds: 15 | ||
timeoutSeconds: 5 | ||
|
||
liveness: | ||
initialDelaySeconds: 15 | ||
timeoutSeconds: 5 | ||
|
||
interBrokerProtocolVersion: "3.2" | ||
|
||
tmpDirSizeLimit: 100Mi | ||
|
||
pvcSize: 100Gi | ||
|
||
topic: | ||
autoCreate: true | ||
offsetReplicationFactor: 1 | ||
txStateReplicationFactor: 1 | ||
txStateMinISR: 1 | ||
defaultReplicationFactor: 1 | ||
minISR: 1 | ||
|
||
zookeeper: | ||
replicas: 1 | ||
|
||
readiness: | ||
initialDelaySeconds: 15 | ||
timeoutSeconds: 5 | ||
|
||
liveness: | ||
initialDelaySeconds: 15 | ||
timeoutSeconds: 5 | ||
|
||
pvcSize: 100Gi |