runtime
runtime copied to clipboard
Support team-id annotation
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-idannotation - If both
team-idandowner-account-idexist. It will take theteam-idand ignoreowner-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.
[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.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
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.
/ok-to-test
@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.
/ok-to-test
/retest
/retest
/retest
/retest
/retest
/retest
/ok-to-test