Commit Graph

726 Commits

Author SHA1 Message Date
xiongzhongliang bfad7fa736 code cleanup for kubectl alpha -h
Kubernetes-commit: 5eff181ec30624706eb024467fb1b9d5c9a473f7
2020-12-27 07:30:44 +08:00
Bryan Boreham 40c811e2d9 Comment default behaviour of GracePeriodSeconds
It took me a while to spot this subtlety.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>

Kubernetes-commit: 7c764c8550121b48a6e2678700b6a80fa7d3e2f0
2020-11-23 17:46:14 +00:00
Chok Yip Lau 31e15a5c73 Remove dependency of generators from create configmap
Kubernetes-commit: 838b189130e1a7f19b11a0764f15df1c8de32769
2021-01-10 18:47:32 -05:00
Li Bo 1d8a42052c fix problem that NewReplicaSet shows <none> when describing deployments
Kubernetes-commit: a286455a3e230eb1373002b302669c6999c949f1
2021-01-06 11:05:31 +08:00
Sachin Kumar Singh 8e81e1d9ff Remove the dependency between create poddisruptionbudget and generators
Kubernetes-commit: 1e4cba79ef8972248ac360b4ac5b21b085f6a8dc
2020-12-22 01:50:52 +05:30
Chok Yip Lau a306e7043b Moving kubectl logs Long command into variable
Kubernetes-commit: bd4bf6a28e1080ee9f5c4b2885eecb94542f35f8
2021-01-10 14:54:27 -05:00
Masashi Honma 3c3bc4f5e8 Namespace has no effect when exposing deployment with --dry-run=client
This is how to reproduce.

$ kubectl create ns testns
$ kubectl -n testns create deployment test-deploy --image=nginx
$ kubectl -n testns expose deployment.apps/test-deploy --port=80 --dry-run=client -o yaml
apiVersion: v1
kind: Service
metadata:
  creationTimestamp: null
  labels:
    app: test-deploy
  name: test-deploy
spec:
  ports:
  - port: 80
    protocol: TCP
    targetPort: 80
  selector:
    app: test-deploy
status:
  loadBalancer: {}

If --dry-run=client is not specified, namespace element is contained in the yaml.

Kubernetes-commit: 8d83dfe2075be68344a633418de7ef81e1dd5957
2020-12-24 09:40:10 +09:00
Henrique Fernandes 5d79d7168d Remove debug print
Kubernetes-commit: 32b8d5ae20105c88fd33c1a34f245639c4a0f6f7
2021-01-19 17:21:50 -03:00
Douglas Schilling Landgraf 2560231a8d kubectl diff: update regex to allow equal param
When using GNU diffutils, some commands (e.g. --color[=WHEN])
requires an equal sign.

Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>

Kubernetes-commit: 722751accf7607f4d0573778e85027c63e1802ce
2021-01-18 23:22:36 -05:00
Douglas Schilling Landgraf b839958e59 kubectl: run - remove unneeded vars
No need extra vars just for a single validation.

Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>

Kubernetes-commit: ea017e53af84b05154f275fabcfc95a61b091493
2021-01-15 21:03:27 -05:00
Hidetatsu Yaginuma 0668abe1cd fix invalid indentation
Kubernetes-commit: f00f114ecaca6065be0cbc4c16c670370e202b1a
2021-01-12 13:02:52 +09:00
xiongzhongliang b5ead8eb49 Add statefulset to kubectl autoscale bash completions
Add statefulset to kubectl autoscale bash completions

Kubernetes-commit: 0c74749ec9f2e8ca5ae4710f1d16831998d55625
2021-01-08 03:40:55 +08:00
Chok Yip Lau e9514842ae Fix golint errors for kubectl/pkg/cmd/certificates/certificates.go
Kubernetes-commit: 9a3148291d499a7dc8e25caf429a9a7a8ac06a56
2021-01-09 19:51:51 -05:00
xiongzhongliang ceb5d08972 add -q as shorthand for --quiet
Kubernetes-commit: a7e15c7606d24f0ff11c5ddf05f3cbc6ab891e16
2020-12-31 19:18:17 +08:00
熊中谅10171568 1d4e99420e add more usage info for kubectl wait option --for
add more usage info for kubectl wait option --for

Kubernetes-commit: 033e4a58182fb90e36d5f6cc3f291a2ea114998a
2020-12-29 21:08:03 +08:00
ramnar 75a9c11d24 implemented review comments
Kubernetes-commit: ffc5c5c054bb8138d8fe456f1d9b5a071cdbdbdc
2020-11-18 09:42:36 +05:30
ramnar 23b2c5aba6 remove generator dependency in create service account
Kubernetes-commit: 7000c28b74b6069fd3b5179d89178271b9fafe42
2020-11-12 07:21:46 +05:30
Haoran Wang 8226a30e69 Add NewProxyHandler func
Kubernetes-commit: 930cfe74087080440b1abc58d7918e2fd435377d
2021-01-04 15:58:23 +08:00
xiongzhongliang 862982a5ec cleanup: change klog.Fatalf to fmt.Errorf for kubectl auth reconcile
cleanup: change klog.Fatalf to fmt.Errorf for kubectl auth reconcile

cleanup: change klog.Fatalf to fmt.Errorf for

Kubernetes-commit: 3b3a6d27cd1a55fff173427ac9d74d35de7f5acf
2021-01-01 22:43:51 +08:00
xiongzhongliang 7222c38716 code cleanup for kubectl port-forward
code cleanup for kubectl port-forward

code cleanup for kubectl port-forward

Kubernetes-commit: 555fa97cda1f24631642698e31c2b7b55c003cca
2020-12-27 00:49:18 +08:00
xiongzhongliang 13d5d50660 fix kubectl label error when local=true is set.
fix kubectl label error when local=true is set.

fix kubectl label error when local=true is set.

Kubernetes-commit: cb7009a63bbc90569493f070463ae6715088d46a
2020-12-23 00:03:48 +08:00
xiongzhongliang 269a0a3ee5 fix typo of kubectl completion -h
Kubernetes-commit: fe094b20d2d66a28d4cfb78fcb493d213136cded
2020-12-22 16:49:39 +08:00
cpanato 1feceb70c9 add initial translation for pt_BR
Kubernetes-commit: 0697918749ad7f8997f464016f490bc1fa66a1c2
2018-03-23 13:59:35 +01:00
Sachin Kumar Singh 7259471acb Fix typos and add comments in functions for `kubectl create` subcommands
Certain missing comments and typos in comments are fixed in the files
that implement `kubectl create` subcommands.

Kubernetes-commit: 1c5c8601e479cc3b32809868c250aeb256796484
2020-12-02 03:35:34 +05:30
wangyamei d67b96c166 Fix the wrong link to server-side-apply conflicts
Kubernetes-commit: 958411f452377fda0e3e69a212fe339e73ff499b
2020-12-05 22:59:43 +08:00
Jan Chaloupka 6fea4885d8 kubectl/pkg/cmd tests: set explicit namespace
Otherwise, the namespace gets set to what's a current namespace
in provided kubeconfig. Which can be different from default.

Kubernetes-commit: d4e89547f065ac5eee67ab4646fb3cee874dc1a9
2020-11-20 19:09:54 +01:00
lala123912 11b0ae584d fix staticcheck:vendor/k8s.io/kubectl/pkg/cmd/scale
vendor/k8s.io/kubectl/pkg/cmd/scale/scale.go:212:2: this value of err is never used (SA4006)

Kubernetes-commit: 5710e1b162ea90a3df2622d09864bf2411eb5fd7
2020-11-10 15:19:14 +08:00
cprayer 34c68d249f Added 'No resources found' message to logs command
Kubernetes-commit: 00083d153575e50937d7e0035d27f9b9912f6763
2020-10-17 00:36:57 +09:00
Martin Schimandl 66944ff3b5 remove generator from service in kubectl
Kubernetes-commit: 12a58f3f15a428111d8053a577ac3d21d229a81b
2020-10-02 18:16:28 +02:00
Maciej Szulik d64f53f6eb Move the remaining kubectl bits to k8s.io/kubectl
Kubernetes-commit: 9b8247e5ddb15f3fb9ffe59871172d9a3268af55
2020-11-03 22:11:39 +01:00
Maciej Szulik e650b90b3e Change at which level klog.Fatal is invoked
Kubernetes-commit: 6b4dd3d774bcc84a1f969214096b9cfa373ad389
2020-09-09 21:41:56 +02:00
Derek Carr 74ecab5f7e Downward API hugepages
Kubernetes-commit: 45bd6cb186c05eb3a6cdb2cc4927bbcb50a8ff74
2020-11-06 14:22:53 -05:00
zhouya0 ccd9dd871c Move kubectl get-context validate logic to Validate function
Kubernetes-commit: c41fb9e3bfe5d13347a46d6b08f1b2a8347b1bc8
2020-07-15 19:02:26 +08:00
Bilal Amarni aa373084bf [kubectl] Fail when local source file doesn't exist
When trying to upload an unexisting file to a pod,
kubectl currently doesn't print any error message
and terminates with a zero exit code.

This adds a check and fails explicitly in such cases.

Kubernetes-commit: 3fa5b504423f169723b911547cd22ae85da168e0
2020-04-22 11:09:41 +02:00
Lee Verberne 4dec993ea4 kubectl debug: allow set-image-only invocation
Kubernetes-commit: d6024ce18dd66de2ebe076afa5b33ae4fcfbee67
2020-11-05 13:40:11 +01:00
Aurélien Baumann 1511413ad8 Remove the dependency between create priorityclass command and generators
Kubernetes-commit: 9fff7f70e6d28fd621b2a3ee890b710f05301dad
2020-09-18 11:00:29 -04:00
Sai Harsha Kottapalli 61b85bce7c warn user about resource being deleted
Kubernetes-commit: 7b0ef888f3205f06c871cff901ef0f5b8fdb250c
2020-10-11 02:21:32 +05:30
Karl 'NaN' Wikström 38408eaa8c cleanup: use i18n.T on all command descriptions
cleanup: use i18n.T only on string literals

cleanup: sort imports

Add i18n dependency for wait.go

Remove translation on envResource

cleanup: translate string instead of variable

cleanup: sort imports

cleanup: translate string literal only

Kubernetes-commit: cc8428566ea7160c5b20410a1bee53ca7ddb998e
2020-10-09 13:16:13 +02:00
Douglas Schilling Landgraf bafd13fd9f kubectl: allow users to use args with KUBECTL_EXTERNAL_DIFF
Currently, if users try to use external diff command with arguments
will fail because the entire command won't be available through $PATH.
This patch allow users to use external diff tools with args (or not)
via KUBECTL_EXTERNAL_DIFF env.

Reference: https://github.com/kubernetes/kubectl/issues/937

Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>

Kubernetes-commit: a6158c01b9add5b580059d24cb66e54c37ea2531
2020-10-04 23:29:27 -04:00
blade 9cc15e588a return success if cordon node by replace
Kubernetes-commit: c825e8ec16482ebbefc3ae96a26f4dcf924e750c
2019-12-12 20:20:29 +08:00
Obeyda Djeffal 6ff4f17e24 Update staging/src/k8s.io/kubectl/pkg/cmd/create/create_rolebinding_test.go
Co-authored-by: Jian Zeng <anonymousknight96@gmail.com>

Kubernetes-commit: 20da5a9d8e7d5a1290c028b9489a7ab31a0c45bb
2020-11-04 11:50:03 +01:00
Obeyda Djeffal 4507bdb448 replace string casting with fmt.sprintf in test
in: staging/src/k8s.io/kubectl/pkg/cmd/create/create_rolebinding_test.go
test: TestCreateRoleBinding

On go version 1.15.3, casting int to string using `string(int)` causes
the test to fail with this error:

>> k8s.io/kubernetes/vendor/k8s.io/kubectl/pkg/cmd/create
vendor/k8s.io/kubectl/pkg/cmd/create/create_rolebinding_test.go:75:9:
    conversion from int to string yields a string of one rune, not a
    string of digits (did you mean fmt.Sprint(x)?)
FAIL    k8s.io/kubernetes/vendor/k8s.io/kubectl/pkg/cmd/create
    [build failed]
FAIL
make: *** [Makefile:185: test] Error 1

Kubernetes-commit: 1e0bbe61ae4d4e186bc8d0991210d1613dc71996
2020-11-04 09:51:01 +01:00
David Eads 6cadd0558f add GVK to fake dynamic client to match actual behavior
Kubernetes-commit: f4383458432cd67714e9ce0acde56a2ed5c24a21
2020-10-29 15:53:34 -04:00
Lee Verberne 5ed93efa24 Remove alpha from kubectl debug
Kubernetes-commit: 30262e9b14e2369528fd27241adb16fae02f684d
2020-11-04 16:30:49 +01:00
Yixiang2019 4f04245659 cleanup: fix some error log capitalization
Signed-off-by: Yixiang2019 <wang.yixiang@zte.com.cn>

Kubernetes-commit: 62710bc0341dc413bba996351f7f6ab2313f3fa1
2020-10-28 16:44:54 +08:00
Lee Verberne fdd6fda024 kubectl debug: Allow mutating image names
Kubernetes-commit: ee9f11b95f01b32dade5d8dc7329625c40ac0e63
2020-10-30 18:23:34 +01:00
Lee Verberne 6a3c6f9a42 kubectl debug: add tests for Complete,Validate
Kubernetes-commit: 3cfcf3a74fc24e6b4b3f58710fe454d1bc3644cc
2020-10-30 08:54:13 +01:00
Jan Chaloupka 64350dbb8b Move pkg/kubectl/cmd/auth under staging/src/k8s.io/kubectl/pkg/cmd/auth
Kubernetes-commit: d3726b91e2c4c0a945151649230c41d326cf643c
2020-11-03 10:22:36 +01:00
Douglas Schilling Landgraf 56ea9621b7 kubectl: deprecate --delete-local-data
The option --delete-local-data according with users is not clear.
This patch deprecate --delete-local-data in favor of --delete-emptydir-data.

Reference:
https://github.com/kubernetes/kubernetes/issues/80228

Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>

Kubernetes-commit: 625e47aaa2769d221c59e5b9b05b4ac97212719b
2020-09-25 17:33:45 -04:00
Anderson Duboc c5f4b7e0f0 remove debug print from create quota
Kubernetes-commit: d88da2855f2d078b2a48a7dd99e1236e041b9ea1
2020-10-15 11:07:19 -03:00