I've deployed argo-cd via the kubectl apply command. After I've added an application nothing happens. In the logs of the application-controller I'm getting this error message:
time="2019-03-14T13:14:42Z" level=info msg="Start watch app resources on https://kubernetes.default.svc"
time="2019-03-14T13:14:42Z" level=warning msg="Failed to watch app resources on https://kubernetes.default.svc: customresourcedefinitions.apiextensions.k8s.io is forbidden: User \"system:serviceaccount:fr:argocd-application-controller\" cannot list resource \"customresourcedefinitions\" in API group \"apiextensions.k8s.io\" at the cluster scope, retrying in 10s"
Here the clusterrole argocd-application-controller
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
annotations:
name: argocd-application-controller
rules:
- apiGroups:
- '*'
resources:
- '*'
verbs:
- '*'
- nonResourceURLs:
- '*'
verbs:
- '*'
In the UI I'm getting this error message:
replicasets.apps is forbidden: User "system:serviceaccount:fr:argocd-application-controller" cannot list resource "replicasets" in API group "apps" at the cluster scope
Interessting...I've reinstalled argo in the default namespace argocd and now it's working as aspected. Before I've installed it in the namespace fr.
@florianrusch this is expected. Because cluster role bindings need to specify some namespace, our set of default installation manifests are using default of argocd. To get this to work in another namespace, you would need to change this line:
and this line:
tools like kustomize help with this by allowing you to overlay your desired change from our base.
@jessesuen thank you for the explanation
Most helpful comment
@florianrusch this is expected. Because cluster role bindings need to specify some namespace, our set of default installation manifests are using default of
argocd. To get this to work in another namespace, you would need to change this line:https://github.com/argoproj/argo-cd/blob/master/manifests/cluster-rbac/argocd-application-controller-clusterrolebinding.yaml#L16
and this line:
https://github.com/argoproj/argo-cd/blob/master/manifests/cluster-rbac/argocd-server-clusterrolebinding.yaml#L16
tools like kustomize help with this by allowing you to overlay your desired change from our base.