keikoproj / aws-auth

Manage the aws-auth config map for EKS Kubernetes clusters
Apache License 2.0
182 stars 26 forks source link

adding needed flags to impersonate #49

Closed 45cali closed 2 years ago

45cali commented 2 years ago

this pull request provides the needed flags to impersonate when using the get, upsert and remove commands

 go run main.go upsert -h
upsert updates or inserts a user or role to the aws-auth configmap

Usage:
  aws-auth upsert [flags]

Flags:
      --append                    append to a existing group list
      --as string                 Username to impersonate for the operation
      --as-group strings          Group to impersonate for the operation, this flag can be repeated to specify multiple groups
      --groups strings            Groups to upsert
  -h, --help                      help for upsert
      --kubeconfig string         Path to kubeconfig
      --maproles                  Upsert a role
      --mapusers                  Upsert a user
      --retry                     Retry on failure with exponential backoff
      --retry-max-count int       Maximum number of retries before giving up (default 12)
      --retry-max-time duration   Maximum wait interval (default 30s)
      --retry-min-time duration   Minimum wait interval (default 200ms)
      --rolearn string            Role ARN to upsert
      --update-username           set to false to not overwite username (default true)
      --userarn string            User ARN to upsert
      --username string           Username to upsert
codecov[bot] commented 2 years ago

Codecov Report

Merging #49 (8f1b0ef) into master (4c9d160) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #49   +/-   ##
=======================================
  Coverage   86.00%   86.00%           
=======================================
  Files           5        5           
  Lines         343      343           
=======================================
  Hits          295      295           
  Misses         25       25           
  Partials       23       23           
Impacted Files Coverage Δ
pkg/mapper/types.go 79.48% <ø> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

eytan-avisror commented 2 years ago

Thanks @45cali 👍 Added some comments