Commit Graph

5116 Commits

Author SHA1 Message Date
Alay Patel
38bb53555e update violation_exceptions.list and make generated 2020-11-10 17:32:06 -05:00
Alay Patel
8d7dd4415e add cronjob_controllerv2.go 2020-11-10 17:32:06 -05:00
Tim Hockin
819ff9b087
Use topology labels instead of old beta names (#96033)
* Rename const for topology.../zone

* Rename const for topology.../region

* Rename const for failure-domain.../zone

* Rename const for failure-domain.../region

* Restore old names for compat
2020-11-05 20:26:50 -08:00
Andrew Sy Kim
7cf19e5fb7 endpointslice API: rename 'accepting' condition to 'serving' condition
Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>
2020-11-05 19:18:45 -05:00
Andrew Sy Kim
17cf1b4415 endpointslice controller: add test cases to TestSyncServiceFull for terminating endpoints
Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>
2020-11-05 19:18:45 -05:00
Andrew Sy Kim
2947f5ce4f endpointslice controller: refactor TestSyncServiceFull to use test tables
Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>
2020-11-05 19:18:45 -05:00
Andrew Sy Kim
1c603e90ef endpointslice controller: set new conditions 'accepting' and 'terminating'
Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>
2020-11-05 19:18:45 -05:00
Kubernetes Prow Robot
2d6cd683bd
Merge pull request #95541 from cofyc/fix95538
volume binding: report UnschedulableAndUnresolvable status instead of an error when bound PVs not found
2020-11-05 15:16:51 -08:00
Shihang Zhang
2c378beb64 abort if namespace doesn't exist or terminating 2020-11-05 11:12:15 -08:00
Yecheng Fu
0961891a7a report UnschedulableAndUnresolvable status instead of an error when PVCs can't find bound
persistent volumes

This is an user error. We should't report an error.
2020-11-05 10:28:40 +08:00
Shihang Zhang
d40f0c43c4 separate RootCAConfigMap from BoundServiceAccountTokenVolume 2020-11-04 17:10:39 -08:00
Kubernetes Prow Robot
096819c963
Merge pull request #95909 from pohly/pv-controller-delete-pv-fix
PV controller: don't delete PVs when PVC is not known yet
2020-11-02 02:00:52 -08:00
Kubernetes Prow Robot
4b65f70652
Merge pull request #95740 from cici37/moveCCM
Move cloud-controller-manager to staging k8s.io/cloud-provider
2020-10-30 13:48:51 -07:00
cici37
9465d95ea6 Move CCM to staging k8s.io/cloud-provider 2020-10-29 20:50:23 -07:00
cici37
a91a2cdad6 Move informer_factory to staging 2020-10-29 12:20:33 -07:00
Patrick Ohly
24f5764787 pv controller test: more test cases
The main goal was to cover retrieval of a PVC from the apiserver when
it isn't known yet. This is achieved by adding PVCs and (for the sake
of completeness) PVs to the reactor, but not the controller, when a
special annotation is set. The approach with a special annotation was
chosen because it doesn't affect other tests.

The other test cases were added while checking the existing tests
because (at least at first glance) the situations seemed to be not
covered.
2020-10-28 10:52:11 +01:00
Patrick Ohly
22f81e9e0b pv controller test: use sub tests
This makes it possible to run individual tests.
2020-10-28 10:39:59 +01:00
Patrick Ohly
06f934ea1f pv controller test: enable klog output
This makes it possible to run tests with -v=5 and thus actually get
some output.
2020-10-28 10:39:10 +01:00
Kubernetes Prow Robot
554319cce8
Merge pull request #95410 from benhxy/staticcheck
Fix static check for pkg/controller/podautoscaler
2020-10-27 10:36:14 -07:00
Patrick Ohly
5686664a1d PV controller: don't delete PVs when PVC is not known yet
Normally, the PV controller knows about the PVC that triggers the
creation of a PV before it sees the PV, because the PV controller must
set the volume.beta.kubernetes.io/storage-provisioner annotation that
tells an external provisioner to create the PV.

When restarting, the PV controller first syncs its caches, so that
case is also covered.

However, the creator of a PVC might decided to set that annotation
itself to speed up volume creation. While unusual, it's not forbidden
and thus part of the external Kubernetes API. Whether it makes sense
depends on the intentions of the user.

When that is done and there is heavy load, an external provisioner
might see the PVC and create a PV before the PV controller sees the
PVC. If the PV controller then encounters the PV before the PVC, it
incorrectly concludes that the PV needs to be deleted instead of being
bound.

The same issue occurred earlier for external binding and the existing
code for looking up a PVC in the cache or in the apiserver solves the
issue also for volume provisioning, it just needs to be enabled also
for PVs without the pv.kubernetes.io/bound-by-controller annotation.
2020-10-27 11:26:58 +01:00
Khaled Henidak (Kal)
6675eba3ef
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>
2020-10-26 13:15:59 -07:00
Ben Hu
4e62298c1b Fix static checks for pkg/controller/podautoscaler 2020-10-23 18:53:07 +00:00
Kubernetes Prow Robot
ec453ffb1a
Merge pull request #90691 from arjunrn/container-resource-hpa
Add container based scaling to HPA
2020-10-23 05:51:51 -07:00
Kubernetes Prow Robot
106ee38796
Merge pull request #95647 from JoshuaAndrew/master
Horizontal Pod Autoscaler doesn`t automatically scale the number of pods correctly
2020-10-23 04:05:59 -07:00
Kubernetes Prow Robot
1257bc5acb
Merge pull request #91474 from cici37/pkgController
Cleanup CCM dependencies
2020-10-22 23:17:45 -07:00
Kubernetes Prow Robot
afa941b8e1
Merge pull request #95789 from qingsenLi/k8s201023
remove unused const failedExpiration
2020-10-22 22:17:35 -07:00
Kubernetes Prow Robot
153d33091b
Merge pull request #95632 from mrkm4ntr/remove-redundant-variable
Remove redundant variable
2020-10-22 22:16:48 -07:00
qingsenLi
30bfa7d078 remove unused const failedExpiration 2020-10-22 18:57:36 +08:00
weiwei
b19a115f42 If we set SelectPolicy MinPolicySelect on scaleUp behavior or scaleDown behavior,Horizontal Pod Autoscaler doesn`t automatically scale the number of pods correctly
Signed-off-by: weiwei <weiwei@tenxcloud.com>
2020-10-22 18:00:49 +08:00
Arjun Naik
0fec7b0f7e Added functionality and API for pod autoscaling based on container resources
Signed-off-by: Arjun Naik <anaik@redhat.com>
2020-10-21 21:10:05 +02:00
Kubernetes Prow Robot
163b23f163
Merge pull request #95529 from cici37/cleanup
Add back openapi gen for generic types and clean up doc.go
2020-10-20 11:22:34 -07:00
Kubernetes Prow Robot
3175b59ac2
Merge pull request #94489 from ialidzhikov/fix/volume-expand
Do not assume storageclass is still in-tree after csi migration
2020-10-19 15:08:07 -07:00
cici37
95acec5a3b Move client_builder to k8s.io/controller-manager 2020-10-19 14:48:22 -07:00
cici37
0d2002229f Add back openapi gen for generic types and clean up doc.go 2020-10-16 10:54:15 -07:00
Shintaro Murakami
acc970399d Remove redundant variable
The variable firstUnhealthyOrdinal is redundant because replicas and condemned are already sorted in ascending order.
2020-10-16 09:53:34 +09:00
Joseph Burnett
1ccaaa768d Ignore deleted pods.
When a pod is deleted, it is given a deletion timestamp. However the
pod might still run for some time during graceful shutdown. During
this time it might still produce CPU utilization metrics and be in a
Running phase.

Currently the HPA replica calculator attempts to ignore deleted pods
by skipping over them. However by not adding them to the ignoredPods
set, their metrics are not removed from the average utilization
calculation. This allows pods in the process of shutting down to drag
down the recommmended number of replicas by producing near 0%
utilization metrics.

In fact the ignoredPods set is misnomer. Those pods are not fully
ignored. When the replica calculator recommends to scale up, 0%
utilization metrics are filled in for those pods to limit the scale
up. This prevents overscaling when pods take some time to startup. In
fact, there should be 4 sets considered (readyPods, unreadyPods,
missingPods, ignoredPods) not just 3.

This change renames ignoredPods as unreadyPods and leaves the scaleup
limiting semantics. Another set (actually) ignoredPods is added to
which delete pods are added instead of being skipped during
grouping. Both ignoredPods and unreadyPods have their metrics removed
from consideration. But only unreadyPods have 0% utilization metrics
filled in upon scaleup.
2020-10-14 16:45:06 +02:00
Kubernetes Prow Robot
8647eece9c
Merge pull request #95113 from Git-Jiro/lint_ttlcontroller
Lint ttl_controller
2020-10-13 22:51:53 -07:00
Kubernetes Prow Robot
ea896a2e64
Merge pull request #95224 from Git-Jiro/lint_endpoint
Fix lint errors in pkg/contoller/endpoint
2020-10-13 12:06:27 -07:00
cici37
ae8ce0d190 Move cmd/controller-manager to k8s.io/controller-manager and cloud specific configs to k8s.io/cloud-provider. 2020-10-08 13:23:16 -07:00
Kubernetes Prow Robot
f30d6a463d
Merge pull request #93779 from yodarshafrir1/fix_restart_job_failure_with_restart_policy_never
Fix job backoff limit for restart policy Never
2020-10-06 10:02:44 -07:00
Kubernetes Prow Robot
1a66eb7b8a
Merge pull request #89482 from renatoviana12/master
fixed percentage behaviour in instr
2020-10-05 20:00:19 -07:00
Kubernetes Prow Robot
60dd999b48
Merge pull request #94443 from aojea/slicesLabels
endpointslice controller should mirror parent service labels
2020-10-02 18:23:04 -07:00
Martin Schimandl
104ad794e5 Fix lint errors in pkg/contoller/endpoint
Also mark reason for lint errors in:
pkg/controller/endpoint/config/v1alpha1,
pkg/controller/endpointslice/config/v1alpha1
pkg/controller/endpointslicemirroring/config/v1alpha1
2020-10-01 09:11:00 +02:00
Renato Viana
316eff8dee Fixed percentage behavior in instr
fixed syntax, wrote a test

fixed a test

.

1

Update staging/src/k8s.io/apimachinery/pkg/util/intstr/intstr_test.go

Co-Authored-By: Joel Speed <Joel.speed@hotmail.co.uk>

added test

.

fix

fix test

fixed a test

gofmt

lint

fix

function name

validation fix

.

godocs added

.
2020-09-30 21:23:05 +01:00
Martin Schimandl
600d621ce6 Lint ttl_controller 2020-09-28 14:22:37 +02:00
Kubernetes Prow Robot
2d9a0b64d1
Merge pull request #95013 from soltysh/fix_context
Use pager's context instead of TODO
2020-09-24 08:16:20 -07:00
Kubernetes Prow Robot
63d4a03270
Merge pull request #94947 from phillc/master
Replace 'the the ' with 'the '
2020-09-23 20:28:04 -07:00
Maciej Szulik
d91a1f7e92
Use pager's context instead of TODO 2020-09-23 20:18:03 +02:00
Kubernetes Prow Robot
dd466bccde
Merge pull request #94527 from brahmaroutu/mount-utils-2
Change code to use  staging/k8s.io/mount-utils
2020-09-21 17:46:47 -07:00
phillc
adbc7c2172
find . -type f \( -name "*.go" -or -name "*.md" \) -print0 | xargs -0 gsed -i 's/the the /the /g' 2020-09-21 16:37:12 -04:00