New ingress converter and haproxy types (part 1) #289
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
Implements #274