Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions manifests/01-helm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: helm.openshift.io/v1beta1
kind: HelmChartRepository
metadata:
annotations:
"release.openshift.io/create-only": 'true'
name: redhat-helm-repo
spec:
name: Red Hat Helm Charts
connectionConfig:
url: https://redhat-developer.github.io/redhat-helm-charts
13 changes: 13 additions & 0 deletions manifests/03-rbac-role-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,16 @@ rules:
- validatingwebhookconfigurations
verbs:
- get
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: helm-chartrepos-viewer
rules:
- apiGroups:
- helm.openshift.io
resources:
- helmchartrepositories
verbs:
- get
- list
Copy link
Copy Markdown

@sbose78 sbose78 Aug 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, all authenticated users should be allowed to 'read' helm chart repositories. That'll naturally drive the content in the developer catalog.

Any advanced configuration needs to be done by the admin outside the scope of console.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't watch action be needed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, because the operator does not watch for changes. The permissions are needed for console /api/helm/charts/index.yaml endpoiint - it retrieves the list of all HelmChartRepository CRs from the cluster, and use them to retrieve individual index.yaml files that get combined at the end.

15 changes: 15 additions & 0 deletions manifests/04-rbac-rolebinding-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,18 @@ subjects:
- kind: ServiceAccount
name: console
namespace: openshift-console
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
annotations:
"release.openshift.io/create-only": 'true'
name: helm-chartrepos-view
subjects:
- kind: Group
apiGroup: rbac.authorization.k8s.io
name: 'system:authenticated'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe you're need a PR like openshift/origin#23975 to get this to pass CI.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: helm-chartrepos-viewer