You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Make sample source guide up-to-date
* Docs for adding event source to eventing-contrib
* Get rid of some whitespace
* Fix broken markdown
* Update docs/eventing/samples/writing-receive-adapter-source/03-controller.md
Co-authored-by: Evan Anderson <[email protected]>
* Update docs/eventing/samples/writing-receive-adapter-source/03-controller.md
Co-authored-by: Evan Anderson <[email protected]>
* Remove an empty line
Co-authored-by: Evan Anderson <[email protected]>
Define the NewController implementation, it will be passed a configmap.Watcher, as well as a context which the injected listers will use for the reconciler struct arguments
24
+
Define the NewController implementation, it will be passed a `configmap.Watcher`, as well as a context which the injected listers will use for the reconciler struct arguments
Controller for the `SampleSource` uses `Deployment` and `SinkBinding` resources to deploy and also bind the event source and the receive adapter. Also ensure the informers are set up correctly for these secondary resources
As part of the source reconciliation, we have to create and deploy
28
-
(and update if necessary) the underlying receive adapter. The two
29
-
client sets used in this process is the `kubeClientSet` for the
30
-
Deployment tracking, and the `EventingClientSet` for the event
31
-
recording.
32
+
(and update if necessary) the underlying receive adapter.
32
33
33
34
Verify the specified kubernetes resources are valid, and update the `Status` accordingly
34
35
35
36
Assemble the ReceiveAdapterArgs
36
37
```go
37
38
raArgs:= resources.ReceiveAdapterArgs{
38
-
EventSource: eventSource,
39
-
Image: r.receiveAdapterImage,
40
-
Source: src,
41
-
Labels: resources.GetLabels(src.Name),
42
-
SinkURI:sinkURI,
39
+
EventSource: src.Namespace + "/" + src.Name,
40
+
Image: r.ReceiveAdapterImage,
41
+
Source: src,
42
+
Labels: resources.Labels(src.Name),
43
+
AdditionalEnvs: r.configAccessor.ToEnvVars(), // Grab config envs for tracing/logging/metrics
43
44
}
44
45
```
45
46
NB The exact arguments may change based on functional requirements
46
47
Create the underlying deployment from the arguments provided, matching pod templates, labels, owner references, etc as needed to fill out the deployment
0 commit comments