Skip to content

Commit

Permalink
fix(eventbus): Bugfix for EventBus with AuthStrategyNone (#798)
Browse files Browse the repository at this point in the history
  • Loading branch information
whynowy authored Jul 31, 2020
1 parent 099ed60 commit 6351244
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/tutorials/09-service-account.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ Based on the type of trigger, it's a good practice to create a service account w
The sensor examples use `argo-events-sa` service account to execute all types of triggers, but it is has more permissions than needed
,and you may want to limit those permissions based on your use-case.

### K8s Resource Trigger
### K8s Resource and Argo Workflow Triggers

* To execute Argo workflow trigger, make sure to grant `create` permission for workflows to the service account.

* To trigger a any other K8s resource, make sure to grant `create` permission for that resource.

### AWS Lambda, HTTP, Slack and OpenWhisk Trigger, NATS and Kafka Triggers
### AWS Lambda, HTTP, Slack, NATS, Kafka, and OpenWhisk Triggers

For these triggers, you **don't** need any K8s role associated with the service account.

2 changes: 1 addition & 1 deletion eventbus/eventbus.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func GetDriver(ctx context.Context, eventBusConfig eventbusv1alpha1.BusConfig, s
}
var auth *driver.Auth
cred := &driver.AuthCredential{}
if eventBusAuth == nil || eventBusAuth == &eventbusv1alpha1.AuthStrategyNone {
if eventBusAuth == nil || *eventBusAuth == eventbusv1alpha1.AuthStrategyNone {
auth = &driver.Auth{
Strategy: eventbusv1alpha1.AuthStrategyNone,
}
Expand Down
2 changes: 1 addition & 1 deletion examples/eventbus/native.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
spec:
nats:
native:
# Optional, defaults to 3
# Optional, defaults to 3. If it is < 3, set it to 3, that is the minimal requirement.
replicas: 3
# Optional, authen strategy, "none" or "token", defaults to "none"
auth: token
Expand Down

0 comments on commit 6351244

Please sign in to comment.