Skip to content

Instantly share code, notes, and snippets.

@matzew
Created February 16, 2022 08:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matzew/1d9a93c7c1ca18c7eef004d33859fdbd to your computer and use it in GitHub Desktop.
Save matzew/1d9a93c7c1ca18c7eef004d33859fdbd to your computer and use it in GitHub Desktop.
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: k8s-display
spec:
template:
spec:
containers:
- image: quay.io/openshift-knative/knative-eventing-sources-event-display
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: events-sa
namespace: default
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: event-watcher
rules:
- apiGroups:
- ""
resources:
- events
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: k8s-ra-event-watcher
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: event-watcher
subjects:
- kind: ServiceAccount
name: events-sa
namespace: default
---
apiVersion: sources.knative.dev/v1
kind: ApiServerSource
metadata:
name: testevents
namespace: default
spec:
serviceAccountName: events-sa
mode: Resource
resources:
- apiVersion: v1
kind: Event
sink:
ref:
apiVersion: serving.knative.dev/v1
kind: Service
name: k8s-display
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment