diff --git a/packages/apps/kafka/Chart.yaml b/packages/apps/kafka/Chart.yaml new file mode 100644 index 00000000..2ed27680 --- /dev/null +++ b/packages/apps/kafka/Chart.yaml @@ -0,0 +1,25 @@ +apiVersion: v2 +name: kafka +description: Managed Kafka service +icon: https://upload.wikimedia.org/wikipedia/commons/0/05/Apache_kafka.svg + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.16.0" diff --git a/packages/apps/kafka/templates/kafka.yaml b/packages/apps/kafka/templates/kafka.yaml new file mode 100644 index 00000000..345f33e2 --- /dev/null +++ b/packages/apps/kafka/templates/kafka.yaml @@ -0,0 +1,53 @@ +apiVersion: kafka.strimzi.io/v1beta2 +kind: Kafka +metadata: + name: {{ .Release.Name }} + labels: + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} +spec: + kafka: + replicas: 3 + listeners: + - name: plain + port: 9092 + type: internal + tls: false + - name: tls + port: 9093 + type: internal + tls: true + - name: external + port: 9094 + {{- if .Values.external }} + type: loadbalancer + {{- else }} + type: internal + {{- end }} + tls: false + config: + offsets.topic.replication.factor: 3 + transaction.state.log.replication.factor: 3 + transaction.state.log.min.isr: 2 + default.replication.factor: 3 + min.insync.replicas: 2 + storage: + type: jbod + volumes: + - id: 0 + type: persistent-claim + {{- with .Values.kafka.size }} + size: {{ . }} + {{- end }} + deleteClaim: true + zookeeper: + replicas: 3 + storage: + type: persistent-claim + {{- with .Values.zookeeper.size }} + size: {{ . }} + {{- end }} + deleteClaim: false + entityOperator: + topicOperator: {} + userOperator: {} diff --git a/packages/apps/kafka/templates/topics.yaml b/packages/apps/kafka/templates/topics.yaml new file mode 100644 index 00000000..e4f4ea8c --- /dev/null +++ b/packages/apps/kafka/templates/topics.yaml @@ -0,0 +1,17 @@ +{{- range $topic := .Values.topics }} +--- +apiVersion: kafka.strimzi.io/v1beta2 +kind: KafkaTopic +metadata: + name: "{{ $.Release.Name }}-{{ kebabcase $topic.name }}" + labels: + strimzi.io/cluster: "{{ $.Release.Name }}" +spec: + topicName: "{{ $topic.name }}" + partitions: 10 + replicas: 3 + {{- with $topic.config }} + config: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/packages/apps/kafka/values.yaml b/packages/apps/kafka/values.yaml new file mode 100644 index 00000000..8978312d --- /dev/null +++ b/packages/apps/kafka/values.yaml @@ -0,0 +1,20 @@ +external: false +kafka: + size: 10Gi +zookeeper: + size: 5Gi + +topics: + - name: Results + partitions: 1 + replicas: 3 + config: + min.insync.replicas: 2 + - name: Orders + config: + cleanup.policy: compact + segment.ms: 3600000 + max.compaction.lag.ms: 5400000 + min.insync.replicas: 2 + partitions: 1 + replicationFactor: 3 diff --git a/packages/apps/versions_map b/packages/apps/versions_map index 51684e44..6fe6f60b 100644 --- a/packages/apps/versions_map +++ b/packages/apps/versions_map @@ -1,5 +1,6 @@ clickhouse 0.1.0 HEAD http-cache 0.1.0 HEAD +kafka 0.1.0 HEAD kubernetes 0.1.0 HEAD mysql 0.1.0 f642698 mysql 0.2.0 HEAD