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

New ingress converter and haproxy types (part 1) #289

Merged
merged 3 commits into from
Jan 29, 2019

Conversation

jcmoraisjr
Copy link
Owner

Core types and starting implementation of a new ingress synchronizer, parser, and HAProxy updater.

A converter implementation parses k8s objects and convert to an internal representation of an HAProxy instance status. The only current implementation knows ingress resources and its dependencies, providing almost 100% of backward compatibility.

An HAProxy instance configuration has internal status which is updated by a converter. The HAProxy configurations doesn’t have coupling with k8s api. It has the responsibility of hold HAProxy current and previous status, compare each other in order to run dynamic update (if possible), update configuration files based on the internal status and reload HAProxy if dynamic update cannot be done.

The controller listen k8s api, create and hold all used objects (listers / cache), create and hold the HAProxy instance reference, create and exec an ingress converter every time the list of watching objects is changed.

This will be the default implementation on v0.8, deprecating common ingress. v0.9 will remove all legacy and unused common ingress code.

Some missing pieces of this starting version:

  • a lot of backend annotations
  • all global configs
  • template files
  • api docs
  • a few converters and haproxy tests

Implements #274

@jcmoraisjr jcmoraisjr added this to the v0.8 milestone Jan 21, 2019
@rikatz
Copy link
Contributor

rikatz commented Jan 24, 2019

Let me know if you need somewhere to test this. Some people say I've a good and huge environment for those kind of refactoring :P

@jcmoraisjr
Copy link
Owner Author

Hey, thanks for the offer! I'm aware of that environment. This'd be indeed an invaluable help on functional and also non functional tests.

Core types and starting implementation of a new ingress synchronizer, parser, and HAProxy updater

A converter implementation parses k8s objects and convert to an internal representation of an HAProxy instance status. The only current implementation knows ingress resources and its dependencies, providing almost 100% of backward compatibility.

An HAProxy instance configuration has internal status which is updated by a converter. The HAProxy configurations doesn’t have coupling with k8s api. It has the responsibility of hold HAProxy current and previous status, compare each other in order to run dynamic update (if possible), update configuration files based on the internal status and reload HAProxy if dynamic update cannot be done.

The controller listen k8s api, create and hold all used objects (listers / cache), create and hold the HAProxy instance reference, create and exec an ingress converter every time the list of watching objects is changed.

This will be the default implementation on v0.8, deprecating common ingress. v0.9 will remove all legacy and unused common ingress code.

Some missing pieces of this starting version:

* a lot of backend annotations
* all global configs
* template files
* api docs
* a few converters and haproxy tests
A new and already deprecated boolean command line option —v07-controller turn v0.7 controller implementation on if true, and the new v0.8 implementation will be used if false. v0.8 will be released with this option (default false) and will be removed on v0.9 with all legacy controller code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants