Skip to content

Commit

Permalink
Sink binding (#40)
Browse files Browse the repository at this point in the history
* update deps

* use sink binding

* working.

* add overrides example.

* lint

* fix unit test

* update codegen
  • Loading branch information
n3wscott authored Mar 29, 2020
1 parent 05a76c4 commit b93378f
Show file tree
Hide file tree
Showing 79 changed files with 2,355 additions and 1,986 deletions.
44 changes: 18 additions & 26 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,17 @@ required = [
"knative.dev/test-infra/tools/dep-collector",
]

[[override]]
name = "knative.dev/pkg"
branch = "master"

[[constraint]]
name = "knative.dev/eventing"
branch = "master"

[[override]]
name = "github.com/cloudevents/sdk-go"
version = "v2.0.0-preview4"
version = "v2.0.0-preview7"

[[override]]
name = "k8s.io/klog"
Expand Down Expand Up @@ -44,18 +52,10 @@ required = [
name = "k8s.io/apiextensions-apiserver"
version = "kubernetes-1.16.4"

[[override]]
name = "knative.dev/pkg"
branch = "master"

[[override]]
name = "cloud.google.com/go"
revision = "90f2606161ee6a14efe2ca79fc05ac2b8efe250b"

[[constraint]]
name = "knative.dev/eventing"
branch = "master"

# Required for opencensus.
[[override]]
name = "google.golang.org/genproto"
Expand Down
4 changes: 2 additions & 2 deletions cmd/controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ package main

import (
// The set of controllers this controller process runs.
"knative.dev/sample-source/pkg/reconciler"
"knative.dev/sample-source/pkg/reconciler/sample"

// This defines the shared main for injected controllers.
"knative.dev/pkg/injection/sharedmain"
)

func main() {
sharedmain.Main("sample-source-controller", reconciler.NewController)
sharedmain.Main("sample-source-controller", sample.NewController)
}
2 changes: 1 addition & 1 deletion cmd/receive_adapter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ limitations under the License.
package main

import (
"knative.dev/eventing/pkg/adapter"
"knative.dev/eventing/pkg/adapter/v2"
myadapter "knative.dev/sample-source/pkg/adapter"
)

Expand Down
23 changes: 16 additions & 7 deletions config/201-clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,26 @@ rules:
- update
- patch
- delete

- apiGroups:
- rbac.authorization.k8s.io
resources:
- clusterroles
verbs:
- list

- apiGroups:
- ""
resources:
- events
verbs: *everything

- apiGroups:
- samples.knative.dev
resources:
- samplesources
verbs: *everything

- apiGroups:
- samples.knative.dev
resources:
Expand All @@ -56,6 +60,18 @@ rules:
- get
- update
- patch

- apiGroups:
- sources.knative.dev
resources:
- sinkbindings
verbs: *everything
- apiGroups:
- sources.knative.dev
resources:
- sinkbindings/status
verbs: *everything

- apiGroups:
- ""
resources:
Expand All @@ -66,13 +82,6 @@ rules:
- list
- watch

# EventTypes admin
- apiGroups:
- eventing.knative.dev
resources:
- eventtypes
verbs: *everything

---
# The role is needed for the aggregated role source-observer in knative-eventing to provide readonly access to "Sources".
# See https://github.com/knative/eventing/blob/master/config/200-source-observer-clusterrole.yaml.
Expand Down
Loading

0 comments on commit b93378f

Please sign in to comment.