Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kubernetes example needs the Sysdig ClusterRole #297

Closed
agilgur5 opened this issue Nov 3, 2017 · 2 comments
Closed

Kubernetes example needs the Sysdig ClusterRole #297

agilgur5 opened this issue Nov 3, 2017 · 2 comments

Comments

@agilgur5
Copy link

agilgur5 commented Nov 3, 2017

It requires the required-access-sysdig ClusterRole to work properly. Perhaps by default the example should also contain a ServiceAccount attached to the DaemonSet and a ClusterRoleBinding to that ServiceAccount

@agilgur5 agilgur5 changed the title Kubernetes example needs the ClusterRole Kubernetes example needs the Sysdig ClusterRole Nov 3, 2017
@JPLachance
Copy link
Contributor

I got the same issue! I'll drop my fix here for others that may be looking for the answer:

---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: falco-cluster-role
rules:
  - apiGroups:
      - extensions
      - ''
    resources:
      - nodes
      - namespaces
      - pods
      - replicationcontrollers
      - services
      - events
    verbs:
      - get
      - list
      - watch
  - nonResourceURLs:
      - /healthz
      - /healthz/*
    verbs:
      - get
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: falco-service-account-roles
subjects:
  - kind: ServiceAccount
    namespace: falco-ns
    name: falco-service-account
roleRef:
  kind: ClusterRole
  name: falco-cluster-role
  apiGroup: rbac.authorization.k8s.io
---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: falco-service-account
  namespace: falco-ns

Simply replace falco-ns by the name of the namespace you deployed Falco into and add serviceAccount: falco-service-account under spec.template.spec in your Falco Deployment/DaemonSet YAML.

I took the role definition from https://support.sysdig.com/hc/en-us/articles/206770633-Sysdig-Install-Kubernetes-. It may give more rights than needed for Falco. I'll let that as a TODO!

@mstemm
Copy link
Contributor

mstemm commented Apr 5, 2018

In #309 we updated our example to include a rbac-based variant, so this should be fixed now.

@mstemm mstemm closed this as completed Apr 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants