This repository has been archived by the owner on Dec 15, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 753
decoupling Function, Trigger and Runtimes #620
Merged
Merged
Changes from 33 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
d1c51f0
CRD API objects for functions, http, kafka, cronjob triggers and
murali-reddy 1bf648f
CRD controllers for the function, kafka triggers, cronjob triggers, http
murali-reddy 10705cb
new server side binaries kubeless-controller-manager and kafka-contro…
murali-reddy 989f10b
updated CLI to incorporate implict creation of triggers with
murali-reddy 7d4b74e
updated to build scripts
murali-reddy 655da7f
updated to manifests
murali-reddy 1fabea6
Updates to examples used in integration tests
murali-reddy 416d27a
kafka even consumer with new go kafka lib dependencies
murali-reddy 41d136a
update vendor libs
murali-reddy ed682eb
update docker files
murali-reddy 20d9485
updates to utils and langruntime
murali-reddy 004c4a9
update .travis.yaml
murali-reddy 72afaab
delete old controller docker file
murali-reddy 44ed20b
better kafka even consumer logging
murali-reddy 343e5d5
fix travis ci issue related to kafka broker
murali-reddy bb47001
keep the old GKE version 1.7.12-gke.1
murali-reddy 2d78977
Use bitnami-bot docker account
180a178
Fix http request method for the Kafka consumer
5d769cd
Push Kafka image
b70c3ab
Fix content-type in consumer HTTP message
53ef2e7
Fix GKE version
c67f31b
Removed duplicated files
c406af1
Update runtime docs
85cff13
Do proper check for topic update
17c035f
skip IT test with trigger update through
murali-reddy 6d593e5
Add CPU limit argument to function commands (#606)
SomeoneWeird c9216f5
Merge branch 'master' into function-trigger-runtimes
murali-reddy 6174c59
fix glide.lock and vendor libs, that got messed up with master merge
murali-reddy 01518b7
addressing review comments
murali-reddy 01f8175
update .gitignore with new controller images
murali-reddy af2808f
Review
c0f4ab4
Review
358f8cb
use 3-way merge Patch only to update the CRD objects
murali-reddy 81cba44
nodejs, remove runtime internal data from sandbox, avoid code concat …
cscheiber 764b8c8
Revert "use 3-way merge Patch only to update the CRD objects"
murali-reddy 0215d4f
Avoid reflect.DeepEqual for deployment comparison
25d300c
Fix empty body for NodeJS functions
200b867
fix GKE CI failures due to upstream issue https://github.com/kubernet…
murali-reddy 5fe1681
Fix error catching in Python runtime. Remove old files
cd56789
Send message as jsons if necessary in kafka-consumer
fd63962
Move serviceSpec to function object. Fix service modifications
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* | ||
Copyright (c) 2016-2017 Bitnami | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package main | ||
|
||
import ( | ||
"fmt" | ||
"os" | ||
"os/signal" | ||
"syscall" | ||
|
||
"github.com/kubeless/kubeless/pkg/controller" | ||
"github.com/kubeless/kubeless/pkg/utils" | ||
"github.com/sirupsen/logrus" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
const ( | ||
globalUsage = `` //TODO: adding explanation | ||
) | ||
|
||
var rootCmd = &cobra.Command{ | ||
Use: "kafka-controller", | ||
Short: "Kafka controller", | ||
Long: globalUsage, | ||
Run: func(cmd *cobra.Command, args []string) { | ||
kubelessClient, err := utils.GetFunctionClientInCluster() | ||
if err != nil { | ||
logrus.Fatalf("Cannot get kubeless client: %v", err) | ||
} | ||
|
||
kafkaTriggerCfg := controller.KafkaTriggerConfig{ | ||
TriggerClient: kubelessClient, | ||
} | ||
|
||
kafkaTriggerController := controller.NewKafkaTriggerController(kafkaTriggerCfg) | ||
|
||
stopCh := make(chan struct{}) | ||
defer close(stopCh) | ||
|
||
go kafkaTriggerController.Run(stopCh) | ||
|
||
sigterm := make(chan os.Signal, 1) | ||
signal.Notify(sigterm, syscall.SIGTERM) | ||
signal.Notify(sigterm, syscall.SIGINT) | ||
<-sigterm | ||
}, | ||
} | ||
|
||
func main() { | ||
if err := rootCmd.Execute(); err != nil { | ||
fmt.Println(err) | ||
os.Exit(1) | ||
} | ||
} |
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
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.
I haven't looked at the stack in sufficient detail, but I suspect we should re-use the kubecli client across these, so we can reuse the HTTP client connection(s).
Ideally of course, these would all use SharedInformers so we can reuse the watch connections..