Commit Graph

62 Commits (0ac651bfc39f29b2301bd85ab3bfe277cf323100)

Author SHA1 Message Date
Maciej Szulik b4f81285bf
Fix flag template when both visible and explicit flags are specified 2019-02-27 22:35:03 +01:00
Kubernetes Prow Robot bad9f6341a
Merge pull request #72137 from YoubingLi/master
Issue 71769: Correctly display '_' in the help message
2019-02-21 03:54:11 -08:00
Youbing Li 373c42d1c5 Issue 71769: Correctly display '_' in the help message 2019-02-10 20:45:06 -05:00
Andrew Kim 0bc5508aca replace client-go/util/integer with k8s.io/utils/integer 2019-01-24 15:34:21 -05:00
Jordan Liggitt 2b1a2d361f Use tabwriter with remembered column widths 2019-01-01 22:27:36 -05:00
Sean Sullivan 6a57de315d kubectl: small internal to external type fix 2018-11-15 16:45:17 -08:00
zuoxiu.jm da9387131e prune internal clients from kubectl describer 2018-11-16 00:11:10 +08:00
Davanum Srinivas 954996e231
Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
2018-11-10 07:50:31 -05:00
Yang Li 3d0c961d57 Fix some golint errors for packages in `pkg/kubectl`
- Fix some golint errors for `pkg/kubectl`
- Fix a golint error for `pkg/kubectl/apps`
- Fix all golint errors for `pkg/kubectl/cmd`
- Fix some golint errors for `pkg/kubectl/generate/versioned`
- Fix a golint error for `pkg/kubectl/generate`
- Fix some golint errors for `pkg/kubectl/metricsutil`
- Fix all golint errors for `pkg/kubectl/util`
- Fix all golint errors for `pkg/kubectl/util/slice`
2018-11-02 11:55:40 +08:00
Jordan Liggitt 57df11bc0f Switch kubectl rollout to directly rolling back deployments 2018-10-26 23:48:44 -04:00
Sean Sullivan ffd4ea963d kubectl: copy deployment util dependency into kubectl 2018-10-18 12:02:39 -07:00
Sean Sullivan b7f8369da2 kubectl: move translated data into kubectl 2018-10-17 10:34:21 -07:00
Sean Sullivan d076897be7 kubectl: copy printer tabwriter into kubectl 2018-10-12 15:10:46 -07:00
k8s-ci-robot 81feb2d03c
Merge pull request #69604 from seans3/podutil-fix
kubectl: copy pod utils into util/podutils package
2018-10-12 14:48:11 -07:00
k8s-ci-robot 3f102c3980
Merge pull request #69500 from m1kola/LC_MESSAGES_support
Makes kubectl respect the `LC_ALL` and `LC_MESSAGES` env vars
2018-10-12 11:19:59 -07:00
Maciej Szulik e0c9189082
Manual changes to package visibility 2018-10-11 22:01:06 +02:00
Maciej Szulik 61899e1654
Generated changes 2018-10-11 22:01:06 +02:00
Maciej Szulik 21789b85a6
Move pkg/kubectl/cmd/templates -> pkg/kubectl/util/temlpates 2018-10-11 22:01:03 +02:00
Mikalai Radchuk 75a137616e Adds support for `LC_MESSAGES` and `LC_ALL`
Implements the following locale lookup priority order: `LC_MESSAGES`, `LC_ALL`, `LANG`.
2018-10-11 20:06:38 +01:00
Sean Sullivan 5f8f607c27 kubectl: copy pod utils into util/podutils package 2018-10-11 10:49:52 -07:00
Mikalai Radchuk a19e84e001 Allows to use named ports in the kubectl portforward 2018-10-08 20:58:22 +01:00
Sylvain Rabot 7e7b01fa31 Log real file's name and line
pkg/kubectl/util/logs & staging/src/k8s.io/apiserver/pkg/util/logs
use `glog.info(...)` but this function is not made to be wrapped because
the underlying mechanism use a fixed call trace length to determine
where the log has been emited.

This results is having `logs.go:49` in the logs which is in the body
of the wrapper function and thus useless.

Instead use `glog.infoDepth(1, ...)` which tells the underlying mechanism
to go back 1 more level in the call trace to determine where the log
has been emitted.

Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
2018-08-11 14:57:45 +02:00
David Eads 8620b736cd switch kubectl portfoward to external types 2018-08-02 08:10:03 -04:00
Jeff Grafton 23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
Jeff Grafton a725660640 Update to gazelle 0.12.0 and run hack/update-bazel.sh 2018-06-22 16:22:18 -07:00
Kubernetes Submit Queue debc5387fe
Merge pull request #63747 from wgliang/master.test.kubectl
Automatic merge from submit-queue. 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>.

use subtest for table units (pkg/kubectl)

**What this PR does / why we need it**:
Go 1.7 added the subtest feature which can make table-driven tests much easier to run and debug. Many table-driven tests in pkg/kubectl are not using this feature.

/kind cleanup
/area kubectl

Further reading: [Using Subtests and Sub-benchmarks](https://blog.golang.org/subtests)


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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-06-20 12:39:21 -07:00
David Eads 207e9d1d90 cleanup some dead kubectl code and narrow scope of helpers 2018-05-29 12:44:53 -04:00
Guoliang Wang bae074ef38 use subtest for table units (pkg/kubectl) 2018-05-27 10:04:55 +08:00
xuzhonghu 46d8cf23ef kubectl use its own logs 2018-05-22 11:35:38 +08:00
Ian Y. Choi 856110a21c Adds initial Korean translations for kubectl 2018-05-12 11:16:49 +09:00
juanvallejo 3ca222b2d9 wire config flags through factory 2018-05-04 17:02:20 -04:00
Jordan Liggitt 17e62d91af
compute configmap/secret key correctly cross-platform 2018-05-04 12:00:50 -04:00
Davanum Srinivas 4cbdbae6e0 Add missing binaryData field to the ConfigMap Hash
In 7e158fb4f6, we added a BinaryData
to ConfigMap, but totally forgot to add it to the hash method.
2018-03-13 22:08:06 -04:00
Jeff Grafton ef56a8d6bb Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
Shawn Hsiao 4a0bbf2363 kubectl port-forward support resolving service port to target port, and support Service as resource type 2018-02-14 12:02:57 -05:00
Lukasz Zajaczkowski 7e158fb4f6 Add support for binary file in configmap 2018-01-23 07:28:34 -05:00
Eric Chiang ea085e0a32 client-go: remove import of github.com/gregjones/httpcache 2018-01-08 09:54:12 -08:00
Kubernetes Submit Queue 7a58a5caee
Merge pull request #55576 from miaoyq/using-sort.slice
Automatic merge from submit-queue. 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>.

Simplify the sorting codes

**What this PR does / why we need it**:

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

**Special notes for your reviewer**:

**Release note**:

```release-note

```
2018-01-07 12:06:04 -08:00
Jeff Grafton efee0704c6 Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
Yanqiang Miao 7e973f8275 Simplify the sorting codes 2017-11-13 14:28:01 +08:00
ymqytw 4487cc5e15 switch some commands to use its own scheme 2017-10-27 18:31:42 -07:00
Jeff Grafton aee5f457db update BUILD files 2017-10-15 18:18:13 -07:00
Kubernetes Submit Queue 6d933e35cd Merge pull request #51589 from tcharding/util-functions
Automatic merge from submit-queue. 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>.

kubectl: Move utility functions to util package

**What this PR does / why we need it**:

`parseFileSource()` and `parseLiteralSource()` are utility functions.
We have a package already for utility functions, `kubectl/util/`.

Move utility functions to `kubectl/util`, capitalize function names to
export from package.

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
/sig cli
/kind cleanup
2017-10-04 15:04:06 -07:00
Jeff Grafton 02fb4200dc Use buildozer to delete licenses() rules 2017-09-21 15:53:22 -07:00
Jeff Grafton 532bd482df Use buildozer to remove deprecated automanaged tags 2017-09-21 15:53:22 -07:00
Steffen Schmitz cff3623649 German Translation 2017-09-07 19:41:24 +02:00
tcharding 63ffb1995b kubectl: Move utility functions to util package
`parseFileSource()` and `parseLiteralSource()` are utility functions.
We have a package already for utility functions, `kubectl/util/`.

Move utility functions to `kubectl/util`, capitalize function names to
export from package.
2017-09-04 20:14:16 +10:00
Michael Taufen 503a6a8eec Add --append-hash flag to kubectl create configmap/secret
Specifying this new flag will automatically hash the configmap/secret
contents with sha256 and append the first 40 hex-encoded bits of the
hash to the name of the configmap/secret. This is especially useful for
workflows that generate configmaps/secrets from files (e.g.
--from-file).

Note that vowels and vowel-like characters in the hash are remapped to
consonants to make it more difficult to accidentally form bad words.

See this Google doc for more background:
https://docs.google.com/document/d/1x1fJ3pGRx20ujR-Y89HUAw8glUL8-ygaztLkkmQeCdU/edit
2017-08-28 14:17:47 -07:00
Luca Berton 1044b0df00 Italian translation 2017-08-23 08:45:26 +02:00
ymqytw b776df8a20 move i18n to kubectl/util 2017-08-16 12:27:36 -07:00