-
Notifications
You must be signed in to change notification settings - Fork 595
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:knative/eventing into broker-rede…
…livery
- Loading branch information
Showing
64 changed files
with
2,344 additions
and
736 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,20 +10,22 @@ Also take a look at: | |
|
||
## Getting started | ||
|
||
1. Setup [Knative Serving](http://github.com/knative/serving) | ||
1. [Create and checkout a repo fork](#checkout-your-fork) | ||
1. [Install a channel implementation](#install-channels) | ||
|
||
Once you meet these requirements, you can | ||
[start the eventing-controller](#starting-eventing-controller). | ||
|
||
> :information_source: If you intend to use event sinks based on Knative | ||
> Services as described in some of our examples, consider installing | ||
> [Knative Serving](http://github.com/knative/serving). A few | ||
> [contrib](http://github.com/knative/eventing-contrib) projects also have a | ||
> dependency on Serving. | ||
Before submitting a PR, see also [contribution guidelines](./CONTRIBUTING.md). | ||
|
||
### Requirements | ||
|
||
You must have the core of [Knative](http://github.com/knative/serving) running | ||
on your cluster. | ||
|
||
You must have [`ko`](https://github.com/google/ko) installed. | ||
|
||
### Create a cluster and a repo | ||
|
@@ -40,9 +42,10 @@ You must have [`ko`](https://github.com/google/ko) installed. | |
- [Google Container Registry quickstart](https://cloud.google.com/container-registry/docs/pushing-and-pulling) | ||
- [Docker Hub quickstart](https://docs.docker.com/docker-hub/) | ||
|
||
**Note**: You'll need to be authenticated with your `KO_DOCKER_REPO` before | ||
pushing images. Run `gcloud auth configure-docker` if you are using Google | ||
Container Registry or `docker login` if you are using Docker Hub. | ||
> :information_source: You'll need to be authenticated with your | ||
> `KO_DOCKER_REPO` before pushing images. Run `gcloud auth configure-docker` if | ||
> you are using Google Container Registry or `docker login` if you are using | ||
> Docker Hub. | ||
### Setup your environment | ||
|
||
|
@@ -56,10 +59,10 @@ recommend adding them to your `.bashrc`): | |
1. `KO_DOCKER_REPO`: The docker repository to which developer images should be | ||
pushed (e.g. `gcr.io/[gcloud-project]`). | ||
|
||
- **Note**: if you are using docker hub to store your images your | ||
`KO_DOCKER_REPO` variable should be `docker.io/<username>`. | ||
- **Note**: Currently Docker Hub doesn't let you create subdirs under your | ||
username. | ||
> :information_source: If you are using Docker Hub to store your images, your | ||
> `KO_DOCKER_REPO` variable should have the format `docker.io/<username>`. | ||
> Currently, Docker Hub doesn't let you create subdirs under your username (e.g. | ||
> `<username>/knative`). | ||
`.bashrc` example: | ||
|
||
|
@@ -86,7 +89,7 @@ mkdir -p ${GOPATH}/src/knative.dev | |
cd ${GOPATH}/src/knative.dev | ||
git clone [email protected]:${YOUR_GITHUB_USERNAME}/eventing.git | ||
cd eventing | ||
git remote add upstream git@github.com:knative/eventing.git | ||
git remote add upstream https://github.com/knative/eventing.git | ||
git remote set-url --push upstream no_push | ||
``` | ||
|
||
|
@@ -133,6 +136,19 @@ ko apply -f config/channels/in-memory-channel/ | |
Depending on your needs you might want to install other | ||
[channel implementations](https://github.com/knative/docs/blob/master/docs/eventing/channels/channels-crds.md). | ||
|
||
## Install Brokers | ||
|
||
Install the | ||
[Channel Broker](https://github.com/knative/eventing/tree/master/config/brokers/channel-broker) | ||
or any of the other Brokers available inside the `config/brokers/` directory. | ||
|
||
```shell | ||
ko apply -f config/brokers/channel-broker/ | ||
``` | ||
|
||
Depending on your needs you might want to install other | ||
[Broker implementations](https://github.com/knative/eventing/tree/master/docs/broker). | ||
|
||
## Iterating | ||
|
||
As you make changes to the code-base, there are two special cases to be aware | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,46 @@ | ||
/* | ||
Copyright 2020 The Knative Authors | ||
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 ( | ||
// Uncomment the following line to load the gcp plugin (only required to authenticate against GKE clusters). | ||
// _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" | ||
|
||
"context" | ||
"fmt" | ||
"os" | ||
|
||
"k8s.io/client-go/kubernetes" | ||
kubeclient "knative.dev/pkg/client/injection/kube/client" | ||
"knative.dev/pkg/injection/sharedmain" | ||
"knative.dev/pkg/signals" | ||
|
||
versioned "knative.dev/eventing/pkg/client/clientset/versioned" | ||
eventingclient "knative.dev/eventing/pkg/client/injection/client" | ||
broker "knative.dev/eventing/pkg/upgrader/broker/v0.14.0" | ||
) | ||
|
||
func main() { | ||
ctx := signals.NewContext() | ||
cfg := sharedmain.ParseAndGetConfigOrDie() | ||
ctx = context.WithValue(ctx, kubeclient.Key{}, kubernetes.NewForConfigOrDie(cfg)) | ||
ctx = context.WithValue(ctx, eventingclient.Key{}, versioned.NewForConfigOrDie(cfg)) | ||
if err := broker.Upgrade(ctx); err != nil { | ||
fmt.Printf("Broker Upgrade failed with: %v\n", err) | ||
os.Exit(1) | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
core/roles/jobrunner-clusterrole.yaml |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
core/200-jobrunner-serviceaccount.yaml |
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 @@ | ||
roles/controller-clusterrole.yaml |
1 change: 1 addition & 0 deletions
1
config/brokers/mt-channel-broker/201-channel-clusterrolebinding.yaml
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 @@ | ||
roles/controller-clusterrolebinding.yaml |
39 changes: 39 additions & 0 deletions
39
config/brokers/mt-channel-broker/roles/controller-clusterrole.yaml
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,39 @@ | ||
# Copyright 2020 The Knative Authors | ||
# | ||
# 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. | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: knative-eventing-mt-channel-broker-controller | ||
labels: | ||
eventing.knative.dev/release: devel | ||
rules: | ||
# Configs resources and status we care about. | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- "namespaces/finalizers" | ||
verbs: | ||
- "update" | ||
- apiGroups: | ||
- coordination.k8s.io | ||
resources: | ||
- leases | ||
verbs: | ||
- "get" | ||
- "list" | ||
- "create" | ||
- "update" | ||
- "delete" | ||
- "patch" | ||
- "watch" |
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.