Skip to content

Enhance controller RBAC and helm charts generation #495

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

Merged
merged 1 commit into from
Jan 29, 2024

Conversation

a-hilaly
Copy link
Member

This patch enhances the permissions for controllers with the addiotion
of multi-namespace watch mode. The controlelrs now have more
fine-grained permissions, enabling them to watch specific namespaces
exclusively.

Key changes:

  • Refactored helm chart generation tooling, especially Roles and
    ClusterRoles
  • Addressed a bug where the RoleBinding was incorrectly assigning the
    roles into a different namespace when the controller was installed ina
    namespace that is different fro the one it monitored.

Notable features:

  • We start generating one Role/RoleBinding for each monitored namespace.
  • We introduced seperate Role and ClusterRoles for the CARM feature
    (prefixed with ack-*-cache)

Less importantly we are replacing some bash-fu that used to inject RBAC
rules into Roles and ClusterRoles, with a different bash-fu that allows
reusing rules for different Roles.

Signed-off-by: Amine Hilaly [email protected]

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ack-prow ack-prow bot requested review from jlbutler and jljaco January 29, 2024 03:32
@ack-prow ack-prow bot added the approved label Jan 29, 2024
@a-hilaly a-hilaly force-pushed the multinamespace-rbac branch from a553b85 to 461dae8 Compare January 29, 2024 04:51
@a-hilaly
Copy link
Member Author

/retest

@a-hilaly a-hilaly force-pushed the multinamespace-rbac branch from 461dae8 to 64b2d45 Compare January 29, 2024 05:25
This patch enhances the permissions for controllers with the addiotion
of multi-namespace watch mode. The controlelrs now have more
fine-grained permissions, enabling them to watch specific namespaces
exclusively.

Key changes:
- Refactored helm chart generation tooling, especially Roles and
  ClusterRoles
- Addressed a bug where the RoleBinding was incorrectly assigning the
  roles into a different namespace when the controller was installed ina
  namespace that is different fro the one it monitored.

Notable features:
- We start generating one Role/RoleBinding for each monitored namespace.
- We introduced seperate Role and ClusterRoles for the CARM feature
  (prefixed with ack-*-cache)

Less importantly we are replacing some bash-fu that used to inject RBAC
rules into Roles and ClusterRoles, with a different bash-fu that allows
reusing rules for different Roles.

Signed-off-by: Amine Hilaly <[email protected]>
@a-hilaly a-hilaly force-pushed the multinamespace-rbac branch from 64b2d45 to 57b6636 Compare January 29, 2024 05:30
Copy link

ack-prow bot commented Jan 29, 2024

@a-hilaly: 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
dynamodb-controller-test 57b6636 link true /test dynamodb-controller-test

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.

@a-hilaly
Copy link
Member Author

/retest

@ack-bot
Copy link
Collaborator

ack-bot commented Jan 29, 2024

/lgtm

@ack-prow ack-prow bot added the lgtm Indicates that a PR is ready to be merged. label Jan 29, 2024
Copy link

ack-prow bot commented Jan 29, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: a-hilaly, ack-bot

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

@a-hilaly a-hilaly merged commit 92f531c into aws-controllers-k8s:main Jan 29, 2024
@a-hilaly
Copy link
Member Author

Too many hiccups from DynamoDB API... Merging manually as it's not related to this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants