[bitnami/kafka] Support external access to every broker auto-discovering external ips/ports#2098
Conversation
|
I just resolved some conflicts |
rafariossaa
left a comment
There was a problem hiding this comment.
I found several port values not being able to be set in the values.yml, I think it is a good idea to let the user set them.
I added some comments on that on the code, but not all, please check all the statefulset.yaml file because I omitted several occurrences.
|
@rafariossaa the ports that are 'hardcoded' are the ones used on the Kafka pods. If you check the different services (JMX, Kafka, headless, etc.) you'll find that those ones are parametrised. On K8s we don't really care much about the ports used on the pod/container, the ones that we do really care and should be customisable are the ones used on services. |
miguelaeh
left a comment
There was a problem hiding this comment.
Thank you very much for this PR!!!
I left some minor comments, please take a look.
There was a problem hiding this comment.
What about doing this?:
for i in `seq 1 $retries`;
There was a problem hiding this comment.
Is that option better in terms of performance? If there's no "real" reason to change this, I'll keep it as it's.
There was a problem hiding this comment.
Well, I am not sure about the performance, as seq require to call an external command, but in the other hand using the normal for it will perform a comparison and an incrementation in every iteration.
Anyway, I don't think this kind of performance is worrying here, I just suggest it because it is cleaner.
There was a problem hiding this comment.
I don't consider it a "cleaner" solution. I think it's very subjective statement. Anyway, I don't think it's something important.
There was a problem hiding this comment.
Ok, no problem, it was just my opinion but there is nothing wrong in have it as it is.
…ing external ips/ports Signed-off-by: juan131 <juan@bitnami.com>
Signed-off-by: juan131 <juan@bitnami.com>
Signed-off-by: juan131 <juan@bitnami.com>
Signed-off-by: juan131 <juan@bitnami.com>
Signed-off-by: juan131 <juan@bitnami.com>
4ed102c to
60595fa
Compare
Signed-off-by: Bitnami Containers <containers@bitnami.com>
|
I have just updated the bitnami images with the latest known immutable tags:
|
| {{- else if $root.Values.externalAccess.autoDiscovery.enabled }} | ||
| targetPort: null | ||
| {{- else }} | ||
| targetPort: {{ index $root.Values.externalAccess.service.nodePort $i }} |
There was a problem hiding this comment.
Hi there,
The value in values.yaml and values-production.yaml is nodePorts, but here is nodePort.
| secretKeyRef: | ||
| name: {{ if .Values.auth.existingSecret }}{{ .Values.auth.existingSecret }}{{ else }}{{ template "kafka.fullname" . }}{{ end }} | ||
| name: {{ include "kafka.secretName" . }} | ||
| key: kafka-zookeeper-password |
There was a problem hiding this comment.
Hi there,
If I set auth.existingSecret but not auth.zookeeperPassword in values-producation.yaml, the KAFKA_ZOOKEEPER_PASSWORD won't be enabled. I think the expected behavior is that either (auth.zookeeperPassword exist) or (auth.existingSecret exist and kafka-zookeeper-password is in the secret ) should enable the value KAFKA_ZOOKEEPER_PASSWORD
|
Hi, I just installed the latest version of bitnami/kafka that also contains the changes from this pull-request into a Kubernetes 1.15 cluster, with metrics and serviceMonitor enabled: However, when looking at my Prometheus targets, I get the following: The serviceMonitors are discovered as expected, but the endpoints aren't (and hence no metrics get collected). It seems that changing the port names from Any ideas on this? Thanks! |
|
Wow, that was pretty fast! Thank you! |
|
You're welcome @oranje42 ! 😃 |
…ions (#2098) Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com>
Description of the change
This PR adds support to configure external access to every broker auto-discovering external ips/ports.
There are other features added:
Benefits
Possible drawbacks
None
Checklist
Chart.yamlaccording to semver.[bitnami/chart])values-production.yamlapart fromvalues.yaml, ensure that you implement the changes in both files