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

chore: operator roles sanitizing #1814

Merged
merged 7 commits into from
Mar 7, 2024
Merged

chore: operator roles sanitizing #1814

merged 7 commits into from
Mar 7, 2024

Conversation

tolusha
Copy link
Contributor

@tolusha tolusha commented Mar 5, 2024

What does this PR do?

- apiGroups:
    - extensions
  resources:
    - ingresses
  verbs:
    - get
    - list
    - watch
    - create
    - delete
- apiGroups:
    - apps
  resources:
    - secrets
  verbs:
    - list
  • removed duplicated cluster roles delegated to che-operator service account
  • removed redundant cluster roles delegated to che-operator service account:
- apiGroups:
    - ''
  resources:
    - nodes
  verbs:
    - get
- apiGroups:
    - apiextensions.k8s.io
  resources:
    - customresourcedefinitions
  verbs:
    - get
    - create
    - update
- apiGroups:
    - apps
  resourceNames:
    - che-operator
  resources:
    - deployments/finalizers
  verbs:
    - update
- apiGroups:
    - extensions
  resources:
    - ingresses
  verbs:
    - '*'
- apiGroups:
    - user.openshift.io
  resources:
    - users
  verbs:
    - list
    - delete
- apiGroups:
    - config.openshift.io
  resources:
    - infrastructures
  verbs:
    - get
    - list
    - watch
- apiGroups:
    - operators.coreos.com
  resources:
    - clusterserviceversions
  verbs:
    - list
    - get
    - watch
- apiGroups:
    - operators.coreos.com
  resources:
    - subscriptions
  verbs:
    - get
- apiGroups:
    - cert-manager.io
  resources:
    - issuers
    - certificates
  verbs:
    - create
    - get
    - list
    - update
- apiGroups:
    - config.openshift.io
  resources:
    - oauths
  verbs:
    - get
    - list
    - watch
    - patch
- apiGroups:
    - user.openshift.io
  resources:
    - identities
  verbs:
    - delete
- apiGroups:
    - apps
  resources:
    - secrets
  verbs:
    - list
  • removed some roles delegated to che-operator service account, since the same exist as cluster roles
  • copied roles from leader_election_role.yaml to roles.yaml
  • removed redundant files
    • config/rbac/auth_proxy_client_clusterrole.yaml
    • config/rbac/auth_proxy_role.yaml
    • config/rbac/auth_proxy_role_binding.yaml
    • config/rbac/auth_proxy_service.yaml
    • config/rbac/checluster_editor_role.yaml
    • config/rbac/checluster_viewer_role.yaml
    • config/rbac/leader_election_role.yaml
    • config/rbac/leader_election_role_binding.yaml

Screenshot/screencast of this PR

N/A

What issues does this PR fix or reference?

eclipse-che/che#22811

How to test this PR?

  1. Prepare a patch file if needed:
cat > /tmp/cr-patch.yaml <<EOF
apiVersion: org.eclipse.che/v2
kind: CheCluster
spec: {}
EOF
  1. Deploy the operator:

OpenShift

./build/scripts/olm/test-catalog-from-sources.sh --cr-patch-yaml /tmp/cr-patch.yaml

on Minikube

./build/scripts/minikube-tests/test-operator-from-sources.sh --cr-patch-yaml /tmp/cr-patch.yaml

PR Checklist

As the author of this Pull Request I made sure that:

Reviewers

Reviewers, please comment how you tested the PR when approving it.

tolusha added 2 commits March 5, 2024 11:16
Signed-off-by: Anatolii Bazko <[email protected]>
Signed-off-by: Anatolii Bazko <[email protected]>
@tolusha tolusha requested review from SDawley and ibuziuk as code owners March 5, 2024 13:25
Copy link

openshift-ci bot commented Mar 5, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: tolusha

The full list of commands accepted by this bot can be found 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

@tolusha tolusha marked this pull request as draft March 5, 2024 13:47
Signed-off-by: Anatolii Bazko <[email protected]>
Copy link

codecov bot commented Mar 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.66%. Comparing base (09e4471) to head (cb00247).

❗ Current head cb00247 differs from pull request most recent head 8ce831c. Consider uploading reports for the commit 8ce831c to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1814      +/-   ##
==========================================
- Coverage   59.73%   59.66%   -0.07%     
==========================================
  Files          74       74              
  Lines        9114     9099      -15     
==========================================
- Hits         5444     5429      -15     
  Misses       3294     3294              
  Partials      376      376              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tolusha tolusha changed the title chore: Operator clusterroles/roles sanitation chore: operator roles sanitizing Mar 5, 2024
Signed-off-by: Anatolii Bazko <[email protected]>
@tolusha tolusha marked this pull request as ready for review March 5, 2024 15:30
Signed-off-by: Anatolii Bazko <[email protected]>
@tolusha tolusha marked this pull request as draft March 6, 2024 09:17
This reverts commit cb00247.
@tolusha tolusha marked this pull request as ready for review March 6, 2024 10:49
@tolusha
Copy link
Contributor Author

tolusha commented Mar 6, 2024

/retest

Copy link

openshift-ci bot commented Mar 7, 2024

@tolusha: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/v14-che-behind-proxy b94c5da link true /test v14-che-behind-proxy

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@tolusha tolusha merged commit d4d21a2 into main Mar 7, 2024
17 of 21 checks passed
@tolusha tolusha deleted the 22811 branch March 7, 2024 10:01
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

Successfully merging this pull request may close these issues.

1 participant