Giter VIP home page Giter VIP logo

Comments (8)

rgordill avatar rgordill commented on August 14, 2024 5

Any update on this? I am facing a similar issue in a fresh 4.8 with gitops 1.2.

from gitops-operator.

larsks avatar larsks commented on August 14, 2024 1

There still seems to be an actual bug here (the permission for creating Events in the argocd namespace itself).

from gitops-operator.

iam-veeramalla avatar iam-veeramalla commented on August 14, 2024 1

Hello,

I see two different issues here,

  1. application controller is only able to deploy applications in its namespace.
deployments.apps is forbidden: User
"system:serviceaccount:openshift-gitops:openshift-gitops-argocd-application-controller"
cannot create resource "deployments" in API group "apps" in the
namespace "oai-demo"
  1. application controller cannot create audit events in the same namespace.
time="2021-05-05T12:15:09Z" level=error msg="Unable to create audit
event: events is forbidden: User
\"system:serviceaccount:openshift-gitops:openshift-gitops-argocd-application-controller\"
cannot create resource \"events\" in API group \"\" in the namespace
\"openshift-gitops\"" application=oai-demo-webserver
dest-namespace=openshift-gitops
dest-server="https://kubernetes.default.svc" reason=OperationCompleted
type=Warning

from gitops-operator.

wtam2018 avatar wtam2018 commented on August 14, 2024

An admin needs to explicit grant permission to argocd application controller in the oai-demo namespace. Otherwise, argocd can automatically gain access to all namespaces.

oc adm policy add-role-to-user admin system:serviceaccount:openshift-gitops:openshift-gitops-argocd-application-controller -n oai-demo

from gitops-operator.

manurodriguez avatar manurodriguez commented on August 14, 2024

I confirmed that adding a rolebinding for the service-account "openshift-gitops-argocd-application-controller" allows to create resources (I'm using v1.1.1), but I couldn't find that anywhere documented, if anyone can please point me there.

On the same note, I can create and delete the application from the GitOps operator console, but if I want to delete only a resource, like a pod I get an error like this:

Unable to delete resource: pods "<pod-name>" is forbidden: User "system:serviceaccount:openshift-gitops:openshift-gitops-argocd-server" cannot delete resource pods in API group "" in the namespace "<namespace-name>"

Which can be easily solved by granting privileges to the "openshift-gitops-argocd-server" service account on that namespace, but again I haven't found a doc reference to know what accounts to grant access. If I need to create a separate issue for clarifications on this, just please let me know.

from gitops-operator.

jgwest avatar jgwest commented on August 14, 2024

I've created a new bug for the event behaviour described above.

Bug: #146

from gitops-operator.

gasgithub avatar gasgithub commented on August 14, 2024

Adding openshift-gitops:openshift-gitops-argocd-application-controller as cluster admin solves the issues for me. I dont want to manually grant permissions for each namespace.

oc adm policy add-cluster-role-to-user cluster-admin system:serviceaccount:openshift-gitops:openshift-gitops-argocd-application-controller -n openshift-gitops

from gitops-operator.

iam-veeramalla avatar iam-veeramalla commented on August 14, 2024

@larsks , Please take a look at my previous comment and let me know if this issue can be closed ?

from gitops-operator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.