Commit Graph

52 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
bf454d7c59 Merge pull request #124516 from danwinship/cloud-hostname-override
Fix behavior with external cloud provider and --hostname-override
2024-04-25 14:47:24 -07:00
Dan Winship
30972710bd Fix behavior with external cloud provider and --hostname-override 2024-04-25 08:12:04 -04:00
Marek Siarkowicz
3ee8178768 Cleanup defer from SetFeatureGateDuringTest function call 2024-04-24 20:25:29 +02:00
carlory
0c5a7103be remove VolumePluginWithAttachLimits interface 2024-03-18 18:08:36 +08:00
Tim Allclair
24537a9131 Stop appending AppArmor status to node ready condition 2024-03-05 12:22:50 -08:00
HirazawaUi
2c2fa2107a deprecate the kubeProxyVersion field of v1.Node 2023-10-29 15:04:11 +08:00
Antonio Ojea
3ee2f27e5b kubelet: cloud-provider external addresses
Kubelet, if using cloud provider external, initializes temporary
the node addresses using the non-cloud provider logic, until the
cloud provider overrides it.

This behavior has undesired consequences if the cloud-provider addresses
are different than the original ones, specially for hostNetwork pods,
that inherit these addresses from the Node.

Since some cloud-providers depend on this behavior, in order to keep
backward compatibility, assume that the specifying addresses via
the node-ip flags means that the intent is to keep the existing
behavior to temporary initialize the addresses.

If the node-ips are the unspecified addresses or are not set, then
wait for the external cloud provider to set the node addresses.

Change-Id: I3a3895f9b830769f9658e6a03f058c914c438a09
Signed-off-by: Antonio Ojea <aojea@google.com>
2023-10-06 14:01:28 +00:00
Dan Winship
a6c7f63b18 Set the node-ips annotation correctly with CloudDualStackNodeIPs 2023-06-01 07:20:17 -04:00
Tim Hockin
29c0b73d64 Replace uses of diff.ObjectDiff with cmp.Diff
ObjectDiff is already a shim over cmp.Diff, so no actual output or
behavior changes
2023-04-12 08:46:12 -07:00
TommyStarK
a00221ee50 kubelet/nodestatus: Improving test coverage
Signed-off-by: TommyStarK <thomasmilox@gmail.com>
2022-12-18 23:19:47 +01:00
David Ashpole
64af1adace Second attempt: Plumb context to Kubelet CRI calls (#113591)
* plumb context from CRI calls through kubelet

* clean up extra timeouts

* try fixing incorrectly cancelled context
2022-11-05 06:02:13 -07:00
Antonio Ojea
9c2b333925 Revert "plumb context from CRI calls through kubelet"
This reverts commit f43b4f1b95.
2022-11-02 13:37:23 +00:00
David Ashpole
f43b4f1b95 plumb context from CRI calls through kubelet 2022-10-28 02:55:28 +00:00
Dan Winship
e23f1a68af Delete the cloud node IP annotation if it is stale
If you run "kubelet --cloud-provider X --node-ip Y", kubelet will set
an annotation on the node, but previously, if you then ran just
"kubelet --cloud-provider X" (or just "kubelet --node-ip Y"), it
wouldn't delete the stale annotation. Fix that.
2022-09-01 16:43:18 -04:00
jinxu
0064010cdd Promote Local storage capacity isolation feature to GA
This change is to promote local storage capacity isolation feature to GA

At the same time, to allow rootless system disable this feature due to
unable to get root fs, this change introduced a new kubelet config
"localStorageCapacityIsolation". By default it is set to true. For
rootless systems, they can set this configuration to false to disable
the feature. Once it is set, user cannot set ephemeral-storage
request/limit because capacity and allocatable will not be set.

Change-Id: I48a52e737c6a09e9131454db6ad31247b56c000a
2022-08-02 23:45:48 -07:00
Kubernetes Prow Robot
21149f1b68 Merge pull request #109794 from shiftstack/always_annotate_nodeip
Make kubelet set alpha.kubernetes.io/provided-node-ip unconditionally
2022-07-14 14:36:40 -07:00
Matthew Booth
0f41aaf138 Make kubelet set alpha.kubernetes.io/provided-node-ip unconditionally 2022-06-21 10:37:34 +01:00
Davanum Srinivas
50bea1dad8 Move from k8s.gcr.io to registry.k8s.io
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-05-31 10:16:53 -04:00
Jyoti Mahapatra
0e0abd602f parse ipv6 address before comparison (#107736)
* parse ipv6 address before comparison

Signed-off-by: Jyoti Mahapatra <jyotima@amazon.com>

* use parse sloppy

Signed-off-by: Jyoti Mahapatra <jyotima@amazon.com>

* use parse sloppy

Signed-off-by: Jyoti Mahapatra <jyotima@amazon.com>

* use node address from cloudprovider as is

Signed-off-by: Jyoti Mahapatra <jyotima@amazon.com>
2022-01-26 18:38:49 -08:00
Antonio Ojea
0cd75e8fec run hack/update-netparse-cve.sh 2021-08-20 10:42:09 +02:00
David Porter
16f71c6d47 Implement shutdown manager in kubelet
Implements KEP 2000, Graceful Node Shutdown:
https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/2000-graceful-node-shutdown

* Add new FeatureGate `GracefulNodeShutdown` to control
enabling/disabling the feature
* Add two new KubeletConfiguration options
  * `ShutdownGracePeriod` and `ShutdownGracePeriodCriticalPods`
* Add new package, `nodeshutdown` that implements the Node shutdown
manager
  * The node shutdown manager uses the systemd inhibit package, to
  create an system inhibitor, monitor for node shutdown events, and
  gracefully terminate pods upon a node shutdown.
2020-11-12 21:47:55 +00:00
Dan Winship
75242fce7a kubelet: allow specifying dual-stack node IPs on bare metal
Discussion is ongoing about how to best handle dual-stack with clouds
and autodetected IPs, but there is at least agreement that people on
bare metal ought to be able to specify two explicit IPs on dual-stack
hosts, so allow that.
2020-10-07 17:25:54 -04:00
Dan Winship
2680095414 kubelet: Remove unnecessary sorting in NodeAddress tests
Several of the tests in TestNodeAddress() were no-ops because the test
code was only testing that NodeAddresses() returned all of the
expected addresses, but not testing that it was returning them in the
correct order.

The order that NodeAddresses() returns addresses in is very important,
so fix the tests to actually test it.

One existing test ("NodeIP is external") had its expectedAddresses in
the wrong order, but it seems clear from the name of the test that
this isn't actually what it expected.

Also, previously testKubeletHostname was "127.0.0.1" which ended up
interacting weirdly with the IPv4-vs-IPv6 sorting code in a way that
made some of the test results confusing if you didn't realize that
testKubeletHostname was an IPv4 address. Fix that by making it an
actual hostname instead, which then preserves the expected sorting.
2020-10-07 17:25:25 -04:00
Dan Winship
ce68edf700 Allow "kubelet --node-ip ::" to mean prefer IPv6 2020-01-07 07:53:21 -05:00
Han Kang
866ea74326 remove pkg/version and some of redundant copies of it
Change-Id: Ia58367c1b1274bfb49c8a4784051463abaf795de
2019-09-16 16:24:35 -07:00
David Zhu
f15cc60957 Update golang scientific notation using hack/update-gofmt.sh 2019-09-12 18:05:49 -07:00
Kubernetes Prow Robot
a3488b4cee Merge pull request #81206 from tallclair/staticcheck-kubelet-push
Cleanup Kubelet static analysis issues
2019-08-22 15:09:43 -07:00
Kubernetes Prow Robot
ebf15029da Merge pull request #80003 from wongma7/cloudprovider-authoritative-hostname
Fix cloud reported hostname being overridden if nodeIP set
2019-08-21 20:50:32 -07:00
Matthew Wong
fc28045220 Fix cloud reported hostname being overridden if nodeIP set 2019-08-21 19:07:12 -07:00
Tim Allclair
8a495cb5e4 Clean up error messages (ST1005) 2019-08-21 10:40:21 -07:00
Kubernetes Prow Robot
e8559f7565 Merge pull request #75229 from andrewsykim/kubelet-node-address-external
kubelet: lookup node address for external provider if none is set
2019-08-01 08:16:16 -07:00
Pingan2017
e94d7b3802 clean up redundant conditiontype OutOfDisk 2019-07-03 14:34:52 +08:00
Andrew Sy Kim
0d8861114d kubelet: lookup node address for external provider if none is set
Signed-off-by: Andrew Sy Kim <kiman@vmware.com>
2019-05-17 11:06:38 -04:00
Mike Crute
7d62316f8f Migrate fake cloud provider to staging 2019-05-14 13:32:18 -07:00
David Zhu
34d9ee5b9b Add CSINode initialization for CSIMigration on node startup before pod ready 2019-03-07 14:47:38 -08:00
Kubernetes Prow Robot
cb09d4d317 Merge pull request #72507 from dixudx/remove_stale_OutOfDisk
remove stale OutOfDisk condition from kubelet side
2019-01-18 19:14:04 -08:00
Kubernetes Prow Robot
56e88f5b47 Merge pull request #70805 from danwinship/cloud-node-ip
Fix a CloudProvider-vs-nodeIP edge case
2019-01-16 09:04:54 -08:00
gaorong
545aca3d18 fix some typos 2019-01-08 12:46:05 +08:00
Di Xu
e1a854b839 remove stale OutOfDisk condition from kubelet side 2019-01-06 21:37:52 +08:00
Dan Winship
863c6ca241 Fix a CloudProvider-vs-nodeIP edge case 2018-11-08 10:34:00 -05:00
Christoph Blecker
97b2992dc1 Update gofmt for go1.11 2018-10-05 12:59:38 -07:00
Jordan Liggitt
2857de73ce Honor --hostname-override, report compatible hostname addresses with cloud provider 2018-08-28 11:21:01 -04:00
Michael Taufen
0170826542 port setVolumeLimits to Setter abstraction, add test 2018-07-16 09:09:48 -07:00
Michael Taufen
8e217f7102 port setNodeStatusImages to Setter abstraction, add test 2018-07-16 09:09:47 -07:00
Michael Taufen
59bb21051e port setNodeStatusVersionInfo to Setter abstraction, add test 2018-07-16 09:09:47 -07:00
Michael Taufen
596fa89af0 port setNodeStatusMachineInfo to Setter abstraction, add test 2018-07-16 09:09:47 -07:00
Michael Taufen
2df7e1ad5c port setNodeVolumesInUseStatus to Setter abstraction, add test 2018-07-16 09:09:47 -07:00
Michael Taufen
3e03e0611e port setNodeReadyCondition to Setter abstraction, add test 2018-07-16 09:09:47 -07:00
Michael Taufen
e0b6ae219f port setNodePIDPressureCondition to Setter abstraction, add test 2018-07-16 09:09:47 -07:00
Michael Taufen
b26e4dfa7f port setNodeDiskPressureCondition to Setter abstraction, add test 2018-07-16 09:09:47 -07:00