confluentinc / cp-helm-charts

The Confluent Platform Helm charts enable you to deploy Confluent Platform services on Kubernetes for development, test, and proof of concept environments.
https://cnfl.io/getting-started-kafka-kubernetes
Apache License 2.0
787 stars 846 forks source link

Setting brokers to 1 does change replica could for cp-kafka stateful-set #291

Open kevinkirkup opened 5 years ago

kevinkirkup commented 5 years ago

If you try to set the broker value to 1 in either the configuration file or from the command line, helm still deploys 3 replicas.

helm install --debug --dry-run --name eventq --set brokers=1 confluentinc/cp-helm-charts
...
---
# Source: cp-helm-charts/charts/cp-kafka/templates/statefulset.yaml
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
  name: eventq-cp-kafka
  labels:
    app: cp-kafka
    chart: cp-kafka-0.1.0
    release: eventq
    heritage: Tiller
spec:
  serviceName: eventq-cp-kafka-headless
  podManagementPolicy: OrderedReady
  replicas: 3
  updateStrategy:
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: cp-kafka
        release: eventq
      annotations:
        prometheus.io/scrape: "true"
        prometheus.io/port: "5556"
    spec:
kevinkirkup commented 5 years ago

This works:

helm install --debug --dry-run --name eventq --set cp-kafka.brokers=1 confluentinc/cp-helm-charts

Seems like only the top level values.yaml file is being used for this. Other parameters are working as expected though.

kevinkirkup commented 5 years ago

Looks like the default values.yaml file pointed to in the documentation needs to be updated.

jswoods commented 5 years ago

@kevinkirkup I ran into this as well but this ended up working for me: https://github.com/confluentinc/cp-helm-charts/issues/264#issuecomment-498434970.