Commit Graph

1515 Commits (ff471913f9073e8c69dd5c5e87fee95857a20aba)

Author SHA1 Message Date
Kubernetes Submit Queue e794dce445 Merge pull request #48936 from jsafrane/aws-key-check
Automatic merge from submit-queue

AWS: check validity of KSM key before creating a new encrypted disk.

AWS CreateVolume call does not check if referenced encryption key actually exists and returns a valid new AWS EBS volume even though an invalid key was specified. Later on it removes the EBS silently when its encryption fails.

To work around this buggy behavior we manually check that the key exists before calling CreateVolume.

Fixes #48438

/sig aws

Please review carefully. Can we safely assume that Kubernetes controller-manager can read encryption keys?

```release-note
aws: Kubernetes now checks existence of provided KSM (Key Management Service) key before creating an encrypted AWS EBS.
```
2017-08-30 08:05:56 -07:00
Kubernetes Submit Queue 022919d1a4 Merge pull request #51483 from yujuhong/e2e-net-tiers
Automatic merge from submit-queue

e2e: Add tests for network tiers in GCE

This test depends on #51301, which adds the new feature. Only the `e2e: Add tests for network tiers in GCE` commit is new.
#51301 should pass this new test.
2017-08-30 06:55:35 -07:00
saadali 4ca1dbc589 Enable switching to alpha GCE disk API 2017-08-29 17:23:25 -07:00
Kubernetes Submit Queue 0d17e9deb7 Merge pull request #48574 from sakshamsharma/kms-transformer
Automatic merge from submit-queue

Add Google cloud KMS service for envelope encryption transformer

This adds the required pieces which will allow addition of KMS based encryption providers (envelope transformer).

For now, we will be implementing it using Google Cloud KMS, but the code should make it easy to add support for any other such provider which can expose Decrypt and Encrypt calls.

Writing tests for Google Cloud KMS Service may cause a significant overhead to the testing framework. It has been tested locally and on GKE though.

Upcoming after this PR:
* Complete implementation of the envelope transformer, which uses LRU cache to maintain decrypted DEKs in memory.
* Track key version to assist in data re-encryption after a KEK rotation.

Development branch containing the changes described above: https://github.com/sakshamsharma/kubernetes/pull/4

Envelope transformer used by this PR was merged in #49350 

Concerns #48522 

Planned configuration:
```
kind: EncryptionConfig
apiVersion: v1
resources:
  - resources:
    - secrets
    providers:
    - kms:
        cachesize: 100
        configfile: gcp-cloudkms.conf
        name: gcp-cloudkms
    - identity: {}
```

gcp-cloudkms.conf:
```
[GoogleCloudKMS]
    kms-location: global
    kms-keyring: google-container-engine
    kms-cryptokey: example-key
```
2017-08-29 11:11:10 -07:00
Kubernetes Submit Queue a9c80bc97b Merge pull request #51298 from yujuhong/gce-fakes
Automatic merge from submit-queue (batch tested with PRs 51298, 51510, 51511)

GCE: Add a fake forwarding rule service

Also add more methods to the address service.  These
will be used for testing soon.
2017-08-29 10:38:14 -07:00
Kubernetes Submit Queue d25a78a692 Merge pull request #51410 from nicksardo/gce-consume-netproj
Automatic merge from submit-queue (batch tested with PRs 50919, 51410, 50099, 51300, 50296)

GCE: Read networkProjectID param

Fixes #48515 

/assign bowei

The first commit is the original PR cherrypicked. The master's kubelet isn't provided a cloud config path, so the project is retrieved via instance metadata. In the GKE case, this project cannot be retrieved by the master and caused an error.

**Release note**:
```release-note
NONE
```
2017-08-29 03:20:02 -07:00
Saksham Sharma 3e11baf702 Add Google Cloud KMS plugin for encryption 2017-08-29 11:15:27 +05:30
Yu-Ju Hong f33c37e102 e2e: Add tests for network tiers in GCE 2017-08-28 18:40:20 -07:00
Yu-Ju Hong 22b2da2378 update bazel 2017-08-28 18:40:20 -07:00
Yu-Ju Hong 46eb7d8a55 GCE: Add annotations and helper functions for network tiers
These functions will be consumed in the follow-up changes.
2017-08-28 18:40:20 -07:00
Nick Sardo a48fe406be Consume new config value for network project id 2017-08-28 11:11:05 -07:00
Jan Safranek 1ea7fa84fc AWS: check validity of KSM key before creating a new encrypted disk.
AWS CreateVolume call does not check if referenced encryption key actually
exists and returns a valid new AWS EBS volume even though an invalid key
was specified. Later on it removes the EBS silently when its encryption fails.

To work around this buggy behavior we manually check that the key exists
before calling CreateVolume.
2017-08-28 12:52:57 +02:00
Kubernetes Submit Queue 4231308582 Merge pull request #51317 from FengyunPan/GetZoneByProviderID-openstack
Automatic merge from submit-queue

Implement GetZoneByProviderID and GetZoneByNodeName for openstack

This is part of #50926
cc @wlan0

**Release note**:
```release-note
NONE
```
2017-08-26 10:09:33 -07:00
Kubernetes Submit Queue 4b7135513f Merge pull request #51382 from nicksardo/revert-51038-gce-netproj
Automatic merge from submit-queue (batch tested with PRs 51174, 51363, 51087, 51382, 51388)

Revert "GCE: Consume new config value for network project id"

Reverts kubernetes/kubernetes#51038

Broke GKE tests
2017-08-26 06:43:33 -07:00
Kubernetes Submit Queue 27fbb68f18 Merge pull request #51087 from oracle/for/upstream/master/ccm-instance-exists
Automatic merge from submit-queue (batch tested with PRs 51174, 51363, 51087, 51382, 51388)

Add InstanceExistsByProviderID to cloud provider interface for CCM

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

Currently, [`MonitorNode()`](02b520f0a4/pkg/controller/cloud/nodecontroller.go (L240)) in the node controller checks with the CCM if a node still exists by calling `ExternalID(nodeName)`. `ExternalID` is supposed to return the provider id of a node which is not supported on every cloud. This means that any clouds who cannot infer the provider id by the node name from a remote location will never remove nodes that no longer exist. 


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

**Special notes for your reviewer**:

We'll want to create a subsequent issue to track the implementation of these two new methods in the cloud providers.

**Release note**:

```release-note
Adds `InstanceExists` and `InstanceExistsByProviderID` to cloud provider interface for the cloud controller manager
```

/cc @wlan0 @thockin @andrewsykim @luxas @jhorwit2

/area cloudprovider
/sig cluster-lifecycle
2017-08-26 06:43:30 -07:00
Kubernetes Submit Queue c170f5bfa2 Merge pull request #50972 from FengyunPan/external-loadBalancerIP
Automatic merge from submit-queue (batch tested with PRs 51235, 50819, 51274, 50972, 50504)

Support for specifying external LoadBalancerIP on openstack

1. Support ServiceAnnotationLoadBalancerFloatingNetworkId for LB v1

2. Support for specifying external LoadBalancerIP on openstack
    Add ServiceAnnotationLoadBalancerInternal annotation to distinguish
    between internal LoadBalancerIP and external LoadBalancerIP.


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

**Release note**:
```release-note
NONE
```
2017-08-25 19:40:36 -07:00
Nick Sardo 0d55f6bdcb Revert "GCE: Consume new config value for network project id" 2017-08-25 18:02:10 -07:00
Josh Horwitz cf75c49883 change godoc based on feedback from luxas 2017-08-25 18:04:10 -04:00
Josh Horwitz 3528ceb27f address test & doc comments 2017-08-25 16:15:55 -04:00
Yu-Ju Hong 91275d23e2 GCE: Add a fake forwarding rule service
Also add more methods to the address service.
2017-08-25 08:49:11 -07:00
Nick Sardo 0028385e20 Consume new config value for network project id 2017-08-25 08:42:28 -07:00
FengyunPan 79d2b1dd4e Implement GetZoneByProviderID and GetZoneByNodeName for openstack
This is part of #50926
cc @wlan0
2017-08-25 23:08:00 +08:00
Kubernetes Submit Queue c025965db3 Merge pull request #51233 from bowei/add-alias
Automatic merge from submit-queue (batch tested with PRs 51114, 51233, 51024, 51053, 51197)

Add AddAliasToInstance() to gce cloud provider

- Adds AddAliasToInstance() to the GCE cloud provider.
- Adds field "secondary-range-name" to the gce.conf configuration file.

```release-note
NONE
```
2017-08-25 06:22:12 -07:00
Kubernetes Submit Queue d7102a0f36 Merge pull request #49770 from FengyunPan/fix-GetInstanceIDFromProviderID
Automatic merge from submit-queue (batch tested with PRs 51244, 50559, 49770, 51194, 50901)

Fix the matching rule of instance ProviderID

Url.Parse() can't parse ProviderID which contains ':///'.
This PR use regexp to match ProviderID.

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

**Release note**:
```release-note
NONE
```
2017-08-25 04:11:10 -07:00
Kubernetes Submit Queue 0cf928f681 Merge pull request #51222 from yujuhong/fake-addr-svc
Automatic merge from submit-queue (batch tested with PRs 51224, 51191, 51158, 50669, 51222)

Change the FakeCloudAddressService to store Alpha objects internally

The change assumes the compute Alpha object is the superset of the v1
object. By storing the Alpha objects internally in the fake, we can
convert them to Beta and v1 to test different functions.
2017-08-24 22:59:38 -07:00
andrewsykim bd3cc83110 cloudprovider.Zones should support external cloud providers 2017-08-24 21:05:49 -04:00
Josh Horwitz 2f1ea47c83 Add InstanceExists* methods to cloud provider interface for CCM 2017-08-24 20:41:28 -04:00
Yu-Ju Hong 359fc7a4f4 Change the FakeCloudAddressService to store Alpha objects internally
The change assumes the compute Alpha object is the superset of the v1
object. By storing the Alpha objects internally in the fake, we can
convert them to Beta and v1 to test different functions.
2017-08-24 07:43:29 -07:00
Bowei Du 1f4dc5559d Add AddAliasToInstance() to gce cloud provider
- Adds AddAliasToInstance() to the GCE cloud provider.
- Adds field "secondary-range-name" to the gce.conf configuration file.

```release-note
NONE
```
2017-08-23 23:10:20 -07:00
Kubernetes Submit Queue 5cb1cccd40 Merge pull request #51138 from yujuhong/alpha-calls
Automatic merge from submit-queue

GCE: Add functions for Alpha address and forwarding rules
2017-08-23 21:17:07 -07:00
Kubernetes Submit Queue 6bb928a3df Merge pull request #50931 from jrperritt/fix-pool-panic
Automatic merge from submit-queue

cloudprovider/openstack bug fix: don't try to append pool id if pool doesn't exist

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

This fixes a bug in the OpenStack cloud provider that could cause a panic.

Consider what will happen in the current `LbaasV2.EnsureLoadBalancerDeleted` code if `nil, ErrNotFound` is returned by `getPoolByListenerID`.
2017-08-23 16:23:29 -07:00
Kubernetes Submit Queue 012e94b6be Merge pull request #50239 from FengyunPan/fix-no-exist-node
Automatic merge from submit-queue (batch tested with PRs 38947, 50239, 51115, 51094, 51116)

Mark the volumes as detached when node does not exist

If node does not exist, node's volumes will be detached
automatically and become available. So mark them detached and do not return err.

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

**Release note**:
```release-note
NONE
```
2017-08-23 08:41:04 -07:00
Kubernetes Submit Queue 33821862ce Merge pull request #50973 from FengyunPan/fix-legacy-floatingip
Automatic merge from submit-queue (batch tested with PRs 50229, 50973, 50976, 51085, 51084)

Fix legacy floatingip

Fix #50974
If user specify floating-network-id by annotation rather than cloud
provider file, openstack cloud provider don't delete floatingip when
deleting LoadBalancer service.

**Release note**:
```release-note
NONE
```
2017-08-23 03:36:05 -07:00
Yu-Ju Hong 0d1efd5e78 GCE: add a new label "version" for metrics 2017-08-22 17:37:50 -07:00
Yu-Ju Hong 84c9c25edf GCE: Add functions for Alpha address and forwarding rules 2017-08-22 16:37:36 -07:00
Minhan Xia c04ba4eab5 add alpha api gate at gce cloud provider 2017-08-22 11:05:06 -07:00
Kubernetes Submit Queue e2685d800d Merge pull request #50706 from freehan/cloud-provider-op-v2
Automatic merge from submit-queue (batch tested with PRs 50967, 50505, 50706, 51033, 51028)

teach gce cloud to handle alpha/beta operations v2

Alternative to #50704 

This one feels cleaner. BUT, type assertion problems cannot be exposed at compile time. 

Please let me know what you think. This will set the precedence for consuming GCE alpha/beta API. 

cc: @thockin @yujuhong @saad-ali @MrHohn 

```release-note
NONE
```
2017-08-22 10:48:18 -07:00
FengyunPan 9bdf2cc0e7 Support for specifying external LoadBalancerIP on openstack
Fix #50851
Add ServiceAnnotationLoadBalancerInternal annotation to distinguish
between internal LoadBalancerIP and external LoadBalancerIP.
2017-08-22 20:40:56 +08:00
Kubernetes Submit Queue a4b719dcab Merge pull request #50640 from yujuhong/check-ips
Automatic merge from submit-queue (batch tested with PRs 50893, 50913, 50963, 50629, 50640)

gce external LB: add a function to verify the requested IP address

Factor out the logic for verifying the user-requested IP for better
readability and testing. Also rename a few variables for clarity.
2017-08-22 05:31:15 -07:00
Minhan Xia 25f8c946f5 teach gce cloud to handle alpha/beta operations 2017-08-21 10:58:10 -07:00
Yu-Ju Hong afcb948385 gce external LB: add a function to verify the requested IP address 2017-08-21 08:42:11 -07:00
FengyunPan e8fe9b65c5 Support ServiceAnnotationLoadBalancerFloatingNetworkId for LB v1 2017-08-21 07:48:07 +08:00
FengyunPan e5b7f0e7ba Fix legacy floatingip
If user specify floating-network-id by annotation rather than cloud
provider file, openstack cloud provider don't delete floatingip when
deleting LoadBalancer service.
2017-08-21 07:45:52 +08:00
jrperritt 21ce3de326 don't try to add pool id if pool doesn't exist 2017-08-19 07:36:38 -05:00
Kubernetes Submit Queue 9553e89a19 Merge pull request #50860 from wlan0/master
Automatic merge from submit-queue

Proposal to add @wlan0 to appropriate owner files

@thockin @luxas
2017-08-18 10:24:20 -07:00
Kubernetes Submit Queue c573d8192f Merge pull request #50255 from mattlandis/aws-duplicate-subnets
Automatic merge from submit-queue (batch tested with PRs 50255, 50885)

AWS: Arbitrarily choose first (lexicographically) subnet in AZ

When there is more than one subnet for an AZ on AWS choose arbitrarily
chose the first one lexicographically for consistency.



**What this PR does / why we need it**:
If two subnets were to be used appear in the same aws az which one is chosen is currently not consistent.  This could lead to difficulty in diagnosing issues.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-08-18 05:21:57 -07:00
Kubernetes Submit Queue 4e4168121a Merge pull request #50856 from shyamjvs/save-route-controller-memory
Automatic merge from submit-queue (batch tested with PRs 50303, 50856)

Make route-controller list only relevant routes instead of all of them

Ref https://github.com/kubernetes/kubernetes/issues/50854 (somewhat related issue)

IIUC from the code, route-controller memory is mainly being used in storing routes and nodes (also CIDRs, but that's not much).
This should help reduce that memory usage (particularly when running in a project with large no. of routes), by moving filtering to server-side.
For e.g in kubernetes-scale project we have ~5000 routes (each about 600B) => 3 MB of routes

This doesn't help with reducing time to list the routes as filtering is also linear.

cc @kubernetes/sig-scalability-misc @wojtek-t @gmarek
2017-08-18 03:37:53 -07:00
Kubernetes Submit Queue 7c13d65134 Merge pull request #50281 from FengyunPan/mark-detached-vsphere
Automatic merge from submit-queue

Mark volume as detached when node does not exist for vsphere

If node does not exist, node's volumes will be detached
automatically and become available. So mark them detached and
return false without error.
Fix #50266

**Special notes for your reviewer**:
/assign @jingxu97

**Release note**:
```release-note
NONE
```
2017-08-17 16:33:26 -07:00
Shyam Jeedigunta 0b1d548879 Make route-controller list only relevant routes instead of all of them 2017-08-17 20:39:59 +02:00
wlan0 92415f7dd7 Proposal to add @wlan0 to appropriate owner files 2017-08-17 11:37:51 -07:00