Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ metadata:
{{ end }}
{{ end }}
spec:
serviceAccountName: "{{ .name }}"
serviceAccountName: "{{ .namespace }}"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your changes are already included in this branch, in fact, this commit is reverting them

They are missing on the EKB side

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙈 So much for comparing left and right. Sorry about that.

restartPolicy: "OnFailure"
{{ if .podSecurityContext }}
securityContext:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ .name }}
name: {{ .namespace }}
namespace: {{ .namespace }}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ .name }}
name: {{ .namespace }}
namespace: {{ .namespace }}
rules:
- apiGroups: [ "" ]
Expand All @@ -35,13 +35,13 @@ rules:
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ .name }}
name: {{ .namespace }}
namespace: {{ .namespace }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ .name }}
name: {{ .namespace }}
subjects:
- kind: ServiceAccount
name: {{ .name }}
name: {{ .namespace }}
namespace: {{ .namespace }}
4 changes: 2 additions & 2 deletions vendor/knative.dev/reconciler-test/pkg/eventshub/rbac/rbac.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ var templates embed.FS

// Install creates the necessary ServiceAccount, Role, RoleBinding for the eventshub.
// The resources are named according to the current namespace defined in the environment.
func Install(cfg map[string]interface{}) feature.StepFn {
func Install() feature.StepFn {
return func(ctx context.Context, t feature.T) {
if _, err := manifest.InstallYamlFS(ctx, templates, cfg); err != nil && !apierrors.IsAlreadyExists(err) {
if _, err := manifest.InstallYamlFS(ctx, templates, map[string]interface{}{}); err != nil && !apierrors.IsAlreadyExists(err) {
t.Fatal(err)
}
}
Expand Down
6 changes: 3 additions & 3 deletions vendor/knative.dev/reconciler-test/pkg/eventshub/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ func Install(name string, options ...EventsHubOption) feature.StepFn {
eventListener := k8s.EventListenerFromContext(ctx)
registerEventsHubStore(ctx, eventListener, name, namespace)

// Install ServiceAccount, Role, RoleBinding
eventshubrbac.Install()(ctx, t)

isReceiver := strings.Contains(envs["EVENT_GENERATORS"], "receiver")

cfg := map[string]interface{}{
Expand All @@ -76,9 +79,6 @@ func Install(name string, options ...EventsHubOption) feature.StepFn {
"withReadiness": isReceiver,
}

// Install ServiceAccount, Role, RoleBinding
eventshubrbac.Install(cfg)(ctx, t)

if ic := environment.GetIstioConfig(ctx); ic.Enabled {
manifest.WithIstioPodAnnotations(cfg)
}
Expand Down