amazon-archives / aws-service-operator

AWS Service Operator allows you to create AWS resources using kubectl.
Apache License 2.0
733 stars 103 forks source link

Add ability to scope API calls to a kubernetes namespace #185

Closed pauldthomson closed 5 years ago

pauldthomson commented 5 years ago

Issue #, if available: n/a

Description of changes: Allow a namespace to be passed as an optional configuration parameter. When passed this namespace will be used when querying the kubernetes API to allow the operator to be scoped to a namespace.

Combined with using Role and RoleBinding instead of ClusterRole and ClusterRoleBinding when deploying the operator, this allows the operator to be run with namespace-scoped permissions.

The default behaviour if no namespace is passed in is to use all namespaces as it does currently.

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

christopherhein commented 5 years ago

Thanks for the PR. Any chance you can squash this all into a single commit?

pauldthomson commented 5 years ago

Done

pauldthomson commented 5 years ago

Updated with the requested changes

christopherhein commented 5 years ago

Awesome, thanks @pauldthomson !