-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Incorrect handling of parallel CDStageDeploy (#71)
Added in-queue status for CDStageDeploy. This status is for CDStageDeploy, which waits for the previous deployment to be ready. We can only have one CDStageDeploy status in-queue; all other CDStageDeploy will be skipped. This will allow us to get the latest versions and not run redundant deployments.
- Loading branch information
Showing
10 changed files
with
459 additions
and
352 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 |
---|---|---|
|
@@ -93,6 +93,7 @@ spec: | |
- running | ||
- pending | ||
- completed | ||
- in-queue | ||
type: string | ||
type: object | ||
type: object | ||
|
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 |
---|---|---|
@@ -1,17 +1,13 @@ | ||
package chain | ||
|
||
import ( | ||
ctrl "sigs.k8s.io/controller-runtime" | ||
"sigs.k8s.io/controller-runtime/pkg/client" | ||
|
||
"github.com/epam/edp-codebase-operator/v2/controllers/codebaseimagestream/chain/handler" | ||
) | ||
|
||
var log = ctrl.Log.WithName("codebase-image-stream") | ||
|
||
func CreateDefChain(c client.Client) handler.CodebaseImageStreamHandler { | ||
return PutCDStageDeploy{ | ||
client: c, | ||
log: log.WithName("create-chain").WithName("put-cd-stage-deploy"), | ||
} | ||
} |
4 changes: 3 additions & 1 deletion
4
controllers/codebaseimagestream/chain/handler/codebase_image_stream_handler.go
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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
package handler | ||
|
||
import ( | ||
"context" | ||
|
||
codebaseApi "github.com/epam/edp-codebase-operator/v2/api/v1" | ||
) | ||
|
||
type CodebaseImageStreamHandler interface { | ||
ServeRequest(imageStream *codebaseApi.CodebaseImageStream) error | ||
ServeRequest(ctx context.Context, imageStream *codebaseApi.CodebaseImageStream) 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
Oops, something went wrong.