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

Insufficient privileges for created service #17

Open
ganniterix opened this issue Jul 5, 2023 · 1 comment
Open

Insufficient privileges for created service #17

ganniterix opened this issue Jul 5, 2023 · 1 comment

Comments

@ganniterix
Copy link

When installing on Openshift 4.12, the service account cilium-olm does not have sufficient permissions

1.688556618102894e+09	ERROR	Reconciler error	{"controller": "ciliumconfig-controller", "object": {"name":"cilium","namespace":"cilium"}, "namespace": "cilium", "name": "cilium", "reconcileID": "44df73b5-6e0c-4d15-97ea-94b599098a3d", "error": "failed to install release: rendered manifests contain a resource that already exists. Unable to continue with install: could not get information about the resource Ingress \"hubble-ui\" in namespace \"cilium\": ingresses.networking.k8s.io \"hubble-ui\" is forbidden: User \"system:serviceaccount:cilium:cilium-olm\" cannot get resource \"ingresses\" in API group \"networking.k8s.io\" in the namespace \"cilium\""}

To confirm this is the limitation, the following file was modified:

cluster-network-06-cilium-00005-cilium-olm-role.yaml

apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: cilium-olm
  namespace: cilium
rules:
  - apiGroups:
      - "*"
    resources:
      - "*"
    verbs:
      - "*"

Obviously this is not a valid workaround, but after this modification, it works.

@ganniterix ganniterix changed the title Insufficient privileges for Insufficient privileges for created service Jul 5, 2023
@Cleymax
Copy link
Contributor

Cleymax commented Nov 29, 2023

The CR defined cannot be reconciled properly because of the RBAC restriction. The serviceMonitors and ingress are created with the service account cilium-olm in the cilium namespace. A namespace role cilium-olm is bind to the service account. The role is lacking the RBAC accesses to the two resources.

Here's a slightly more restrictive rules:

kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: cilium-olm
  namespace: cilium
rules:
- verbs:
    - '*'
  apiGroups:
    - monitoring.coreos.com
  resources:
    - servicemonitors
- verbs:
    - '*'
  apiGroups:
    - networking.k8s.io
  resources:
    - ingresses

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

2 participants