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

Bug 1872375: Add RedHat Helm chart repository as default repo in OCP payload #458

Conversation

pedjak
Copy link
Contributor

@pedjak pedjak commented Aug 17, 2020

Although console endpoint /api/helm/charts/index.yaml handles the situation
when there is no HelmChartRepository CR present in the cluster, we should align
us to other default cluster settings and provide the default HelmChartRepository CR in the payload

Prior introducing openshift/console#5933 all authenticated users could browse the charts from the chart repo.
This PR restores that functionality by introducing additional helm-chartrepos-viewer ClusterRole,
binding it to all authenticated users.

- helmchartrepositories
verbs:
- get
- list
Copy link

@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
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
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.

spec:
name: Red Hat Helm Charts
connectionConfig:
url: https://redhat-developer.github.io/redhat-helm-charts
Copy link

Choose a reason for hiding this comment

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

So,

  1. All authenticated users get to see helm chart repos
  2. Ootb, they see the default one. https://redhat-developer.github.io/redhat-helm-charts was previously hard-coded in the console config - instead of giving it any special treatment, it is being made just another CR. 👍

Copy link
Member

Choose a reason for hiding this comment

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

Ootb, they see the default one. https://redhat-developer.github.io/redhat-helm-charts was previously hard-coded in the console config

you mean in the console-config CM in openshift-console namespace ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

HelmChartRepository is cluster scoped.

@sbose78
Copy link

sbose78 commented Aug 17, 2020

@spadgett @christianvogt @rohitkrai03
FYI
This effectively conforms to console is pretty kubectl. User doesn't get any more privileges by using console. Visibility of every resource incl. the default one is driven by the user's privileges.

@pedjak
Copy link
Contributor Author

pedjak commented Aug 18, 2020

/retest

2 similar comments
@pedjak
Copy link
Contributor Author

pedjak commented Aug 19, 2020

/retest

@pedjak
Copy link
Contributor Author

pedjak commented Aug 19, 2020

/retest

Copy link
Member

@jhadvig jhadvig left a comment

Choose a reason for hiding this comment

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

The 05-helm.yamlshould be 01-helm.yaml no honor the ordering we currently do.

Will the HelmChartRepository CRD be available on the cluster by default ?

spec:
name: Red Hat Helm Charts
connectionConfig:
url: https://redhat-developer.github.io/redhat-helm-charts
Copy link
Member

Choose a reason for hiding this comment

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

Ootb, they see the default one. https://redhat-developer.github.io/redhat-helm-charts was previously hard-coded in the console config

you mean in the console-config CM in openshift-console namespace ?

- helmchartrepositories
verbs:
- get
- list
Copy link
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?

@pedjak
Copy link
Contributor Author

pedjak commented Aug 19, 2020

Will the HelmChartRepository CRD be available on the cluster by default ?

@jhadvig - yes - it is already deployed as the part console-operator payload

@pedjak
Copy link
Contributor Author

pedjak commented Aug 20, 2020

/retest

2 similar comments
@pedjak
Copy link
Contributor Author

pedjak commented Aug 24, 2020

/retest

@pedjak
Copy link
Contributor Author

pedjak commented Aug 25, 2020

/retest

subjects:
- kind: Group
apiGroup: rbac.authorization.k8s.io
name: 'system:authenticated'
Copy link
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
Contributor Author

Choose a reason for hiding this comment

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

@pedjak pedjak changed the title Add RedHat Helm chart repository as default repo in OCP payload Bug 1872375: Add RedHat Helm chart repository as default repo in OCP payload Aug 25, 2020
@openshift-ci-robot openshift-ci-robot added bugzilla/severity-urgent Referenced Bugzilla bug's severity is urgent for the branch this PR is targeting. bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Aug 25, 2020
@openshift-ci-robot
Copy link
Contributor

@pedjak: This pull request references Bugzilla bug 1872375, which is invalid:

  • expected the bug to target the "4.6.0" release, but it targets "---" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

Bug 1872375: Add RedHat Helm chart repository as default repo in OCP payload

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@pedjak
Copy link
Contributor Author

pedjak commented Aug 26, 2020

/bugzilla refresh

@openshift-ci-robot openshift-ci-robot added bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed bugzilla/severity-urgent Referenced Bugzilla bug's severity is urgent for the branch this PR is targeting. labels Aug 26, 2020
@openshift-ci-robot
Copy link
Contributor

@pedjak: This pull request references Bugzilla bug 1872375, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.6.0) matches configured target release for branch (4.6.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

/bugzilla refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot removed the bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. label Aug 26, 2020
Although console endpoint `/api/helm/charts/index.yaml` handles the situation
when there is no HelmChartRepository CR present in the cluster, we should align
us to other default cluster settings and provide the default HelmChartRepository CR in the payload.
Default configuration can be removed/edited by cluster admin.

Prior introducing openshift/console#5933 all authenticated users could browse the charts from the chart repo.
This PR restores that functionality by introducing additional `helm-chartrepos-viewer` ClusterRole,
binding it to all authenticated users.
@pedjak pedjak force-pushed the helm-defaul-ocp-payload-and-perms branch from 3dab1c5 to afb9dd3 Compare August 31, 2020 15:50
@pedjak
Copy link
Contributor Author

pedjak commented Sep 1, 2020

/retest

@jhadvig
Copy link
Member

jhadvig commented Sep 8, 2020

#458 (comment) will need to be delivered before merging.

@pedjak
Copy link
Contributor Author

pedjak commented Sep 14, 2020

/retest

1 similar comment
@pedjak
Copy link
Contributor Author

pedjak commented Sep 14, 2020

/retest

Copy link
Member

@jhadvig jhadvig left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 15, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jhadvig, pedjak

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 15, 2020
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

2 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 0c18ea0 into openshift:master Sep 15, 2020
@openshift-ci-robot
Copy link
Contributor

@pedjak: All pull requests linked via external trackers have merged:

Bugzilla bug 1872375 has been moved to the MODIFIED state.

In response to this:

Bug 1872375: Add RedHat Helm chart repository as default repo in OCP payload

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants