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

Introduce fleet summary report in Capacity Target #69

Merged
merged 31 commits into from
Mar 19, 2019

Conversation

isutton
Copy link
Contributor

@isutton isutton commented Feb 20, 2019

This PR introduces the fleet summary report in Capacity Target objects. This report is intended to be used to produce more meaningful conditions in Release objects, to help Shipper users to better understand their applications' status across Shipper managed clusters.

The approach chosen to implement this feature was to create a report builder. This report builder accumulates relevant Pod data while iterating the list of Pods in a single cluster.

The decision of introducing a builder happened in the middle of the implementation, after introducing builders for testing purposes, which shed some light on the complexity of the original implementation, so I advise not review this PR per commit.

Closes #21

Igor Sutton added 30 commits February 20, 2019 09:38
This is still incomplete: container entries should be aggregated when
processing container states.
* Remove unused field
* Fix sort predicate implementation
* Remove unused field
package builder

import (
"github.com/pmezard/go-difflib/difflib"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A minor remark: this package is no longer maintained, we might consider forking it or using an alternative.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already vendor it in the project. If required, we could fork it into bookingcom organization and change the import path.

Do you think this is relevant for this PR?

osdrv
osdrv previously approved these changes Mar 1, 2019
function to `AddOrIncrementContainerState` since it matches what the
function does more closely. Also changed `AddState` to
`AddOrIncrementState` and removed the argument there, too.

I'm leaving the `initialCount` argument of `NewPodBuilder` untouched
because that one is actually set at object instantiation time, and
it's always taken into account, unlike the two functions I mentioned above.
@parhamdoustdar parhamdoustdar merged commit 5a8ddb1 into master Mar 19, 2019
@parhamdoustdar parhamdoustdar deleted the isutton/6-capacity-fleet-summary branch March 19, 2019 09:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants