From 4e543200a9580ec76945d73045d90ea1fdc22a49 Mon Sep 17 00:00:00 2001 From: Braden Wright Date: Thu, 10 May 2018 08:42:55 -0500 Subject: [PATCH] [incubator/schema-registry] cleaning up after myself (README, ununsed code) (#5352) * cleaning up after myself (README, ununsed code), also bumped the version of kafka dependency while I was at it * a little clean up, and retest me * cleaned up comments --- incubator/schema-registry/Chart.yaml | 2 +- incubator/schema-registry/README.md | 2 -- incubator/schema-registry/requirements.lock | 6 ++--- incubator/schema-registry/requirements.yaml | 2 +- .../schema-registry/templates/_helpers.tpl | 19 +++----------- .../schema-registry/templates/deployment.yaml | 4 +-- incubator/schema-registry/values.yaml | 25 +++++++++++-------- 7 files changed, 25 insertions(+), 35 deletions(-) diff --git a/incubator/schema-registry/Chart.yaml b/incubator/schema-registry/Chart.yaml index f1da545e5f..7139a7d08d 100644 --- a/incubator/schema-registry/Chart.yaml +++ b/incubator/schema-registry/Chart.yaml @@ -1,6 +1,6 @@ name: schema-registry home: https://docs.confluent.io/current/schema-registry/docs/index.html -version: 0.3.0 +version: 0.3.1 appVersion: 4.0.0 keywords: - confluent diff --git a/incubator/schema-registry/README.md b/incubator/schema-registry/README.md index ed175ca43c..7a09c5739f 100644 --- a/incubator/schema-registry/README.md +++ b/incubator/schema-registry/README.md @@ -83,5 +83,3 @@ The following table lists the configurable parameters of the SchemaRegistry char | `kafka.enabled` | If `true`, install Kafka/Zookeeper alongside the `SchemaRegistry`. This is intended for testing and argument-less helm installs of this chart only and should not be used in Production. | `true` | | `kafka.replicas` | The number of Kafka Pods to install as part of the `StatefulSet` if `kafka.Enabled` is `true`| `1` | | `kafka.zookeeper.servers` | The number of Zookeeper Pods to install as part of the `StatefulSet` if `kafka.Enabled` is `true`| `1` | -| `kafka.ZookeeperUrl` | The URL of the Zookeeper servicing the Kafka installation if `Kafka.Enabled` is `false` | `""` | -| `kafka.ZookeeperPort` | The Port of the Zookeeper servicing the Kafka installation if `Kafka.Enabled` is `false` | `2181` | diff --git a/incubator/schema-registry/requirements.lock b/incubator/schema-registry/requirements.lock index ecbc7e8aed..dc0015ac97 100644 --- a/incubator/schema-registry/requirements.lock +++ b/incubator/schema-registry/requirements.lock @@ -1,6 +1,6 @@ dependencies: - name: kafka repository: https://kubernetes-charts-incubator.storage.googleapis.com/ - version: 0.2.2 -digest: sha256:43aedc891276fa0f681a738c003e0bf8f458bf05cf3087e010b0ee3f3bb5c9ec -generated: 2017-11-29T14:12:11.958088-06:00 + version: 0.7.0 +digest: sha256:c399015621a2e560cd0ae1ca3200582728a6b5ad345b38b958b825c678565535 +generated: 2018-05-02T08:52:15.399751782-05:00 diff --git a/incubator/schema-registry/requirements.yaml b/incubator/schema-registry/requirements.yaml index 5eca74be36..1eebceec93 100644 --- a/incubator/schema-registry/requirements.yaml +++ b/incubator/schema-registry/requirements.yaml @@ -1,5 +1,5 @@ dependencies: - name: kafka - version: 0.2.2 + version: 0.7.0 repository: https://kubernetes-charts-incubator.storage.googleapis.com/ condition: kafka.enabled diff --git a/incubator/schema-registry/templates/_helpers.tpl b/incubator/schema-registry/templates/_helpers.tpl index 01a4e1e8fa..2a17d2d13f 100644 --- a/incubator/schema-registry/templates/_helpers.tpl +++ b/incubator/schema-registry/templates/_helpers.tpl @@ -15,19 +15,6 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this {{- 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 "kafka-zookeeper.url" }} -{{- $port := .Values.kafka.zookeeperPort | toString }} -{{- if .Values.kafka.enabled -}} -{{- printf "%s-zookeeper:%s" .Release.Name $port }} -{{- else -}} -{{- printf "%s:%s" .Values.kafka.zookeeperUrl $port }} -{{- end -}} -{{- end -}} - {{/* Form the Kafka URL. If Kafka is installed as part of this chart, use k8s service discovery, else use user-provided URL @@ -43,9 +30,9 @@ else use user-provided URL {{/* Default GroupId to Release Name but allow it to be overridden */}} -{{- define "schema-registry.groupId" -}} -{{- if .Values.overrideGroupId -}} -{{- .Values.overrideGroupId -}} +{{- define "schema-registry.kafkaStore.groupId" -}} +{{- if .Values.kafkaStore.overrideGroupId -}} +{{- .Values.kafkaStore.overrideGroupId -}} {{- else -}} {{- .Release.Name -}} {{- end -}} diff --git a/incubator/schema-registry/templates/deployment.yaml b/incubator/schema-registry/templates/deployment.yaml index 85d55f231c..08ff8f7952 100644 --- a/incubator/schema-registry/templates/deployment.yaml +++ b/incubator/schema-registry/templates/deployment.yaml @@ -83,12 +83,12 @@ spec: - name: SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS value: {{ template "schema-registry.kafkaStore.bootstrapServers" . }} - name: SCHEMA_REGISTRY_KAFKASTORE_GROUP_ID - value: {{ template "schema-registry.groupId" . }} + value: {{ template "schema-registry.kafkaStore.groupId" . }} - name: SCHEMA_REGISTRY_MASTER_ELIGIBILITY value: "true" {{ range $configName, $configValue := .Values.configurationOverrides }} - name: SCHEMA_REGISTRY_{{ $configName | replace "." "_" | upper }} - value: {{ $configValue }} + value: {{ $configValue | quote }} {{ end }} {{- if .Values.schemaRegistryOpts }} # The pre-flight checks use KAFKA_OPTS instead of SCHEMA_REGISTRY_OPTS. diff --git a/incubator/schema-registry/values.yaml b/incubator/schema-registry/values.yaml index 17137533b5..d57df19ef8 100644 --- a/incubator/schema-registry/values.yaml +++ b/incubator/schema-registry/values.yaml @@ -3,14 +3,11 @@ # Declare name/value pairs to be passed into your templates. # name: value -# By Default uses Release Name, but can be overridden. Which means each release is its own group of -# Schema Registry workers. You can have multiple groups talking to same Kafka Cluster -overrideGroupId: "" ## schema-registry repository image: "confluentinc/cp-schema-registry" ## The container tag to use -imageTag: "4.0.0" +imageTag: 4.0.1 ## Specify a imagePullPolicy ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images imagePullPolicy: "IfNotPresent" @@ -20,7 +17,8 @@ replicaCount: 1 ## Schema Registry Settings Overrides ## Configuration Options can be found here: https://docs.confluent.io/current/schema-registry/docs/config.html -configurationOverrides: {} +configurationOverrides: + kafkastore.topic.replication.factor: 1 ## Configure resource requests and limits ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ @@ -44,8 +42,11 @@ servicePort: 8081 ## Charts uses Kafka Coordinator Master Election: https://docs.confluent.io/current/schema-registry/docs/design.html#kafka-coordinator-master-election kafkaStore: overrideBootstrapServers: "" -## Additional Java arguments to pass to Kafka. -# schemaRegistryOpts: -Dfoo=bar + # By Default uses Release Name, but can be overridden. Which means each release is its own group of + # Schema Registry workers. You can have multiple groups talking to same Kafka Cluster + overrideGroupId: "" + ## Additional Java arguments to pass to Kafka. + # schemaRegistryOpts: -Dfoo=bar # Options for connecting to SASL kafka brokers sasl: @@ -79,8 +80,12 @@ sasl: kafka: ## This is enabled only to allow installations of this chart without arguments enabled: true - ## Install 3x Kafka pods in the StatefulSet, 3 are wanted for default settings in Kafka-Connect - Replicas: 3 + imageTag: 4.0.1 + configurationOverrides: + # Needed to run with 1 Kafka Broker + offsets.topic.replication.factor: 1 + replicas: 1 + ## Install only a single Zookeeper pod in the StatefulSet zookeeper: - Servers: 1 + servers: 1