Skip to content

Conversation

@naclonts
Copy link

@naclonts naclonts commented Dec 10, 2025

Issue #, if available: aws-controllers-k8s/community#2207

Description of changes: Add support for a Users list under Group. The group's IAM users will be added or removed based on the list defined in the CR.

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

Testing

Added automated e2e tests.

Manual test

YAML file group_w_users.yaml :

apiVersion: iam.services.k8s.aws/v1alpha1
kind: Group
metadata:
  name: cool-peeps
spec:
  name: cool-peeps
  users:
    - nclonts

Apply:

% k apply -f group_w_users.yaml
group.iam.services.k8s.aws/cool-peeps configured

Verified AWS account has group cool-peeps that includes user nclonts.

@ack-prow ack-prow bot requested review from jlbutler and michaelhtm December 10, 2025 23:51
@ack-prow
Copy link

ack-prow bot commented Dec 10, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: naclonts
Once this PR has been reviewed and has the lgtm label, please assign jlbutler for approval by writing /assign @jlbutler in a comment. For more information see the Kubernetes Code Review Process.

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

Details 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

@ack-prow ack-prow bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Dec 10, 2025
@ack-prow
Copy link

ack-prow bot commented Dec 10, 2025

Hi @naclonts. Thanks for your PR.

I'm waiting for a aws-controllers-k8s member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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.

@naclonts naclonts marked this pull request as draft December 10, 2025 23:52
@ack-prow ack-prow bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 10, 2025
@naclonts naclonts marked this pull request as ready for review December 11, 2025 00:21
@ack-prow ack-prow bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 11, 2025
@ack-prow ack-prow bot requested a review from knottnt December 11, 2025 00:22
Copy link
Contributor

@knottnt knottnt left a comment

Choose a reason for hiding this comment

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

Thinking about usability of this feature it might be better to add a list of groups to the User resource instead. A group can have hundreds to thousands of users in normal use, whereas a user would normally have a much more limited number number of groups.

# In order to support adding zero or more users to a group, we use
# custom update code that calls the AddUserToGroup and RemoveUserFromGroup
# APIs to manage the set of users in this Group.
Users:
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add a description for the custom field? The CRD descriptions are used to generate our API reference docs. You should be able to do that in the generator.yaml with the DocumenationConfig.

- name: controller
newName: public.ecr.aws/aws-controllers-k8s/iam-controller
newTag: 1.6.0
newTag: 0.0.0-non-release-version
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you pull the latest tags from upstream and rebuild.

@knottnt
Copy link
Contributor

knottnt commented Dec 15, 2025

/hold

@ack-prow ack-prow bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants