loft-sh / loft

Namespace & Virtual Cluster Manager for Kubernetes - Lightweight Virtual Clusters, Self-Service Provisioning for Engineers and 70% Cost Savings with Sleep Mode
https://loft.sh/docs/introduction
Other
737 stars 65 forks source link

self-hosted github-runner privileges issue #201

Closed kayahk closed 2 years ago

kayahk commented 2 years ago

I have this setup:

This workflow usually works fine, when creating Kubernetes resources in Terraform using the Kubernetes provider as with any other cluster. If the Terraform manifests include resources of the type helm_release however, it appears that I am running into an issue with permissions for the github-runner service account.

This is the error message:

Error: rendered manifests contain a resource that already exists. Unable to continue with install: could not get information about the resource ClusterRole "robusta-forwarder-cluster-role" in namespace "": clusterroles.rbac.authorization.k8s.io "robusta-forwarder-cluster-role" is forbidden: User "system:serviceaccount:actions-runner-system:actions-runner" cannot get resource "clusterroles" in API group "rbac.authorization.k8s.io" at the cluster scope

I don't understand most parts of it because:

Appreciate any hints where I might be doing things wrong or why I have a false perception of the issue.

kayahk commented 2 years ago

closed as it turned out it was due to a basic misconception of the pipeline itself, had nothing to do with loft/vcluster at all.