Commit Graph

96 Commits

Author SHA1 Message Date
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
Chok Yip Lau c2974ae03d Fixed describe ingress causing SEGFAULT
Kubernetes-commit: 12f8468fe03291a1da0803b9e5375ec079abd6e6
2021-03-23 18:21:20 -04:00
Aldo Culquicondor eb94c78123 Only default Job fields when feature gates are enabled
Also use pointer for completionMode enum

Kubernetes-commit: e6c3d7b34dff0324adb80591c00519b6f6a4a2e1
2021-03-12 17:26:40 +00:00
Patrick Ohly 5274b1e590 generic ephemeral volumes: drop ReadOnly field
As discussed during the alpha review, the ReadOnly field is not really
needed because volume mounts can also be read-only. It's a historical
oddity that can be avoided for generic ephemeral volumes as part
of the promotion to beta.

Kubernetes-commit: 555d4a12bf58f19cbd79f866e2abce13490bde40
2021-03-03 17:16:13 +01:00
Jordan Liggitt 9967facf23 kubectl describe policy/v1 PodDisruptionBudget
Kubernetes-commit: 7956a9239ab6e28b5260340aeae5f3e6b1b94a36
2021-03-09 10:56:48 -05:00
Maciej Szulik 69bc307556 Fix batch/v1 CronJob support in create, describe and polymorphichelpers
Kubernetes-commit: a68582d6086ffc8608779b0459de8d387042eed1
2021-03-09 09:44:02 +01:00
bl-ue 91c5000b38 Fix case of Age column in kubectl describe node
Kubernetes-commit: df1955208b9a1950b79630b2fe88376452d70e02
2020-11-30 14:06:34 -05:00
Swetha Repakula 691cc30112 Add v1 describers for EndpointSlice
Kubernetes-commit: ba34956dd6bb348e5ba83580c6864001316cd67c
2021-03-08 13:32:26 -08:00
Harry Bagdi 62d08a495c Add namespace scoped ParametersReference to IngressClass
Kubernetes-commit: a7fc92089a42aff0c2f10d56b0ee290440adfbc4
2021-03-06 03:03:20 +05:30
Aldo Culquicondor 3af483b7e4 Add Job.spec.completionMode and Job.status.completedIndexes
And IndexedJob feature gate, disabled by default.
Update JobDescriber

Kubernetes-commit: a1a5868a5ae8c18df39b386d2424ff04c89826fb
2020-12-30 11:42:01 -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
Hidetatsu Yaginuma 0668abe1cd fix invalid indentation
Kubernetes-commit: f00f114ecaca6065be0cbc4c16c670370e202b1a
2021-01-12 13:02:52 +09:00
shahra 1588007e10 Change pvc describe test
Kubernetes-commit: ff6711140a2319faee57580143a504a3e5adfbf0
2020-10-26 10:49:48 -07:00
shahra 7342d00241 Alter wording to describe pods using a pvc
Kubernetes-commit: bcff03f7d21305a613c7cbfde3143daf6a1d8546
2020-10-14 20:53:10 -07:00
Khaled Henidak (Kal) 2bf7244939 dual stack services (#91824)
* api: structure change

* api: defaulting, conversion, and validation

* [FIX] validation: auto remove second ip/family when service changes to SingleStack

* [FIX] api: defaulting, conversion, and validation

* api-server: clusterIPs alloc, printers, storage and strategy

* [FIX] clusterIPs default on read

* alloc: auto remove second ip/family when service changes to SingleStack

* api-server: repair loop handling for clusterIPs

* api-server: force kubernetes default service into single stack

* api-server: tie dualstack feature flag with endpoint feature flag

* controller-manager: feature flag, endpoint, and endpointSlice controllers handling multi family service

* [FIX] controller-manager: feature flag, endpoint, and endpointSlicecontrollers handling multi family service

* kube-proxy: feature-flag, utils, proxier, and meta proxier

* [FIX] kubeproxy: call both proxier at the same time

* kubenet: remove forced pod IP sorting

* kubectl: modify describe to include ClusterIPs, IPFamilies, and IPFamilyPolicy

* e2e: fix tests that depends on IPFamily field AND add dual stack tests

* e2e: fix expected error message for ClusterIP immutability

* add integration tests for dualstack

the third phase of dual stack is a very complex change in the API,
basically it introduces Dual Stack services. Main changes are:

- It pluralizes the Service IPFamily field to IPFamilies,
and removes the singular field.
- It introduces a new field IPFamilyPolicyType that can take
3 values to express the "dual-stack(mad)ness" of the cluster:
SingleStack, PreferDualStack and RequireDualStack
- It pluralizes ClusterIP to ClusterIPs.

The goal is to add coverage to the services API operations,
taking into account the 6 different modes a cluster can have:

- single stack: IP4 or IPv6 (as of today)
- dual stack: IPv4 only, IPv6 only, IPv4 - IPv6, IPv6 - IPv4

* [FIX] add integration tests for dualstack

* generated data

* generated files

Co-authored-by: Antonio Ojea <aojea@redhat.com>

Kubernetes-commit: 6675eba3eff1c8e565c4060a9c1396f75da7cc3e
2020-10-26 20:46:34 +00:00
Arjun Naik b8a1016326 Added functionality and API for pod autoscaling based on container resources
Signed-off-by: Arjun Naik <anaik@redhat.com>

Kubernetes-commit: 0fec7b0f7e2dfd4b0c6c57e086472546f6c69efa
2020-10-21 11:29:17 +02:00
Quan Tian 81f5e57cae kubectl: add a space between effect and operator when printing tolerations
Empty key and non-empty effect means to match all keys and values and
the specified effect. However "kubectl describe" prints it without space
between effect and operator. This patch adds the space for this case.

Kubernetes-commit: 04185f4e533b9b8ebaabe1ed09516e85c5ed1ae1
2020-09-21 23:45:31 +08:00
John Howard 5a3ba07822 Fix `kubectl describe ingress` format
Fixes https://github.com/kubernetes/kubernetes/issues/94980

Fixes two formatting issues:
* Un-opened parenthesis (`10.244.0.6:8080)`)
* Bad format string and spacing

Before this PR:
```
Name:             example-ingress
Namespace:        default
Address:
Default backend:  istio-ingressgateway:80 (<error: endpoints "istio-ingressgateway" not found>)
Rules:
  Host                                                                                                      Path  Backends
  ----                                                                                                      ----  --------
                                                                                                            * *
%!(EXTRA string=istio-ingressgateway:80 (<error: endpoints "istio-ingressgateway" not found>))Annotations:  <none>
Events:                                                                                                     <none>
```

After this PR:
```
Name:             example-ingress
Namespace:        default
Address:
Default backend:  istio-ingressgateway:80 (<error: endpoints "istio-ingressgateway" not found>)
Rules:
  Host        Path  Backends
  ----        ----  --------
  *           *     istio-ingressgateway:80 (<error: endpoints "istio-ingressgateway" not found>)
Annotations:  <none>
Events:       <none>
```

Compare to an old kubectl without the bug:
```
Name:             example-ingress
Namespace:        default
Address:
Default backend:  istio-ingressgateway:80 (<none>)
Rules:
  Host  Path  Backends
  ----  ----  --------
  *     *     istio-ingressgateway:80 (<none>)
Annotations:
  kubectl.kubernetes.io/last-applied-configuration: ...

Events:  <none>
```

Kubernetes-commit: 9a0b9138aff179e601f854c70271a50842742b12
2020-09-22 13:29:11 -07:00
Jan Chaloupka 81135b09fa kubectl describe pod: use ReportingController as an event source
With https://github.com/kubernetes/kubernetes/pull/91645 merged (promotion of v1beta1 events to v1),
it's no longer permitted to set Source field.
Based on https://stupefied-goodall-e282f7.netlify.app/contributors/design-proposals/instrumentation/events-redesign/#backward-compatibility
Source.Component is supposed to be replaced by ReportingController.
Source.Host is supposed to be replaced by DeprecatedHost, though DeprecatedHost
was never implemented. Thus, ignoring the second field.

Kubernetes-commit: 71edf075de3ea0e26aa40f06f1670862aaebcf33
2020-08-04 18:10:34 +02:00
jingxueli 1cf6fb3a8f add line break when describe hpa
Kubernetes-commit: 1bfd6ed6ec7478038fd3dd9839ac7e7a3bab46fb
2020-06-18 20:40:54 +08:00
Abhishek Raut 05cb9b1f24 Fix NetworkPolicy describe for egress-all policies
NetworkPolicy egress-all `kubectl describe` output should refer
to the term "destination" as opposed to "source" for describing
policies which do not restrict traffic based on the destination.

Kubernetes-commit: e0caf0b46f061c3fafa10aef83592fe300f2bf52
2020-07-15 18:58:25 -07:00
Patrick Ohly 953fac2d9a GenericEphemeralVolume: kubectl describe
This reuses the code for describing a PVC, except that the output gets
indented more and some fields are skipped.

Kubernetes-commit: c1178bd925b54898e66cace37d35bf551380a75b
2020-07-03 12:09:34 +02:00
Christopher M. Luciano c87f320efb ingress: Add v1 describers for Ingress and IngressClass
Ingressv1 Get is attempted for Ingresses and IngressClasses
and falls back to Ingressv1beta1 if there is a failure.

Signed-off-by: Christopher M. Luciano <cmluciano@us.ibm.com>

Kubernetes-commit: 31520ccb9b9a96acc4721b69ae231a6cbb74a503
2020-05-19 16:34:34 -04:00
Jordan Liggitt cd341c1697 Add v1 CSR support to kubectl describe
Kubernetes-commit: 92a665e83f223425608e38286fdf147acb85112d
2020-06-04 12:05:51 -04:00