-
Notifications
You must be signed in to change notification settings - Fork 742
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add canary factory for Kubernetes targets
- extract Kubernetes operations to controller interface - implement controller interface for kind Deployment
- Loading branch information
1 parent
c2cf9bf
commit a25bacd
Showing
12 changed files
with
238 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package canary | ||
|
||
import "github.com/weaveworks/flagger/pkg/apis/flagger/v1alpha3" | ||
|
||
type Controller interface { | ||
IsPrimaryReady(cd *v1alpha3.Canary) (bool, error) | ||
IsCanaryReady(cd *v1alpha3.Canary) (bool, error) | ||
SyncStatus(cd *v1alpha3.Canary, status v1alpha3.CanaryStatus) error | ||
SetStatusFailedChecks(cd *v1alpha3.Canary, val int) error | ||
SetStatusWeight(cd *v1alpha3.Canary, val int) error | ||
SetStatusIterations(cd *v1alpha3.Canary, val int) error | ||
SetStatusPhase(cd *v1alpha3.Canary, phase v1alpha3.CanaryPhase) error | ||
Initialize(cd *v1alpha3.Canary, skipLivenessChecks bool) (label string, ports map[string]int32, err error) | ||
Promote(cd *v1alpha3.Canary) error | ||
HasDeploymentChanged(cd *v1alpha3.Canary) (bool, error) | ||
HasConfigChanged(cd *v1alpha3.Canary) (bool, error) | ||
Scale(cd *v1alpha3.Canary, replicas int32) error | ||
ScaleUp(cd *v1alpha3.Canary) error | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.