Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from init container to sidecar, with Kafka 1.1.0 #167

Merged
merged 9 commits into from
Apr 8, 2018

Conversation

solsson
Copy link
Contributor

@solsson solsson commented Apr 6, 2018

... to set the stage for some kind of tooling around Kafka 1.1+ dynamic config. I'm particularily interested in runtime listeners reconfiguration, to better support out-of-cluster use cases such as #78.

solsson added 5 commits April 7, 2018 00:04
for future dynamic config support.
Can be evaluated manually now (with Kafka 1.1.0) by exec
to config pod and edit of server.properties there.

If the init container is slow, which is unlikely,
kafka will crash loop until server.properties exists
and upon existence start normally.
@solsson
Copy link
Contributor Author

solsson commented Apr 6, 2018

For 4.x I'd like to include #148 + some kind of option for sidecar using custom image build (see #155 for background) + RollingUpdate. Can go through our dev and QA together with Kafka 1.1.

@solsson
Copy link
Contributor Author

solsson commented Apr 7, 2018

Maybe we'd be better off with init an init script using set -e? For example if kubectl suffers a transitive error today we might get a kafka pod with deviating config.

We'd have to change how we gracefully handle zone lookup failures in the default script, but we could simplify the sed checking at the end.

@solsson solsson added this to the 4.0 milestone Apr 7, 2018
@solsson
Copy link
Contributor Author

solsson commented Apr 8, 2018

Maybe we'd be better off with init an init script using set -e? For example if kubectl suffers a transitive error today we might get a kafka pod with deviating config.

Created #168.

I'm merging this now to 4.x so we can base testing on it. The only drawback I can see now is that I tend to get restarts=1 in pod listings, because init involving kubectl is slower than Kafka JVM start.

@solsson solsson changed the title Switch from init container to sidecar Switch from init container to sidecar, with Kafka 1.1.0 Apr 8, 2018
@solsson solsson merged commit c9c5015 into 4.x Apr 8, 2018
@solsson
Copy link
Contributor Author

solsson commented Apr 8, 2018

To clarify: This PR did not introduce any support for actually changing any config dynamically, beyond what an upgrade to Kafka 1.1 does. It only recognizes that Updating Broker Configs is part broker-level. Annotations and labels may play a part here, as with Zookeeper.

It's quite likely that the init script can be reduced in scope, because #78 can now be implemented (and customized) in a way that is persistent in ZooKeeper and takes precedence over server.properties.

broker.rack is still read-only though. We could hope for kubernetes/kubernetes#62078 to let us do that without RBAC + kubectl.

@StevenACoffman Do you have ideas on the direction here?

@solsson
Copy link
Contributor Author

solsson commented Apr 8, 2018

The only drawback I can see now is that I tend to get restarts=1 in pod listings, because init involving kubectl is slower than Kafka JVM start.

kubernetes/kubernetes#62078 (comment) would probably solve that together with:

It's quite likely that the init script can be reduced in scope, because #78 can now be implemented (and customized) in a way that is persistent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant