-
Notifications
You must be signed in to change notification settings - Fork 378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pipeline refactor and cluster watch #731
Merged
erda-bot
merged 18 commits into
erda-project:master
from
chengjoey:feature/pipeline-clusterinfo
Jul 5, 2021
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
1c458a9
get clusters when pipeline init
chengjoey eefbbcb
add k8sjob task executor for pipeline
chengjoey 7028ba8
add pipeline cluster hook
chengjoey abed09f
add flink schema
chengjoey 86bf557
add k8s flink task executor
chengjoey ae839b8
add k8s spark task executor
chengjoey 83c49cd
add metronome task executor
chengjoey cba4637
add k8sjob task executor for pipeline
chengjoey e9591dd
set cluster info when task executor initialize
chengjoey 4320a39
add affinity for k8sjob
chengjoey 4008b55
add flink and metronome task executor for pipeline scheduler
chengjoey 105ec65
add field job id for task extra
chengjoey 38d40e2
add spark task executor
chengjoey eaea5bf
delete dc/os executor
chengjoey cea7091
delete scheduler k8sjob,k8sflink,k8sspark executor
chengjoey 1c1167b
register cluster hook
chengjoey 39047d4
replace mod pkg github.com/googlecloudplatform to github.com/GoogleCl…
chengjoey a58ff1a
Merge branch 'master' into feature/pipeline-clusterinfo
erda-bot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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
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,41 @@ | ||
// Copyright (c) 2021 Terminus, Inc. | ||
// | ||
// This program is free software: you can use, redistribute, and/or modify | ||
// it under the terms of the GNU Affero General Public License, version 3 | ||
// or later ("AGPL"), as published by the Free Software Foundation. | ||
// | ||
// This program is distributed in the hope that it will be useful, but WITHOUT | ||
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
// FITNESS FOR A PARTICULAR PURPOSE. | ||
// | ||
// You should have received a copy of the GNU Affero General Public License | ||
// along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
package endpoints | ||
|
||
import ( | ||
"context" | ||
"encoding/json" | ||
"fmt" | ||
"net/http" | ||
|
||
"github.com/sirupsen/logrus" | ||
|
||
"github.com/erda-project/erda/apistructs" | ||
"github.com/erda-project/erda/pkg/http/httpserver" | ||
) | ||
|
||
func (e *Endpoints) clusterHook(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error) { | ||
req := apistructs.ClusterEvent{} | ||
if err := json.NewDecoder(r.Body).Decode(&req); err != nil { | ||
errStr := fmt.Sprintf("failed to decode clusterhook request, err: %v", err) | ||
logrus.Error(errStr) | ||
return httpserver.ErrResp(http.StatusBadRequest, "", errStr) | ||
} | ||
if err := e.pipelineSvc.ClusterHook(req); err != nil { | ||
errStr := fmt.Sprintf("failed to handle cluster event, err: %v", err) | ||
logrus.Error(errStr) | ||
return httpserver.ErrResp(http.StatusBadRequest, "", errStr) | ||
} | ||
return httpserver.OkResp(nil) | ||
} |
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GoogleCloudPlatform/flink-on-k8s-operator#460