Skip to content

Error in cabpt-controller-manager pod #219

@no-fy

Description

@no-fy

Hello,
I am using cluster api operator with the machinePool experimental feature enabled :

apiVersion: operator.cluster.x-k8s.io/v1alpha2
kind: BootstrapProvider
metadata:
  name: talos
  namespace: {{ .Values.namespace }}
spec:
  version: {{ .Values.providers.bootstrap.version }}
  manager:
    featureGates:
      ClusterTopology: true
      MachinePool: true

I had this error in the cabpt-controller-manager pod :

W0512 08:52:19.934609       1 reflector.go:569] /.cache/mod/k8s.io/[email protected]/tools/cache/reflector.go:251: failed to list *v1beta1.MachinePool: machinepools.cluster.x-k8s.io is forbidden: User "system:serviceaccount:capi-system:default" cannot list resource "machinepools" in API group "cluster.x-k8s.io" at the cluster scope
E0512 08:52:19.934663       1 reflector.go:166] "Unhandled Error" err="/.cache/mod/k8s.io/[email protected]/tools/cache/reflector.go:251: Failed to watch *v1beta1.MachinePool: failed to list *v1beta1.MachinePool: machinepools.cluster.x-k8s.io is forbidden: User \"system:serviceaccount:capi-system:default\" cannot list resource \"machinepools\" in API group \"cluster.x-k8s.io\" at the cluster scope" logger="UnhandledError"

I was able to fix it by editing the ClusterRole cabpt-manager-role and changing the apiGroup over the machinepools from exp.cluster.x-k8s.io to cluster.x-k8s.io as the apiGroup of machinepools was wrong

I don't really know if the error is from myself or somewhere in the repo, and if it's really useful to enable this feature here. I'm new to cluster API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions