Commit Graph

119 Commits

Author SHA1 Message Date
TommyStarK e88f1b3589 kubectl: use bytes.Buffer.String
Signed-off-by: TommyStarK <thomasmilox@gmail.com>

Kubernetes-commit: da4a8d831b933475cfdb20cb7e6d0ed027d516eb
2023-06-04 15:45:24 +02:00
Stephen Kitt cfd2169f88 cli: replace intstr.FromInt with intstr.FromInt32
This touches cases where FromInt() is used on numeric constants, or
values which are already int32s, or int variables which are defined
close by and can be changed to int32s with little impact.

Signed-off-by: Stephen Kitt <skitt@redhat.com>

Kubernetes-commit: 45836971f27ca70cd7742e8ee66e99e3c648cf9f
2023-03-14 16:17:48 +01:00
Vihang Mehta d3fd4ea37b Sort and limit to the describers the return (string, error)
Signed-off-by: Vihang Mehta <vihang@pixielabs.ai>

Kubernetes-commit: 885f3d7a7dfe4eb09bef86bbeb49499ec3ff2bae
2023-05-17 16:36:46 +00:00
Vihang Mehta 6f146fb23f Add all describers to the exported DefaultObjectDescriber
Signed-off-by: Vihang Mehta <vihang@pixielabs.ai>

Kubernetes-commit: 2cb215e1091fb50a152afca3a8b2166d47f996ee
2023-05-05 18:30:54 +00:00
Antonio Ojea 9be7ad1c53 kubectl describe IPAddress
Change-Id: I201c2980830058c92b66e2386bfe8bedd8f0dcd4

Kubernetes-commit: 53dbf1752b070dcfe11399b3dd874fa8616851b3
2023-01-02 15:27:05 +00:00
Abirdcfly 7f0aa8954b cleanup kubectl describe cronjob v1beta1
Signed-off-by: Abirdcfly <fp544037857@gmail.com>

Kubernetes-commit: a120e7380559e4e03f7bd65f011affeb45739f12
2022-07-05 13:24:21 +08:00
Amir Alavi 749342438f kubectl: use v2 for hpa
Signed-off-by: Amir Alavi <amiralavi7@gmail.com>

Kubernetes-commit: 69b853fa308cb7cb40486a733626d4344ab1be85
2023-01-06 23:45:54 -05:00
Paco Xu b41317e383 kubectl: remove psp support
Kubernetes-commit: cc0f8280586637f25b91b471d0c6fe19caa73a24
2022-11-02 21:03:09 +08:00
Maciej Szulik 7aa8d2b1a2 Skip .metadata.manageFields when describing unkown resources
Kubernetes-commit: 8e3e3479d98391398e1e26090ad9d1e267bec885
2022-12-19 17:31:30 +01:00
George Aristy d592485b4b fix OldReplicaSets
Kubernetes-commit: a4c6696c456819e58e6215c95b6ece17819a5751
2022-10-15 21:00:45 -04:00
William, Yeh 729f491d6f kubectl displays seccomp profile for pod and container
Kubernetes-commit: a4dac224e7ef5d4c1a50b5c6a5f89c39f3115381
2022-10-23 21:53:05 -04:00
Jan Safranek 50d5d1244a Revert "Remove references to openstack and cinder"
This reverts commit 9bbf01bae93600d3314bce0acbff1f3a0a42e74b.

Kubernetes-commit: 5b284a50b78cb7d68b12825f5c0cfa29503c1577
2022-11-10 18:22:07 +01:00
Wenqing Luo 6a7dccd04b Fix kubectl describe ingress when default backend is empty
Kubernetes-commit: 653edeb507c3caafd0e81f6cef0a44425ef8782c
2022-11-07 10:11:28 -06:00
Tim Hockin 72d1b20cad Copy LoadBalancerStatus from core to networking
This type should never have been shared between Service and Ingress.
The `ports` field is unfortunate, but it is needed to stay compatible.

Kubernetes-commit: 0153bfad16102e42d0b0dbb56742d0a6626e4180
2021-11-08 17:06:59 -08:00
David Leadbeater 8e2918ab8b Escape terminal special characters in kubectl (#112553)
* Escape terminal special characters in kubectl

* Add escaping for kubectl alpha events

Kubernetes-commit: dad0e937c0f76344363eb691b2668490ffef8537
2022-10-30 16:29:24 +00:00
Davanum Srinivas 07a930403b Remove references to openstack and cinder
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 9bbf01bae93600d3314bce0acbff1f3a0a42e74b
2022-08-08 16:01:59 -04:00
Sarvesh Rangnekar 4cb46af560 Add describer and printer for ClusterCIDR API
Kubernetes-commit: 0ee3719d0b8cf56a9a7bc03ce1f91fc9510bc6d8
2022-07-30 00:25:57 +00:00
Davanum Srinivas d3700ce217 Generate and format files
- Run hack/update-codegen.sh
- Run hack/update-generated-device-plugin.sh
- Run hack/update-generated-protobuf.sh
- Run hack/update-generated-runtime.sh
- Run hack/update-generated-swagger-docs.sh
- Run hack/update-openapi-spec.sh
- Run hack/update-gofmt.sh

Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: a9593d634c6a053848413e600dadbf974627515f
2022-07-19 20:54:13 -04:00
Aufar Gilbran 720bd528ea Print ServiceAccount attached to the Pod
Kubernetes-commit: b938cdabd068a82ec78984c3ea72161da76f8284
2022-07-16 16:57:38 +08:00
R0CKSTAR 7557a35bb2 Resolve review comments
Signed-off-by: R0CKSTAR <yeahdongcn@gmail.com>

Kubernetes-commit: d9294dfff752636febcd9401696845c01a80c5f0
2022-07-13 08:44:07 +08:00
R0CKSTAR 443618def5 Add unit test - TestDescribePodRuntimeClass
Signed-off-by: R0CKSTAR <yeahdongcn@gmail.com>

Kubernetes-commit: b8ecf6fbfeab3f59f5bf3942f713c699501e8b60
2022-07-12 09:34:04 +08:00
R0CKSTAR d256c1b5ec Resolve review comments
Signed-off-by: R0CKSTAR <yeahdongcn@gmail.com>

Kubernetes-commit: fa9f2c409a7bea802048ea06e2266f13ff218e1d
2022-07-06 11:11:53 +08:00
R0CKSTAR 56244ad029 Print pod.Spec.RuntimeClassName in kubectl describe
Signed-off-by: R0CKSTAR <yeahdongcn@gmail.com>

Kubernetes-commit: ae31c0423f08e514a6bccca19d88afbff07f8d65
2022-07-01 16:24:37 +08:00
Arda Güçlü 02b163261f Show topologySpreadConstraints in Describe command
Currently describe command does not show `topologySpreadConstraints`
field. This PR adds support for showing topologySpreadConstraints in
describe command.For simplicity, if this field is not set, it will not show
(unlike to other core fields whose are shown as `<none>` even if they are null).

Kubernetes-commit: 64ce73f5fe2f095ba751d78aa03cf48bca42c055
2022-04-20 15:37:02 +03:00
Mayank Kumar 884f866fd0 add maxunavailable to kubectl describe
Kubernetes-commit: c352fa514655bd154e69734e365477e753fa3409
2022-04-01 20:25:36 -07:00
James Laverack 03614470e1 Revert "Introduce APIs to support multiple ClusterCIDRs (#108290)"
This reverts commit b9792a9daef4d978c5c30b6d10cbcdfa77a9b6ac.

Kubernetes-commit: 7d57d5c70d04f652b431d2b86b8af40e119cd66a
2022-04-12 16:00:35 +01:00
Sarvesh Rangnekar f0ce177e80 Introduce APIs to support multiple ClusterCIDRs (#108290)
* Introduce networking/v1alpha1 api, ClusterCIDRConfig type

Introduce networking/v1alpha1 api group.

Add `ClusterCIDRConfig` type to networking/v1alpha1 api group, this type
will enable the NodeIPAM controller to support multiple ClusterCIDRs.

* Change ClusterCIDRConfig.NodeSelector type in api

* Fix review comments for API

* Update ClusterCIDRConfig API Spec

Introduce PerNodeHostBits field, remove PerNodeMaskSize

Kubernetes-commit: b9792a9daef4d978c5c30b6d10cbcdfa77a9b6ac
2022-03-31 06:17:21 +00:00
aimuz 062618c2be fix Kubectl describe node missing event
Kubectl describe node ignores the node events created by the controller
https://github.com/kubernetes/kubernetes/issues/106475

Kubernetes-commit: 8baac2ec951eba0669436d382752bfb3a38ff454
2021-11-17 16:24:26 +08:00
Alex Wang c66b6b69fa support preemptionPolicy in describe
Kubernetes-commit: 8ae182fff2ba0ce1543083b13a16ca37846de9da
2022-03-15 17:52:15 +08:00
jlsong01 7891f75f9e fix kubectl describe ingress shows default-backend:80 when no default backend
Kubernetes-commit: 75c139d567a193ec50aee5447546cacf4dfaf61d
2022-03-04 09:35:20 +08:00
Wojciech Tyczyński 3f11f31017 Stop setting selfLink in kubectl
Kubernetes-commit: 9015f27e6d8295d7dcdbf5915024f28cc00d4d2f
2022-02-16 17:13:54 +01:00
Marcus Puckett 3825e98528 Specify empty IngresClassName as <none> to more clearly specify it is empty
Kubernetes-commit: e7e2bfde16381dc9ae543123ebbe1da8c12ee8e4
2022-02-09 16:28:16 -08:00
Marcus Puckett cfc56a9d2c Update tests to account for new describe line for IngressClassName
Kubernetes-commit: 8b541910c0565781992065df779815519cffb362
2022-02-02 11:16:58 -08:00
Marcus Puckett 97f6de2e3a Add line to describe output for IngressClassName
Kubernetes-commit: cfacaf086a70a9513826cb4b5194412e61be477b
2022-02-02 11:16:39 -08:00
Marcus Puckett 23ee230608 Remove annoying sprintf warning
Kubernetes-commit: 517a0b0818e35a4b85fabd171f510da5b4e42549
2022-02-02 11:06:05 -08:00
Sergey Kanzhelev 8f510212ee Merge pull request #106463 from SergeyKanzhelev/grpcProbe
Implement grpc probe action

Kubernetes-commit: e4952f32b79b69bfa9333ff9da26a2da13859148
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-12-02 20:40:51 -05:00
Antonio Ojea 476fa148b6 fix ineffectual assignment to i (ineffassign)
Kubernetes-commit: b2971e74970f241e138c93f5e755aa2980ab13ed
2021-11-16 18:08:27 +01:00
Daniel Lipovetsky 8e82388f5f Include Conditions in `kubectl describe namespace`
If a namespace deletion is blocked, finding the reason why can require
reading the Conditions on the namespace.

Currently, `kubectl describe namespace` does not include Conditions.
This change adds Conditions to the output. Example output:

```
Name:         example
Labels:       <none>
Annotations:  <none>
Status:	      Terminating
Conditions:
  Type                             Status  LastTransitionTime               Reason          Message
  ----                             ------  ------------------               ------          -------
  NamespaceDeletionContentFailure  True    Wed, 15 Jan 2014 00:00:00 +0000  example reason  example message

No resource quota.

No LimitRange resource.
```

Kubernetes-commit: eb6e8ce00a39c1c98146f3341f4336b90757ab13
2021-11-07 21:39:56 -08:00
卢振兴10069964 165827de9c code cleanup for kubectl
Kubernetes-commit: 17993020cdca7eea2fb96a993e048d2d0624fa40
2021-04-12 10:45:08 +08:00
Aldo Culquicondor def56a58a5 Add ready field to Job status
to keep a count of the pods that have the ready condition.

Also:
- Add feature gate JobReadyPods.
- Add Ready to describe.

Change-Id: Ib934730a430a8e2a2f485671e345fe2330006939

Kubernetes-commit: 1bff5eb44d9897e12aff3ea10f5a856580158278
2021-09-08 14:31:59 -04:00
Harjas 809211b6c8 kubectl: Use fields from event series when computing describe events for a object (#104482)
* take into account new fields for event

* add event with old event fields for test

* fix: remove unnecessary "+1" from event series count

* fix: update the assertion for failing test case

Kubernetes-commit: c6935ad50e0809c1dc2d3ac9000abda0ecb49bcc
2021-09-14 00:18:50 +00:00
kabab 3e3ae2747f kubectl: Add labels to ingress describe
Kubernetes-commit: 2ad2bc6844318034dd3296a0b0d5a7ce97e51962
2021-07-24 22:56:36 +02:00
atiratree 1c26c91ee7 kubectl: show consistent unit format in quota describe
API returns unit format in a non deterministic manner; ie it
chooses a unit format according to a resource that gets counted first

Kubernetes-commit: 3f0b64ec9597488be6365f89cc82338bcb7a9feb
2021-05-20 15:36:04 +02:00
Monis Khan 82734c256a csr: add expirationSeconds field to control cert lifetime
This change updates the CSR API to add a new, optional field called
expirationSeconds.  This field is a request to the signer for the
maximum duration the client wishes the cert to have.  The signer is
free to ignore this request based on its own internal policy.  The
signers built-in to KCM will honor this field if it is not set to a
value greater than --cluster-signing-duration.  The minimum allowed
value for this field is 600 seconds (ten minutes).

This change will help enforce safer durations for certificates in
the Kube ecosystem and will help related projects such as
cert-manager with their migration to the Kube CSR API.

Future enhancements may update the Kubelet to take advantage of this
field when it is configured in a way that can tolerate shorter
certificate lifespans with regular rotation.

Signed-off-by: Monis Khan <mok@vmware.com>

Kubernetes-commit: cd91e59f7c351fce47c064a5162c2cb79075159c
2021-06-25 22:08:10 -04:00
Chok Yip Lau 16d54ee18b Added BinaryData description to kubectl describe
Kubernetes-commit: cc28c6dba4d703f3ced1cb32394597252483b8bb
2021-03-25 16:54:44 -04:00
Quan Tian a78d4d9ab3 Fix EndpointSlice describe panic when an Endpoint doesn't have zone
Kubernetes-commit: 67494b169413c74c116cf4c238c266810729247a
2021-04-12 18:15:16 +08:00
Katrina Verey 2a8c1d4c6f Clean up kinds removed from extensionv1beta in 1.16
Kubernetes-commit: 8c1a86a272dfd25418be5c7995eba0985b3df34e
2021-04-23 12:10:42 -07:00
Katrina Verey 866947d076 Add correct GV for PSP describer
Kubernetes-commit: 11c1d77660d7f232389b1badc1abc4efff9685d7
2021-04-20 11:25:04 -07:00
Katrina Verey c31d6154d6 Add --chunk-size support to kubectl describe
Kubernetes-commit: 8ad6fd6ddbf6a8e0f2cdca17583af38cf30c2bb2
2021-04-20 11:24:35 -07:00
Aldo Culquicondor 0fb45f1128 Fix Job describe for completion mode
Kubernetes-commit: 2fd8dd1724e4d8a2740c834ae971cf876f2fd2a3
2021-04-15 21:15:09 +00:00