Commit Graph

88223 Commits

Author SHA1 Message Date
nolancon
a9c6129577 Device Manager - Update unit tests
- Pass container to Allocate().
- Loop through containers to call Allocate() on container by container
basis.
2020-02-27 07:24:34 +00:00
nolancon
cb9fdc49db Device Manager - Refactor allocatePodResources
- allocatePodResources logic altered to allow for container by container
device allocation.
- New type PodReusableDevices
- New field in devicemanager devicesToReuse
2020-02-27 07:24:34 +00:00
nolancon
0a9bd0334d CPU Manager - Updates to unit tests:
- Where previously we called manager.AddContainer(), we now call both
manager.Allocate() and manager.AddContainer().
- Some test cases now have two expected errors. One each
from Allocate() and AddContainer(). Existing outcomes are unchanged.
2020-02-27 07:24:34 +00:00
nolancon
467f66580b CPU Manager - Add check to policy.Allocate() for init conatiners
If container allocated CPUs is an init container, release those CPUs
back into the shared pool for re-allocation to next container.
2020-02-27 07:24:33 +00:00
nolancon
709989efa2 CPU Manager - Rename policy.AddContainer() to policy.Allocate() 2020-02-27 07:24:33 +00:00
Kevin Klues
0d68bffd03 Change GetTopologyPodAdmitHandler() to be more general
GetTopologyPodAdmitHandler() now returns a lifecycle.PodAdmitHandler
type instead of the TopologyManager directly. The handler it returns
is generally responsible for attempting to allocate any resources that
require a pod admission check. When the TopologyManager feature gate
is on, this comes directly from the TopologyManager. When it is off,
we simply attempt the allocations ourselves and fail the admission
on an unexpected error. The higher level kubelet.go feature gate
check will be removed in an upcoming PR.
2020-02-27 07:24:26 +00:00
Kevin Klues
0b168f0243 Change devicemanager to implement HintProvider.Allocate()
This change will not work on its own. Higher level code needs to make
sure and call Allocate() before AddContainer is called. This is already
being done in cases when the TopologyManager feature gate is enabled (in
the PodAdmitHandler of the TopologyManager). However, we need to make
sure we add proper logic to call it in cases when the TopologyManager
feature gate is disabled.
2020-02-10 03:27:47 +00:00
Kevin Klues
91f91858a5 Change CPUManager to implement HintProvider.Allocate()
This change will not work on its own. Higher level code needs to make
sure and call Allocate() before AddContainer is called. This is already
being done in cases when the TopologyManager feature gate is enabled (in
the PodAdmitHandler of the TopologyManager). However, we need to make
sure we add proper logic to call it in cases when the TopologyManager
feature gate is disabled.
2020-02-10 03:27:47 +00:00
Kevin Klues
9e4ee5ecc3 Add Allocate() call to TopologyManager's HintProvider interface
Having this interface allows us to perform a tight loop of:

    for each container {
        containerHints = {}
        for each provider {
	    containerHints[provider] = provider.GatherHints(container)
        }

        containerHints.MergeAndPublish()

        for each provider {
	    provider.Allocate(container)
        }
    }

With this in place we can now be sure that the hints gathered in one
iteration of the loop always consider the allocations made in the
previous.
2020-02-10 03:27:47 +00:00
Kevin Klues
a3f099ea4d Split devicemanager Allocate into two functions
Instead of having a single call for Allocate(), we now split this into two
functions Allocate() and UpdatePluginResources().

The semantics split across them:

// Allocate configures and assigns devices to a pod. From the requested
// device resources, Allocate will communicate with the owning device
// plugin to allow setup procedures to take place, and for the device
// plugin to provide runtime settings to use the device (environment
// variables, mount points and device files).
Allocate(pod *v1.Pod) error

// UpdatePluginResources updates node resources based on devices already
// allocated to pods. The node object is provided for the device manager to
// update the node capacity to reflect the currently available devices.
UpdatePluginResources(
    node *schedulernodeinfo.NodeInfo,
    attrs *lifecycle.PodAdmitAttributes) error

As we move to a model in which the TopologyManager is able to ensure
aligned allocations from the CPUManager, devicemanger, and any
other TopologManager HintProviders in the same synchronous loop, we will
need to be able to call Allocate() independently from an
UpdatePluginResources(). This commit makes that possible.
2020-02-10 03:27:47 +00:00
Kubernetes Prow Robot
acd97b42f3
Merge pull request #87959 from andyzhangx/non-retriable
add StatusConflict(409) as non-retriable error for disksClient
2020-02-09 11:24:05 -08:00
Kubernetes Prow Robot
ca1514d03b
Merge pull request #80651 from odinuge/kubectl-proxy-handle-error
Add error check in kubectl proxy on server setup
2020-02-09 11:23:52 -08:00
Kubernetes Prow Robot
fe02be1521
Merge pull request #87931 from dims/ability-to-use-containerd-as-runtime
Ability to use containerd as runtime in kube-up (on Ubuntu)
2020-02-09 10:05:52 -08:00
Kubernetes Prow Robot
ac97b2d65e
Merge pull request #83507 from lyft/support-resetting-cpuacct
Prevent returning invalid usageNanoCores value when cpuacct is reset in a live container
2020-02-09 08:45:53 -08:00
Kubernetes Prow Robot
eb2d1fd19b Merge pull request #87914 from RainbowMango/pr_support_providerid
Support config kubelet provider id for local cluster
2020-02-09 07:27:53 -08:00
andyzhangx
0e47c86378 add StatusConflict as non-retriable error for disksClient 2020-02-09 12:27:47 +00:00
Kubernetes Prow Robot
c5d75749c8 Merge pull request #85029 from serathius/remove-prometheus-test-e2e
Remove references to prometheus is test/e2e
2020-02-09 01:27:52 -08:00
Kubernetes Prow Robot
09b13aec37
Merge pull request #87947 from tanjunchen/remove-TODO-and-unused-code
remove TODO and unused code
2020-02-09 00:19:52 -08:00
Kubernetes Prow Robot
652f52b51c
Merge pull request #85637 from dims/cinder-migration-flag
Flip CSIMigrationOpenStack flag to be beta and off by default
2020-02-08 21:49:52 -08:00
Kubernetes Prow Robot
abe6321296 Merge pull request #87952 from mikedanese/opts
add *Options to Create, Update, and Patch in generated clientsets
2020-02-08 20:43:53 -08:00
Kubernetes Prow Robot
86fcb30e53
Merge pull request #87908 from jpbetz/enable-smd-reflector
Bump to latest SMD to pick up performance optimizations
2020-02-08 18:11:52 -08:00
Davanum Srinivas
da024f9a57
Ability to override versions of containerd/runc 2020-02-08 20:20:15 -05:00
Kubernetes Prow Robot
d09f8b9d54
Merge pull request #79409 from takmatsu/add-phase
Modify Kubelet Pod Resources API to get only active pods
2020-02-08 16:09:52 -08:00
Davanum Srinivas
acd286d95d
Install containerd package depending on CONTAINER_RUNTIME 2020-02-08 17:53:37 -05:00
Davanum Srinivas
c4ef6a94b3
Add gid to config.toml only when docker group is present
If we don't install docker and install just containerd apt packages,
there is no docker group. In this scenario, we should not add the gid to
config.toml
2020-02-08 17:53:37 -05:00
Kubernetes Prow Robot
415b3ed950 Merge pull request #87944 from SataQiu/kubeadm-2020020802
kubeadm: remove 'kubeadm alpha kubelet config download'
2020-02-08 14:46:57 -08:00
Kubernetes Prow Robot
887ccc483c Merge pull request #87942 from SataQiu/kubeadm-2020020801
kubeadm: deprecate --kubelet-version command line option
2020-02-08 14:46:44 -08:00
Kubernetes Prow Robot
2e2c12951e
Merge pull request #87941 from andyzhangx/non-retriable-err
fix: add non-retriable errors in azure clients
2020-02-08 14:46:30 -08:00
Kubernetes Prow Robot
a280a967a5 Merge pull request #87853 from alculquicondor/fix/options_test
Do lenient decoding only for kubescheduler.config.k8s.io/v1alpha1
2020-02-08 14:46:21 -08:00
Kubernetes Prow Robot
20dca67a8a Merge pull request #87453 from aojea/kubeadm_dual
kubeadm: dual-stack validation allow single stack
2020-02-08 14:46:06 -08:00
Kubernetes Prow Robot
0c6470115e
Merge pull request #86578 from tnqn/except-validation
Validate Except of IPBlock for NetworkPolicy spec
2020-02-08 14:45:53 -08:00
Kubernetes Prow Robot
7c1dfd1b83 Merge pull request #83546 from Asalle/fix-golint-passwordfile
Fix golint in staging/src/k8s.io/apiserver/plugin/pkg/authenticator/password/passwordfile
2020-02-08 10:15:54 -08:00
Mike Danese
bfc75d9a5c manual fixes 2020-02-08 12:32:33 -05:00
Mike Danese
1dcd1fb3b7 generated: update clients 2020-02-08 12:32:30 -05:00
Mike Danese
25651408ae generated: run refactor 2020-02-08 12:30:21 -05:00
Mike Danese
6c274ea72d update client gen 2020-02-08 12:01:19 -05:00
tanjunchen
364c6f1173 remove TODO and unused code 2020-02-09 00:38:16 +08:00
Kubernetes Prow Robot
dde6e8e746 Merge pull request #87858 from smarterclayton/different_type
kubelet: Debug pod status output diff is wrong
2020-02-08 06:44:06 -08:00
Kubernetes Prow Robot
334d788f08 Merge pull request #87299 from mikedanese/ctx
context in client-go
2020-02-08 06:43:52 -08:00
Kubernetes Prow Robot
06c639fb4a
Merge pull request #87929 from dims/ensure-bazel-is-really-down
Ensure bazel is really brought down (ONLY on bazel-release target)
2020-02-08 03:00:07 -08:00
Kubernetes Prow Robot
c90fd17642 Merge pull request #87701 from yliaog/windep
added env var WINDOWS_CNI_STORAGE_PATH and WINDOWS_CNI_VERSION
2020-02-08 02:59:52 -08:00
Kubernetes Prow Robot
25501f8425
Merge pull request #87886 from RA489/rmbasheg
remove bash examples/comments from the v1beta1 and v1beta2 APIs
2020-02-08 00:21:52 -08:00
SataQiu
0714f814fe kubeadm: remove 'kubeadm alpha kubelet config download' 2020-02-08 14:52:33 +08:00
Kubernetes Prow Robot
b3ba969756 Merge pull request #87913 from cheftako/master
Add code to fix kubelet/metrics memory issue.
2020-02-07 21:51:53 -08:00
SataQiu
e167b44c17 kubeadm: deprecate --kubelet-version command line option 2020-02-08 12:56:25 +08:00
andyzhangx
142778ac6c fix: add non-retriable errors in azure clients 2020-02-08 04:26:57 +00:00
Kubernetes Prow Robot
0f13c5c3d1
Merge pull request #87930 from oomichi/issue/87679-1
Fix non-ascii characters in test/e2e/storage
2020-02-07 18:33:42 -08:00
Kubernetes Prow Robot
d9e574cb00
Merge pull request #87928 from johnbelamaric/show-output-in-test
LogResult if there is an error
2020-02-07 18:33:30 -08:00
Kubernetes Prow Robot
9bbd1a1a29
Merge pull request #87877 from justaugustus/cluster-augustus
cluster: Add justaugustus as reviewer
2020-02-07 18:33:19 -08:00
Kubernetes Prow Robot
ed74b7cc02
Merge pull request #87633 from brianpursley/kubectl-792
Prevent error message from being displayed during plugin list when path includes empty string
2020-02-07 18:33:09 -08:00