Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

traffic controller: watch Pod events #210

Merged
merged 2 commits into from
Oct 14, 2019
Merged

Conversation

juliogreff
Copy link
Contributor

The traffic controller needs to be notified of changes to pods, so it
can update the status of TrafficTargets, and make changes to other pods
if necessary. Currently, it relies on a resync of the TrafficTarget to
trigger any changes to pods that need to receive traffic.

If we run shipper without resyncs for long enough, it's possible that
pods will die and be re-scheduled without ever receiving traffic again.

Now, we apply the same technique we used in the other controllers to
watch for events in the application cluster objects.

This closes #206. Do not that this is not by far the desired end state for the traffic controller, as we still need to implement #23.

@juliogreff juliogreff added the bug Something isn't working label Oct 1, 2019
@juliogreff juliogreff added this to the release-0.7 milestone Oct 1, 2019
@juliogreff juliogreff self-assigned this Oct 1, 2019
osdrv
osdrv previously approved these changes Oct 7, 2019
parhamdoustdar
parhamdoustdar previously approved these changes Oct 9, 2019
@parhamdoustdar parhamdoustdar marked this pull request as ready for review October 9, 2019 14:42
The traffic controller needs to be notified of changes to pods, so it
can update the status of TrafficTargets, and make changes to other pods
if necessary. Currently, it relies on a resync of the TrafficTarget to
trigger any changes to pods that need to receive traffic.

If we run shipper without resyncs for long enough, it's possible that
pods will die and be re-scheduled without ever receiving traffic again.

Now, we apply the same technique we used in the other controllers to
watch for events in the application cluster objects.
This prevents weirder to debug issues, as otherwise we'd try to get
InstallationTargets and TrafficTargets with the label set to "", and
that would obviously fail, with `cannot get installation/traffic target
for release 'ns/': not found`. Now we at least point the future debugger
to where the problem might be.
@osdrv osdrv merged commit f7c4ac3 into master Oct 14, 2019
@osdrv osdrv deleted the jgreff/traffic-watch-pods branch October 14, 2019 11:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Traffic controller does not watch changes to pods
3 participants