kubernetes/pkg/registry/core/service
Kubernetes Submit Queue f26b2956fb Merge pull request #48418 from xiangpengzhao/refactor-create-svc
Automatic merge from submit-queue (batch tested with PRs 49409, 49352, 49266, 48418)

Use helper to init ClusterIP and NodePort in Create of service

**What this PR does / why we need it**:
Make service `Create` more readable and testable.

- use `initClusterIP` introduced in #46197 to init ClusterIP allocation in service `Create`
- add a new helper `initNodePort` to init NodePort allocation in service `Create`
- TBD: add test case for `initNodePort`. This will cover the NodePort allocation process in `Create`. If this PR makes sense, I will write a test case later.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #35354 (not directly. #35354 was fixed by #46197. The idea of this PR is from https://github.com/kubernetes/kubernetes/pull/46197#discussion_r120910077)

**Special notes for your reviewer**:
/cc @thockin @freehan 

**Release note**:

```release-note
NONE
```
2017-07-22 02:05:21 -07:00
..
allocator autogenerated 2017-04-14 10:40:57 -07:00
ipallocator Add unit test case for initClusterIP and updateNodePort 2017-06-28 09:35:12 +08:00
portallocator Add unit test case for initClusterIP and updateNodePort 2017-06-28 09:35:12 +08:00
storage Add group alias names to discovery in registry 2017-06-05 20:18:12 -03:00
BUILD Merge pull request #48418 from xiangpengzhao/refactor-create-svc 2017-07-22 02:05:21 -07:00
doc.go move core resource registry packages 2016-09-21 10:11:50 -04:00
proxy.go Unify generic proxy code in apimachinery 2017-07-07 16:26:29 -04:00
registry.go Grow signature for predicate attributes to include init status 2017-06-02 22:09:04 -04:00
rest_test.go Merge pull request #48418 from xiangpengzhao/refactor-create-svc 2017-07-22 02:05:21 -07:00
rest.go Merge pull request #48418 from xiangpengzhao/refactor-create-svc 2017-07-22 02:05:21 -07:00
strategy_test.go Mechanical fixup imports: pkg/genericapiserver 2017-02-03 08:15:45 +01:00
strategy.go Grow signature for predicate attributes to include init status 2017-06-02 22:09:04 -04:00