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

Regression in helm chart rbac for ForecastleApp #324

Closed
sastorsl opened this issue Feb 13, 2023 · 2 comments
Closed

Regression in helm chart rbac for ForecastleApp #324

sastorsl opened this issue Feb 13, 2023 · 2 comments

Comments

@sastorsl
Copy link
Contributor

PR #313 introduced a regression where the referenced resource has a small typo, forcastleapps vs forecastleapps (for.. vs fore..).

This causes Forecastle's service account to be unable to list configured ForecastleApp resources.

A temporary workaround is:

---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: forecastle-cluster-ingress-role-workaround
rules:
- apiGroups:
  - forecastle.stakater.com
  resources:
  - forecastleapps
  verbs:
  - get
  - list
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  labels:
    app: forecastle
  name: forecastle-cluster-ingress-role-binding-workaround
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: forecastle-cluster-ingress-role-workaround
subjects:
- kind: ServiceAccount
  name: forecastle
  namespace: devops

Example where listing fails - and configured ForecastleApp does not show up in Forecastle:

# oc --as=system:serviceaccount:devops:forecastle get forecastleapp -n openshift-console
Error from server (Forbidden): forecastleapps.forecastle.stakater.com is forbidden: User "system:serviceaccount:devops:forecastle" cannot list resource "forecastleapps" in API group "forecastle.stakater.com" in the namespace "openshift-console"

After adding the workaround clusterrole and clusterrolebinding we can list, and we see the app in Forecastle.

$ oc --as=system:serviceaccount:devops:forecastle get forecastleapp -n openshift-console
NAME                AGE
openshift-console   55m
@sastorsl
Copy link
Contributor Author

Working on a PR.

@sastorsl
Copy link
Contributor Author

Added a fix in #325

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

1 participant