Commit Graph

294 Commits (cbecf177274e6f6924d6ca756eccf0a55e2933c0)

Author SHA1 Message Date
Jeff Grafton aee5f457db update BUILD files 2017-10-15 18:18:13 -07:00
Antoine Pelisse d1ce36371e kubectl: Remove swagger 1.2 entirely. 2017-10-10 14:50:56 -07:00
Di Xu 279065aa6c pass labelSelector to server side opaquely 2017-09-30 14:54:27 +08:00
Kubernetes Submit Queue 52cb89751f Merge pull request #48763 from juanvallejo/jvallejo/update-set-image-local-error-message
Automatic merge from submit-queue (batch tested with PRs 47806, 49539, 48763, 47049, 50600). 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 Local and Unstructured resource builder attributes and handle <rsrsc> / <name> pairs when --local is set

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

Related downstream BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1390139

Adds an error message if a non-filename (or stdin) resource is specified with the `--local` flag in any of the `kube set ...` sub-commands.

cc @fabianofranz @kubernetes/sig-cli-misc
2017-09-22 21:20:54 -07:00
Fabiano Franz 81407cef49 Category expansion fully based on discovery 2017-09-05 17:34:42 -03:00
juanvallejo 04d319dc2a
update bazel 2017-09-05 11:57:01 -04: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
juanvallejo c10f4f78bc
add err message if <rsrc>/<name> pairs specified under --local 2017-09-05 11:04:39 -04:00
Di Xu 6b24fe2215 kubectl get show uninitialized resources 2017-08-26 13:52:36 +08:00
Jeffrey Regan dbc22ad6fd Remove kubectl's dependence on schema file in pkg/api/validation.
**What this PR does / why we need it**:

Makes functions in validation/schema.go private to kubectl,
further isolating kubectl.

**Which issue this PR fixes**

Part of a series of PRs to address kubernetes/community#598

**Release note**:
```release-note
NONE
```
2017-08-16 16:38:28 -07:00
Jeff Grafton a7f49c906d Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
Jeff Grafton 33276f06be Use buildozer to remove deprecated automanaged tags 2017-08-11 09:31:50 -07:00
guangxuli 7db36811be add daemonset to all categories 2017-07-26 15:41:47 +08:00
deads2k 1477b407c7 add cronjobs to all 2017-07-21 10:56:26 -04:00
Kubernetes Submit Queue 8337bd028d Merge pull request #49132 from deads2k/cli-01-union-category
Automatic merge from submit-queue (batch tested with PRs 49055, 49128, 49132, 49134, 49110)

add a union category expander

Adds a union category expander for use when we need to combined hardcoded and non-hardcoded options.
2017-07-18 21:54:22 -07:00
Kubernetes Submit Queue 32580b89b1 Merge pull request #48871 from wanghaoran1988/do_not_close_stdin
Automatic merge from submit-queue (batch tested with PRs 48914, 48535, 49099, 48935, 48871)

do not close os.Stdin manually

**What this PR does / why we need it**:
We don't need close os.Stdin manually, it will block our read from stdin after finish the visit.
**Special notes for your reviewer**:

**Release note**:
```
None
```
2017-07-18 21:04:28 -07:00
deads2k 486d8ef229 add a union category expander 2017-07-18 13:40:22 -04:00
Clayton Coleman b6d9815b95
Remove use of (Label|Field)SelectorParam 2017-07-16 15:56:11 -04:00
Haoran Wang c536614509 do not close os.Stdin manually 2017-07-16 09:55:08 +08:00
deads2k 0801ded425 remove dead code 2017-07-07 09:12:29 -04:00
Chao Xu 60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
Kubernetes Submit Queue 212150b66a Merge pull request #45582 from CaoShuFeng/kubectl_set
Automatic merge from submit-queue

avoid concrete examples for missingResourceError

missingResourceError uses pod and services as an example in error message. However some sub-commands doesn't support pod/service, this change use `<resource> <name>` instead of concrete examples.
Before this change:
```console
$ kubectl set subject
error: You must provide one or more resources by argument or filename.
Example resource specifications include:
   '-f rsrc.yaml'
   '--filename=rsrc.json'
   'pods my-pod'
   'services'
```

After this change:
```console
$ kubectl set subject
error: You must provide one or more resources by argument or filename.
Example resource specifications include:
   '-f rsrc.yaml'
   '--filename=rsrc.json'
   '<resource> <name>'
   '<resource>'
```

**Release note**:

```release-note
avoid concrete examples for missingResourceError
```
2017-05-18 00:37:08 -07:00
Cao Shufeng b53ae95e84 modify the example part of missingResourceError
"missingResourceError" is a generic error for kubectl, so we should
not use concrete examples in the error message.
2017-05-16 09:37:37 +08:00
Jeffrey Regan 7abff879d7 Introduce visibility rules to kubernetes code.
**What this PR does / why we need it**:

Visibility rules allow dependency control.  The rules currently in
place make all targets public, to override the default state of
private.  This PR removes public visibility from kubectl code.  It
uses specially named pacakge groups to identify "bad" dependencies on
kubectl code for later refactoring or removal.

**Which issue this PR fixes**

First in a series of PRs to address kubernetes/community#598

**Release note**:
```release-note
NONE
```
2017-05-15 12:50:56 -07:00
AdoHe 5ed1ab66a2 refactor edit to remove cobra dependency and also make it reusable 2017-04-18 20:44:25 +08:00
Mike Danese a05c3c0efd autogenerated 2017-04-14 10:40:57 -07:00
deads2k 8895f314b4 move category expansion out of restmapper 2017-03-27 13:54:05 -04:00
Jordan Liggitt 0e2f1b535d
Ensure empty serialized slices are zero-length, not null 2017-03-20 23:56:39 -04:00
Clayton Coleman bace937438
Don't filter items when resources requested by name
Add tracking on resource.Builder if a "named" item is requested (from
file, stream, url, or resource args) and use that in `get` to accurately
determine whether to filter resources. Add tests.
2017-02-28 19:19:33 -05:00
nikhiljindal 78ae193de6 kubectl should always set orphanDependents=false for cascading deletion 2017-02-23 12:04:13 -08:00
Jordan Liggitt 7b6ef2cedc
Switch watch prefixes to params 2017-02-22 08:54:08 -05:00
Wojciech Tyczynski a21b08d00f Revert "Use watch param instead of deprecated /watch/ prefix" 2017-02-21 08:37:51 +01:00
Jordan Liggitt f950171003
Switch watch prefixes to params 2017-02-19 23:51:58 -05:00
Jordan Liggitt 5b805bc18a
Simplify 'kubectl edit' logic
edit: make editFn operate on arguments regardless of mode

edit: simplify short-circuiting logic when re-editing a file containing an error

edit: factor out visitor building

edit: use resource builder to get results from edited file
2017-02-14 14:51:06 -05:00
Dr. Stefan Schimanski 44ea6b3f30 Update generated files 2017-01-29 21:41:45 +01:00
Dr. Stefan Schimanski 79adb99a13 pkg/api: move Semantic equality to k8s.io/apimachinery/pkg/api/equality 2017-01-29 21:41:45 +01:00
Dr. Stefan Schimanski bc6fdd925d pkg/api/resource: move to apimachinery 2017-01-29 21:41:44 +01:00
Kubernetes Submit Queue bef60b8602 Merge pull request #40046 from juanvallejo/jvallejo/update-multiple-types-requested-check
Automatic merge from submit-queue (batch tested with PRs 40046, 40073, 40547, 40534, 40249)

update check for "all" resources

This patch updates the check for `all` resources to handle cases where a resource's name is "all". Rather than cycling through all given args until `all` is found, this patch makes sure that only a single argument `all` was specified at all.

**Release note**:
```release-note
release-note-none
```

@fabianofranz @pwittrock
2017-01-26 16:10:34 -08:00
juanvallejo 1b8f4e0b7d update check for "all" resources 2017-01-25 10:15:29 -05:00
deads2k 502bfdf944 client/restclient/fake move to client-go 2017-01-25 08:29:48 -05:00
deads2k 5a8f075197 move authoritative client-go utils out of pkg 2017-01-24 08:59:18 -05:00
Clayton Coleman 469df12038
refactor: move ListOptions references to metav1 2017-01-23 17:52:46 -05:00
deads2k ee6752ef20 find and replace 2017-01-20 08:04:53 -05:00
deads2k c587b8a21e re-run client-gen 2017-01-20 08:02:36 -05:00
deads2k 6c6616b41c move restclient/watch 2017-01-19 07:39:20 -05:00
Clayton Coleman 9a2a50cda7
refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
Kubernetes Submit Queue 65f6875ec4 Merge pull request #34763 from juanvallejo/jvallejo/add-warning-on-export-invalid-output-version
Automatic merge from submit-queue

log info on invalid --output-version

**Release note**:

``` release-note
release-note-none
```

Object versions default to the current version (v1) when a specified
`--output-version` is invalid. This patch logs a warning when this is
the case. Cases affected are all commands with the `--output-version`
option, and anywhere runtime objects are converted to versioned objects.

**Example**

```
$ kubectl get pod <mypod> -o json --output-version=invalid
W1013 17:24:16.810278   26719 result.go:238]  info: the output version
specified (invalid) is invalid, defaulting to v1
{
        "kind": "Pod",
            "apiVersion": "v1",
                "metadata": {
                            "name": "mypod",
                                    "namespace": "test",
...
```
2017-01-17 09:01:31 -08:00
deads2k f31ecdd0f7 generated changes 2017-01-17 08:32:05 -05:00
deads2k 26c46971f2 move PatchType to apimachinery 2017-01-17 08:32:05 -05:00