Commit Graph

43 Commits

Author SHA1 Message Date
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
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 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
Yashpal Choudhary ee2d0387c2 Fix kubectl describe output format for empty annotations
Kubernetes-commit: 73a43f35f5c44e861eeb03353e372942e7e03761
2020-05-25 14:03:20 +05:30
Jordan Liggitt be12c7c870 Print and describe failed CSRs
Kubernetes-commit: 6b61cb290786688e3f994f4776f3a672c8f30fbb
2020-04-16 01:05:46 -04:00
Oleg Atamanenko 22e383f0f9 Ignore forbidden error for leases when describing node
Kubernetes-commit: 8aa0df4a74e987f8d0f67e71e2327efbdfd04814
2020-04-24 12:59:41 -07:00
Davanum Srinivas 445ad1366b switch over k/k to use klog v2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 442a69c3bdf6fe8e525b05887e57d89db1e2f3a5
2020-04-17 15:25:06 -04:00
Jan Chaloupka 50e4974848 kubectl describe: print toleration tolerating everything
An empty key with operator Exists matches all keys, values
and effects which means this will tolerate everything:
tolerations:
- operator: "Exists"

as stated in https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/.

However, the current printTolerationsMultilineWithIndent implementation ignores
this case. As the toleration is valid, there's no reason
to skip it when writing the list of all pod's tolerations.

Kubernetes-commit: 0bd9a4c6c5ba4fbbc8439effddc99004ddd6b232
2020-05-12 15:59:52 +02:00
gosoon d47103fdcc kubectl: fix the Scheduled eventTime is <unknown> when use kubectl describe pod xxx
Kubernetes-commit: 798f677aaca0b28f22c09ba6b536c84bec6f5d2f
2020-04-17 19:58:27 +08:00
zhouya0 9e97ec383e Fix kubectl describe job event test nil pointer
Kubernetes-commit: a576a3c7070c9aeb1da1878e0ca956190979f03a
2020-03-27 19:07:18 +08:00
zhouya0 ff83e52b28 Add kubectl describe CSINode test coverage
Kubernetes-commit: 991547edb6bc5d9302034fbb94b97204ea951348
2020-03-31 12:15:20 +08:00
zhouya0 6bc21dccc3 Fix kubectl describe CSINode nil pointer error
Kubernetes-commit: 55c455e61f6f1e52337e04eeb4ebd41668ffef17
2020-03-30 17:10:40 +08:00
Jordan Liggitt 0c62c9a83a client-go dynamic client: add context to callers
Kubernetes-commit: b7c2faf26c2a25427794478c6265e6d55e8acb5a
2020-03-06 10:17:41 -05:00
zhouya0 3422a4e85e Show kubectl describe ingress error
Kubernetes-commit: 773b890b059ffe9956c8de4b7f0214b802888390
2020-03-02 16:08:17 +08:00
Maciej Szulik e034e09126 Squash pkg/describe/versioned/ into pkg/describe/
Kubernetes-commit: 02cd65d7bb5e4aea84a4f466186bcbbe604c4b27
2020-03-03 13:06:26 +01:00