Commit Graph

26 Commits (c582a37cae02b4d1a850e6668ea8ea0a81dcd204)

Author SHA1 Message Date
David Eads 58136ee568 fail on rbac resources of non-v1 versions in reconcile 2018-07-02 13:07:16 -04:00
Matt Rogers 9f3b97572a Add more kubectl auth reconcile flags
Adds --remove-extra-permissions and --remove-extra-subjects

Signed-off-by: Matt Rogers <mrogers@redhat.com>
2018-05-31 12:16:49 -04:00
Kubernetes Submit Queue 75517f60b9
Merge pull request #64458 from mrogers950/reconcile-dryrun-additive
Automatic merge from submit-queue (batch tested with PRs 64322, 64210, 64458, 64232, 64370). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add dry-run flag to auth reconcile

```release-note
The --dry-run flag has been enabled for kubectl auth reconcile
```
/assign @juanvallejo 
cc @enj
2018-05-30 10:09:11 -07:00
Matt Rogers 20cd94de17 Add dry-run to auth reconcile
Signed-off-by: Matt Rogers <mrogers@redhat.com>
2018-05-29 16:28:46 -04:00
David Eads c85e69aeb9
remove unnecessary factory delegation for RESTClientGetter method 2018-05-28 15:12:41 +02:00
Kubernetes Submit Queue 2ff0bc2b8a
Merge pull request #63967 from deads2k/rbac-06-external
Automatic merge from submit-queue (batch tested with PRs 62025, 63851, 64077, 63967, 63991). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

switch rbac to external

The overall trajectory of the project is towards external types.  Having all helpers agree on the version they operate on makes life much easier.  We've already written one RBAC controller (role aggregation) and more may follow.  `v1` has been around for a while now and we know that any future changes have to reliably roundtrip through it.  This pull switches all the core helpers over to use the external types.

@kubernetes/sig-auth-pr-reviews 

```release-note
`kubectl auth reconcile` only works with rbac.v1
```
2018-05-22 08:40:26 -07:00
David Eads 092714ea0f switch rbac to external 2018-05-22 08:17:05 -04:00
juanvallejo d1603c9560 move PrintOptions to genericclioptions 2018-05-21 14:59:41 -04:00
David Eads 420dd9bf66 move type setting into an optional layer above normal printing 2018-05-17 17:22:12 -04:00
Kubernetes Submit Queue 143d3b8824
Merge pull request #63561 from juanvallejo/jvallejo/make-opinionated-print-flags-constructor
Automatic merge from submit-queue (batch tested with PRs 63669, 63511, 63561, 63289). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

remove legacyscheme dep from printFlags

**Release note**:
```release-note
NONE
```

Breaks PrintFlags dependency on legacyscheme
Prerequisite to https://github.com/kubernetes/kubernetes/pull/63402

cc @deads2k @soltysh
2018-05-10 14:25:16 -07:00
juanvallejo 40e52bf07d remove legacyscheme dep from printFlags 2018-05-10 14:51:12 -04:00
David Eads 16d6a6c52f move resource builder to generic options 2018-05-10 14:15:12 -04:00
juanvallejo 5a34e4f594 remove printer helpers 2018-05-07 15:37:55 -04:00
David Eads b8aa7baa7d simplify resource builder usage 2018-05-04 13:02:49 -04:00
David Eads 6fbcbc994f remove unnecessarily flexibiliy to simplify the resource builder 2018-04-27 09:27:51 -04:00
David Eads be04e7c1b1 collapse printing paths 2018-02-21 08:15:22 -05:00
juanvallejo beb5ea641a
remove mapper dependency - PrintSuccess 2018-02-07 10:10:45 -05:00
Di Xu 1c715d51c4 some code change
fix wrong required flags

disable the addition of [flags] to the usage, use customized useline

fix function rename
2017-12-25 16:23:38 +08:00
Clayton Coleman 8f4b6c8771
All commands must declare Unstructured or Internal
Callers must take a dependency on one or the other set of conversions
and default client behavior. Future changes may add a Versioned() type,
but this is an accurate reflection of current code state.
2017-11-19 20:41:02 -05:00
juanvallejo 701d6536a2
move cmd/util/printing.go#PrintSuccess to factory_builder.go 2017-11-15 10:46:39 -05:00
juanvallejo 4418591226
move cmd/util/printing.go#PrintResourceInfoForCommand -> factory_builder.go 2017-11-09 15:13:18 -05:00
Monis Khan 136cb482aa
Make ReconcileOptions reusable
This change makes ReconcileOptions fully reusable by:

1. Replacing ResourceBuilder with a Visitor that can be generically
plugged in.  This decouples the use of file input from the options.
2. Replacing core client with namespace client since that smaller
interface is what is needed by RunReconcile.
3. All fields are now checked by Validate as a way to document that
they should be set before calling RunReconcile.

Signed-off-by: Monis Khan <mkhan@redhat.com>
2017-11-07 09:57:14 -05:00
Kubernetes Submit Queue 63c1ed12aa Merge pull request #52761 from yuexiao-wang/validate-message
Automatic merge from submit-queue (batch tested with PRs 52880, 52855, 52761, 52885, 52929). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Adjust the validating messages

Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>

**What this PR does / why we need it**:
1.  Adjust the validating messages for user understanding 
2.  Add error messages for easliy testing.
3.  Optimize the  code for switch case.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2017-09-24 04:30:07 -07:00
yuexiao-wang 142c2dd67b Adjust the validating messages
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2017-09-21 09:58:50 +08:00
juanvallejo 90d76adb4b
add Local and Unstructured builder attributes
Moves DisabledClientMapperForMapping wrapper to new Local attribute.
Removes Factory#NewUnstructuredBuilder in favor of new Unstructured
builder attribute.
2017-09-05 11:57:00 -04:00
David Eads aa637502e0 add reconcile command to kubectl auth 2017-08-30 16:04:00 -04:00