Commit Graph

202 Commits (5b43a243187bf438d94eddce62071c33ea0759f8)

Author SHA1 Message Date
k8s-ci-robot 6d189fd316
Merge pull request #70838 from ping035627/k8s-181107
Fix the service_controller test cases and some syntax errors
2018-11-29 07:36:18 -08:00
PingWang c32530ddf2 Fix the service_controller test cases and some syntax errors
Signed-off-by: PingWang <wang.ping5@zte.com.cn>

add test condition and remove TODO

Signed-off-by: PingWang <wang.ping5@zte.com.cn>

update test

Signed-off-by: PingWang <wang.ping5@zte.com.cn>
2018-11-14 08:29:58 +08:00
Davanum Srinivas 954996e231
Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
2018-11-10 07:50:31 -05:00
Walter Fender f3f46d5f5a Moving the cloudprovider interface to staging.
Individual implementations are not yet being moved.
Fixed all dependencies which call the interface.
Fixed golint exceptions to reflect the move.
Added project info as per @dims and
https://github.com/kubernetes/kubernetes-template-project.
Added dims to the security contacts.
Fixed minor issues.
Added missing template files.
Copied ControllerClientBuilder interface to cp.
This allows us to break the only dependency on K8s/K8s.
Added TODO to ControllerClientBuilder.
Fixed GoDeps.
Factored in feedback from JustinSB.
2018-10-04 14:41:20 -07:00
andrewsykim 9406b3c1e0 add myself and cheftako to services/routes controller OWNERS 2018-10-01 16:37:58 -04:00
yankaiz 267252d9e1 Let the service controller retry when presistUpdate returns a conflict error. 2018-09-04 15:34:26 -07:00
Laszlo Janosi a6da2b1472 K8s SCTP support implementation for the first pull request
The requested Service Protocol is checked against the supported protocols of GCE Internal LB. The supported protocols are TCP and UDP.

SCTP is not supported by OpenStack LBaaS. If SCTP is requested in a Service with type=LoadBalancer, the request is rejected. Comment style is also corrected.

SCTP is not allowed for LoadBalancer Service and for HostPort. Kube-proxy can be configured not to start listening on the host port for SCTP: see the new SCTPUserSpaceNode parameter

changed the vendor github.com/nokia/sctp to github.com/ishidawataru/sctp. I.e. from now on we use the upstream version.

netexec.go compilation fixed. Various test cases fixed

SCTP related conformance tests removed. Netexec's pod definition and Dockerfile are updated to expose the new SCTP port(8082)

SCTP related e2e test cases are removed as the e2e test systems do not support SCTP

sctp related firewall config is removed from cluster/gce/util.sh. Variable name sctp_addr is corrected to sctpAddr in pkg/proxy/ipvs/proxier.go

cluster/gce/util.sh is copied from master
2018-08-27 05:56:27 +00:00
morrislaw 6ecec23690 Implement GetLoadBalancerName per provider and add DefaultLoadBalancerName. 2018-08-04 00:36:48 -04:00
yue9944882 dc07e4dcba fixes docs 2018-06-28 11:33:47 +08:00
Jeff Grafton 23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
Mikhail Mazurskiy 468655b76a
Use typed events client directly 2018-04-01 18:57:29 +10:00
Kubernetes Submit Queue c64f19dd1b
Merge pull request #59728 from wgliang/master.append
Automatic merge from submit-queue (batch tested with PRs 59740, 59728, 60080, 60086, 58714). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

more concise to merge the slice

**What this PR does / why we need it**:
more concise to merge the slice

**Special notes for your reviewer**:
2018-03-19 21:34:30 -07:00
Kubernetes Submit Queue 07240b7166
Merge pull request #60555 from zhangxiaoyu-zidif/add-unit-test-for-nodenames-slice-comparison
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

add unit test case for nodenames comparison

**What this PR does / why we need it**:
ref https://github.com/kubernetes/kubernetes/pull/60486

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:
please merge it after https://github.com/kubernetes/kubernetes/pull/60486

**Release note**:

```release-note
NONE
```
2018-02-28 10:39:18 -08:00
Kubernetes Submit Queue c4f3102b1f
Merge pull request #60486 from zhangxiaoyu-zidif/fix-nodename-slice-cmp
Automatic merge from submit-queue (batch tested with PRs 60342, 60505, 59218, 52900, 60486). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix nodenames slices comparison para.

**What this PR does / why we need it**:

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-02-28 06:07:34 -08:00
zhangxiaoyu-zidif a0786a2df5 add unit test case for nodenames comparison 2018-02-28 14:02:09 +08:00
Ryan Hitchman e04b91facf Remove unused variables (only assigned to) from test code.
This is revealed by the go/types package, which is stricter than
the Go compiler about unused variables. See also: golang/go#8560
2018-02-27 13:45:31 -08:00
zhangxiaoyu-zidif 44aeb56eab fix nodenames slices comparison para. 2018-02-27 15:54:45 +08:00
Jeff Grafton ef56a8d6bb Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
Wang Guoliang 31aad75316 more concise to merge the array 2018-02-11 21:27:11 +08:00
Di Xu 48388fec7e fix all the typos across the project 2018-02-11 11:04:14 +08:00
Walter Fender e18e8ec3c0 Add context to all relevant cloud APIs
This adds context to all the relevant cloud provider interface signatures.
Callers of those APIs are currently satisfied using context.TODO().
There will be follow on PRs to push the context through the stack.
For an idea of the full scope of this change please look at PR #58532.
2018-02-06 12:49:17 -08:00
lichuqiang f6201c4ffa fix event message when processing loadbalancer update 2018-01-19 10:48:30 +08:00
Kubernetes Submit Queue 408a316b1d
Merge pull request #56370 from oracle/for/upstream/master/55528
Automatic merge from submit-queue (batch tested with PRs 57868, 58284, 56370, 58400, 58439). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Refactor service controller to common controller pattern

**What this PR does / why we need it**:

The service controller currently uses a non-standard controller pattern that adds unneeded complexity. This PR moves the service controller to use common tools like the rate limited queue with exponential backoff versus tracking retry backoff in the cachedService object. 

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #55528

**Special notes for your reviewer**:

This does change the retry backoff from a linear backoff to an exponential backoff. The min and max retry delay stays the same. 

There was only one case where we didn't want to retry, which was when we updated the service status since that handled retries itself. In that case I moved to the common pattern of using `runtime.HandleError`.

**Release note**:

```release-note
NONE
```

/cc @luxas @wlan0 @andrewsykim @thockin 
@prydie 

/sig cluster-lifecycle
/sig networking
/kind cleanup
2018-01-18 13:11:34 -08:00
zhangxiaoyu-zidif b12c3b8660 use sets.String to replace slice when sort []string 2018-01-06 16:16:37 +08:00
Jeff Grafton efee0704c6 Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
Josh Horwitz ffba27d72e Refactor service controller to common controller pattern 2017-12-19 23:08:48 -05:00
Ri Xu 4b71941082
Simple code and typo fixed.
Signed-off-by: Ri Xu <xuri.me@gmail.com>
2017-12-02 21:12:39 +08:00
Josh Horwitz 04c45e10db Revert "Merge pull request #55336 from oracle/for/upstream/master/53462"
This reverts commit ccb15fb498, reversing
changes made to 4904037645.
2017-11-28 19:04:42 -05:00
Kubernetes Submit Queue ccb15fb498
Merge pull request #55336 from oracle/for/upstream/master/53462
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fixes service controller update race condition

**What this PR does / why we need it**:

Fixes service controller update race condition that can happen with the node sync loop and the worker(s). This PR allows the node sync loop to utilize the same work queue as service updates so that the queue can ensure the service is being acted upon by only one goroutine. 

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #53462

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/cc @wlan0 @luxas @prydie @andrewsykim 

/sig cluster-lifecycle
/area cloudprovider
2017-11-22 18:05:50 -08:00
wackxu ead429ebda WaitForCacheSync fail should return for service controller 2017-11-15 21:08:07 +08:00
Dr. Stefan Schimanski bec617f3cc Update generated files 2017-11-09 12:14:08 +01:00
Dr. Stefan Schimanski 012b085ac8 pkg/apis/core: mechanical import fixes in dependencies 2017-11-09 12:14:08 +01:00
Josh Horwitz 26f9dd7b3e generated files 2017-11-08 21:57:56 -05:00
Josh Horwitz c8a12b8045 Fixes service controller update race condition 2017-11-08 21:57:51 -05:00
Ferran Rodenas d67898b875 Check RegisterMetricAndTrackRateLimiterUsage error when starting controllers
Signed-off-by: Ferran Rodenas <rodenasf@vmware.com>
2017-11-01 12:46:07 +01:00
Kubernetes Submit Queue cadcb62065
Merge pull request #54644 from brendandburns/node-label
Automatic merge from submit-queue (batch tested with PRs 54644, 53072). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Flag gate node exclusion for service load balancers.

@thockin @jdumars 

```release-note
Add a new feature gate for enabling an alpha annotation which, if present, excludes the annotated node from being added to a service load balancers.
```

Issue: https://github.com/kubernetes/kubernetes/issues/54743

Notes:
The original PR for this feature was: https://github.com/kubernetes/kubernetes/pull/53146

Which didn't include a gate (or the alpha label).

This was refined to add the `alpha` label in:
https://github.com/kubernetes/kubernetes/pull/53678

Then in the cherry-pick review:
https://github.com/kubernetes/kubernetes/pull/53656#issuecomment-335693646

@thockin requested a gate for an alpha feature, which is this PR.
2017-10-28 07:26:24 -07:00
Brendan Burns a71f757148 wqFlag gate node exclusion for service load balancers. 2017-10-28 03:44:46 +00:00
Kevin 4c8539cece use core client with explicit version globally 2017-10-27 15:48:32 +08:00
Kubernetes Submit Queue 8f505e4c86 Merge pull request #54341 from athampy/gh-54339
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Remove redundant call to StartLogging in service_controller. Fixes #5…

…4339



**What this PR does / why we need it**:
Removes redundant call to StartLogging introduced in 96b48d4#diff-1f7f903e25ab8bcbc514bb1e532e997e

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
#54339 

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-10-25 13:22:50 -07:00
Kubernetes Submit Queue 01374839b0 Merge pull request #53196 from FengyunPan/lb-empty-node
Automatic merge from submit-queue (batch tested with PRs 52868, 53196, 54207). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Check the count of cloud node for LoadBalancer service

If there is no available node for LoadBalancer service, the LoadBlancer
service will become unavailable, we should update service status.
This is part of #53193
**What this PR does / why we need it**:

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: 
xref #53193

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2017-10-25 12:32:18 -07:00
Kubernetes Submit Queue ee9983355e Merge pull request #54500 from MrHohn/service-controller-more-logging
Automatic merge from submit-queue (batch tested with PRs 54366, 54500). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Service controller / gce loadbalancer logging cleanup

**What this PR does / why we need it**:
From https://github.com/kubernetes/kubernetes/issues/52495, while looking into the potential scalability issue service controller may have, I found it really hard to debug as the log sometimes doesn't reference which LB it is for, or sometimes it just doesn't log at all. It get even harder that in correctness CIs we reduce verbose level to v1:
67bc30718f/jobs/env/ci-kubernetes-e2e-gce-scale-correctness.env (L16).

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #NONE

**Special notes for your reviewer**:
/assign @nicksardo @bowei 
cc @shyamjvs 

**Release note**:

```release-note
NONE
```
2017-10-24 16:54:02 -07:00
Kubernetes Submit Queue 4ca155cbc1 Merge pull request #54184 from MrHohn/fix-service-controller-retry
Automatic merge from submit-queue (batch tested with PRs 54107, 54184, 54377, 54094, 54111). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix retry logic in service controller

**What this PR does / why we need it**: Make service controller don't retry on doNotRetry service update failure.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #54183

**Special notes for your reviewer**:
/assign @nicksardo @bowei 

**Release note**:

```release-note
NONE
```
2017-10-24 15:59:06 -07:00
Zihong Zheng e3eac372f0 service_controller: Include service key in error messages 2017-10-24 10:51:15 -07:00
Bowei Du 65e6e08f09 Missed approvers for controller/service 2017-10-23 11:34:49 -07:00
Akhil Thampy 572b1c2db9 Remove redundant call to StartLogging in service_controller. Fixes #54339 2017-10-21 11:45:48 -05:00
FengyunPan 3cf89a5de7 Check the count of cloud node for LoadBalancer service
If there is no available node for LoadBalancer service, the LoadBlancer
service will become unavailable, we should update service status.
This is part of #53193
2017-10-20 12:04:02 +08:00
hzxuzhonghu 96b48d4386 add event broadcaster logging for all contoller managers 2017-10-19 09:18:43 +08:00
Zihong Zheng 72542f5b82 Fix retry logic in service controller 2017-10-18 16:58:19 -07:00
Jeff Grafton aee5f457db update BUILD files 2017-10-15 18:18:13 -07:00
Davanum Srinivas eda7fbd16a Ignore .import-restrictions when checking against generated docs 2017-10-13 07:09:38 -04:00