Skip to content

Conversation

gunzy83
Copy link

@gunzy83 gunzy83 commented Oct 31, 2024

Issue #, if available: N/A

Description of changes: This change ensures that the required ClusterRoleBinding and RoleBinding objects apply to a ServiceAccount with custom name when running with installScope: namespace.

Error seen with custom service account name:

pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:232: Failed to watch *v1.ConfigMap: failed to list *v1.ConfigMap: configmaps is forbidden: User "system:serviceaccount:kms-controller:kms-controller" cannot list resource "configmaps" in API group "" in the namespace "kms-controller"

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

Copy link

ack-prow bot commented Oct 31, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: gunzy83
Once this PR has been reviewed and has the lgtm label, please assign a-hilaly for approval by writing /assign @a-hilaly 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 ack-prow bot requested a review from a-hilaly October 31, 2024 04:42
@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 Oct 31, 2024
Copy link

ack-prow bot commented Oct 31, 2024

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

@michaelhtm
Copy link
Member

michaelhtm commented Oct 31, 2024

Hey @gunzy83, Thank you for contributing to ACK.
Your change, although it's correct, is making changes to a generated file.
This issue needs to be addressed in this code-generator template file.
Let me know if you have any questions regarding this!.

@gunzy83
Copy link
Author

gunzy83 commented Nov 1, 2024

Hey @gunzy83, Thank you for contributing to ACK. Your change, although it's correct, is making changes to a generated file. This issue needs to be addressed in this code-generator template file. Let me know if you have any questions regarding this!.

Thanks. I have opened a PR on the upstream repo: aws-controllers-k8s/code-generator#557

ack-prow bot pushed a commit to aws-controllers-k8s/code-generator that referenced this pull request Nov 4, 2024
…ces-cache and configmaps-cache role bindings (#557)

Issue #, if available: N/A

Relates to aws-controllers-k8s/kms-controller#83

Description of changes: This change ensures that the required `ClusterRoleBinding` and `RoleBinding` objects apply to a `ServiceAccount` with a custom name.

Error seen with custom service account name:

```
pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:232: Failed to watch *v1.ConfigMap: failed to list *v1.ConfigMap: configmaps is forbidden: User "system:serviceaccount:kms-controller:kms-controller" cannot list resource "configmaps" in API group "" in the namespace "kms-controller"
```

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

gunzy83 commented Nov 6, 2024

Closing this as my PR on the code-generator repo was merged.

@gunzy83 gunzy83 closed this Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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