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

[Feature] Consistency check for RBAC #577

Merged
merged 13 commits into from
Sep 19, 2022

Conversation

kevin85421
Copy link
Member

@kevin85421 kevin85421 commented Sep 19, 2022

Why are these changes needed?

This PR adds two consistency checks related to RBAC in GitHub Actions.

(1) ray-operator-verify-crd-rbac: Kubebuilder markers in ray-operator/controllers/ray/*_controller.go should be synchronized with RBAC YAML files in ray-operator/config/rbac.

(2) helm-chart-verify-rbac: Check the consistency between RBAC YAML files in helm-chart/kuberay-operator/templates and ray-operator/config/rbac.

Related issue number

Closes #580
Closes #164

Checks

  • This PR should pass CI/CD. (Link)

  • (DO NOT MERGE) #577 Control Group 1 #578

    • I updated Kubebuilder markers in raycluster_controller.yaml.
      • // +kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch;create;update;delete
    • Expected Result: ray-operator-verify-crd-rbac should fail. (Link)
  • (DO NOT MERGE) #577 Control Group 2 #579

    • I updated Kubebuilder markers in raycluster_controller.yaml.
      • // +kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch;create;update;delete
    • Run make manifests to synchronize ray-operator/config/rbac/role.yaml and Kubebuilder markers.
    • Expected Result: ray-operator-verify-crd-rbac should pass, but helm-chart-verify-rbac should fail. (Link)
  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • This PR is not tested :(

Copy link
Collaborator

@DmitriGekhtman DmitriGekhtman left a comment

Choose a reason for hiding this comment

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

This is excellent. Thanks!

@DmitriGekhtman DmitriGekhtman merged commit 34e394f into ray-project:master Sep 19, 2022
lowang-bh pushed a commit to lowang-bh/kuberay that referenced this pull request Sep 24, 2023
This PR adds two consistency checks related to RBAC in GitHub Actions.

(1) ray-operator-verify-crd-rbac: Kubebuilder markers in ray-operator/controllers/ray/*_controller.go should be synchronized with RBAC YAML files in ray-operator/config/rbac.

(2) helm-chart-verify-rbac: Check the consistency between RBAC YAML files in helm-chart/kuberay-operator/templates and ray-operator/config/rbac.
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.

[Feature] Consistency check for RBAC [Bug] RBAC file can not be updated automatically
2 participants