This repository has been archived by the owner on Feb 22, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16.7k
[incubator/kafka] Makes persistence fully configurable #3721
Merged
k8s-ci-robot
merged 11 commits into
helm:master
from
turntidetechnologies:kafka-toggle-persistence
Feb 28, 2018
Merged
Changes from 5 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
680934e
Makes kafka persistentVolume configurable
lsthornt 8ee0300
Downgrades version to 0.3.0
lsthornt e790c35
Cleans up
fedenusy 3d4a4b4
Fixes indentation
fedenusy 1dba9a6
Adds missing spaces for helm lint
fedenusy 581b8ee
Merge branch 'master' into kafka-toggle-persistence
fedenusy a819a79
Goes back to volumeClaimTemplates to support scaling
fedenusy 00a2901
Merge remote-tracking branch 'origin/kafka-toggle-persistence' into k…
fedenusy 218de82
Adds missing whitespace eater
fedenusy cf49f93
Follows best practices for defining storageClassName
fedenusy 99a9d53
Merge branch 'master' into kafka-toggle-persistence
lsthornt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -51,24 +51,28 @@ This chart includes a ZooKeeper chart as a dependency to the Kafka | |
cluster in its `requirement.yaml` by default. The chart can be customized using the | ||
following configurable parameters: | ||
|
||
| Parameter | Description | Default | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mostly whitespace changes here, because the |
||
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------- | | ||
| `image` | Kafka Container image name | `solsson/kafka` | | ||
| `imageTag` | Kafka Container image tag | `1.0.0` | | ||
| `imagePullPolicy` | Kafka Container pull policy | `Always` | | ||
| `replicas` | Kafka Brokers | `3` | | ||
| `component` | Kafka k8s selector key | `kafka` | | ||
| `resources` | Kafka resource requests and limits | `{}` | | ||
| `dataDirectory` | Kafka data directory | `/opt/kafka/data` | | ||
| `logSubPath` | Subpath under `dataDirectory` where kafka logs will be placed. `logs/` | `logs` | | ||
| `affinity` | Pod scheduling preferences | `{}` | | ||
| `storage` | Kafka Persistent volume size | `1Gi` | | ||
| `configurationOverrides` | `Kafka ` [configuration setting](https://kafka.apache.org/documentation/#brokerconfigs) overrides in the dictionary format `setting.name: value` | `{}` | | ||
| `schema-registry.enabled` | If True, installs Schema Registry Chart | `false` | | ||
| `updateStrategy` | StatefulSet update strategy to use. | `{ type: "OnDelete" }` | | ||
| `zookeeper.enabled` | If True, installs Zookeeper Chart | `true` | | ||
| `zookeeper.url` | URL of Zookeeper Cluster (unneeded if installing Zookeeper Chart) | `""` | | ||
| `zookeeper.port` | Port of Zookeeper Cluster | `2181` | | ||
| Parameter | Description | Default | | ||
| ------------------------------ | --------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- | | ||
| `image` | Kafka Container image name | `solsson/kafka` | | ||
| `imageTag` | Kafka Container image tag | `1.0.0` | | ||
| `imagePullPolicy` | Kafka Container pull policy | `Always` | | ||
| `replicas` | Kafka Brokers | `3` | | ||
| `component` | Kafka k8s selector key | `kafka` | | ||
| `resources` | Kafka resource requests and limits | `{}` | | ||
| `logSubPath` | Subpath under `persistence.mountPath` where kafka logs will be placed. | `logs` | | ||
| `affinity` | Pod scheduling preferences | `{}` | | ||
| `configurationOverrides` | `Kafka ` [configuration setting][brokerconfigs] overrides in the dictionary format | `setting.name: value` | `{}` | | ||
| `persistence.enabled` | Use a PVC to persist data | `true` | | ||
| `persistence.existingClaim` | Provide an existing PersistentVolumeClaim | `nil` | | ||
| `persistence.size` | Size of data volume | `1Gi` | | ||
| `persistence.mountPath` | Mount path of data volume | `/opt/kafka/data` | | ||
| `persistence.storageClass` | Storage class of backing PVC | `nil` | | ||
| `persistence.annotations` | Persistent Volume annotations | `{}` | | ||
| `schema-registry.enabled` | If True, installs Schema Registry Chart | `false` | | ||
| `updateStrategy` | StatefulSet update strategy to use. | `{ type: "OnDelete" }` | | ||
| `zookeeper.enabled` | If True, installs Zookeeper Chart | `true` | | ||
| `zookeeper.url` | URL of Zookeeper Cluster (unneeded if installing Zookeeper Chart) | `""` | | ||
| `zookeeper.port` | Port of Zookeeper Cluster | `2181` | | ||
|
||
Specify parameters using `--set key=value[,key=value]` argument to `helm install` | ||
|
||
|
@@ -111,3 +115,5 @@ Where `my-release` is the name of your helm release. | |
* Topic creation is not automated | ||
* Only supports storage options that have backends for persistent volume claims (tested mostly on AWS) | ||
* Kafka cluster is not accessible via an external endpoint | ||
|
||
[brokerconfigs]: https://kafka.apache.org/documentation/#brokerconfigs |
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,28 @@ | ||
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}} | ||
kind: "PersistentVolumeClaim" | ||
apiVersion: "v1" | ||
metadata: | ||
name: {{ include "kafka.fullname" . | quote }} | ||
labels: | ||
app: {{ include "kafka.fullname" . | quote }} | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" | ||
release: "{{ .Release.Name }}" | ||
heritage: "{{ .Release.Service }}" | ||
{{- if .Values.persistence.annotations }} | ||
annotations: | ||
{{ toYaml .Values.persistence.annotations | indent 4 }} | ||
{{- end }} | ||
spec: | ||
accessModes: | ||
- "ReadWriteOnce" | ||
resources: | ||
requests: | ||
storage: {{ .Values.persistence.size | quote }} | ||
{{- if .Values.persistence.storageClass }} | ||
{{- if (eq "-" .Values.persistence.storageClass) }} | ||
storageClassName: "" | ||
{{- else }} | ||
storageClassName: {{ .Values.persistence.storageClass | quote }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end -}} |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bumped minor version because some of the top-level config values nested underneath
persistence
. Otherwise, could be0.2.14