runtime icon indicating copy to clipboard operation
runtime copied to clipboard

Support team-id annotation

Open zicongmei opened this issue 1 year ago • 12 comments

Issue #, if available: https://github.com/aws-controllers-k8s/community/issues/2031

Description of changes:

Add support of team-id annotation in the namespace. Each team-id can associate with a different AWS Role ARN. So that the controller can have different roles for different namespaces. It can help fine grained permission when different teams and users are using the same controller.

Changes:

  • On top of https://github.com/aws-controllers-k8s/runtime/pull/143
  • Add a team-id annotation
  • If both team-id and owner-account-id exist. It will take the team-id and ignore owner-account-id.

Sample usage:

apiVersion: v1
kind: ConfigMap
metadata:
  name: ack-carm-map
  namespace: ack-system
data:
  owner-account-id/111111111111: arn:aws:iam::111111111111:role/s3FullAccess
  team-id/team-a:  'arn:aws:arn:aws:iam::123456789012:role/read-only'
---
apiVersion: v1
kind: Namespace
metadata:
  name: team
  annotations:
    services.k8s.aws/team-id: "team-a"
---
apiVersion: v1
kind: Namespace
metadata:
  name: account
  annotations:
    services.k8s.aws/owner-account-id: "111111111111"
---

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

zicongmei avatar Feb 22 '24 18:02 zicongmei

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: zicongmei Once this PR has been reviewed and has the lgtm label, please assign jljaco for approval by writing /assign @jljaco 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.

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[bot] avatar Feb 22 '24 18:02 ack-prow[bot]

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

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.

ack-prow[bot] avatar Feb 22 '24 18:02 ack-prow[bot]

/ok-to-test

zicongmei avatar Feb 22 '24 19:02 zicongmei

@zicongmei: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/ok-to-test

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.

ack-prow[bot] avatar Feb 22 '24 19:02 ack-prow[bot]

/ok-to-test

a-hilaly avatar Feb 29 '24 18:02 a-hilaly

/retest

a-hilaly avatar Feb 29 '24 19:02 a-hilaly

/retest

a-hilaly avatar Mar 01 '24 19:03 a-hilaly

/retest

zicongmei avatar Mar 11 '24 18:03 zicongmei

/retest

zicongmei avatar Mar 11 '24 22:03 zicongmei

/retest

zicongmei avatar Mar 12 '24 16:03 zicongmei

/retest

zicongmei avatar Mar 12 '24 20:03 zicongmei

/ok-to-test

zicongmei avatar Mar 12 '24 22:03 zicongmei