Commit Graph

94 Commits (0e2c26829c2ea70e5bf36606b32725f43e3efb8c)

Author SHA1 Message Date
Nick Sardo 644aa69da7 Reserve internal address for ILBs 2017-08-30 11:46:07 -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
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
Saksham Sharma 3e11baf702 Add Google Cloud KMS plugin for encryption 2017-08-29 11:15:27 +05:30
Yu-Ju Hong 22b2da2378 update bazel 2017-08-28 18:40:20 -07: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
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
Yu-Ju Hong 0d1efd5e78 GCE: add a new label "version" for metrics 2017-08-22 17:37:50 -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
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
Erik McClenney ba974dbbc7 Add Kubernetes user agent to GCP API calls. 2017-08-16 11:37:24 -07:00
Jeff Grafton a7f49c906d Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
Jeff Grafton 33276f06be Use buildozer to remove deprecated automanaged tags 2017-08-11 09:31:50 -07:00
Minhan Xia 1cad829b6e add LocalZone into gce.conf and refactor gce cloud provider configuration to allow avoiding external communication 2017-08-07 18:01:49 -07:00
Kubernetes Submit Queue ceedc7813c Merge pull request #49167 from nicksardo/gce-static-unit-test
Automatic merge from submit-queue (batch tested with PRs 45813, 49594, 49443, 49167, 47539)

GCE: Adding unit test for ensureStaticIP

**What this PR does / why we need it**:
Entry into unit testing GCE loadbalancer code by testing `ensureStaticIP` which had a bug in 1.7.0.

@bowei @freehan @MrHohn @dnardo @thockin, any thoughts and comments on how we could unit test LB code moving forward? I think there are many areas we can split functions into smaller ones for easier testing - firewallNeedsUpdate being an example of that. However, it seems to me that we still need to mock our GCP calls for some functions that heavily revolve around API calls.  A dream goal would be to have a unit test that can call EnsureLoadBalancer.  Now that we have shared resources between different services and ingresses (firewalls, instance groups, [future features]), being able to setup different scenarios without depending on E2E tests would be awesome. However, I'm not sure how reachable that goal would be. 

Most importantly, let's not make things worse. If you have advice on anti-patterns to avoid, please speak up.

```release-note
NONE
```
2017-07-28 07:22:39 -07:00
Nick Sardo e71c51117a Adding unit test for ensureStaticIP 2017-07-26 13:24:08 -07:00
Jacob Simpson 29c1b81d4c Scripted migration from clientset_generated to client-go. 2017-07-17 15:05:37 -07:00
Minhan Xia 811597926a support GCE alpha beta API override 2017-07-12 13:46:52 -07:00
Saksham Sharma 57e8461662 Add Google cloudkms service to gce cloud provider 2017-06-28 16:56:01 -07:00
Chao Xu 60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Nick Sardo 7248c61ea5 Update test utilities & build file 2017-06-04 10:25:05 -07:00
deads2k 954eb3ceb9 move labels to components which own the APIs 2017-05-31 10:32:06 -04:00
Zihong Zheng 897da549bc Autogenerated files 2017-05-26 13:19:14 -07:00
Cheng Xing 2141b0fb80 Created unit tests for GCE cloud provider storage interface.
- Currently covers CreateDisk and DeleteDisk, GetAutoLabelsForPD
- Created ServiceManager interface in gce.go to facilitate mocking in tests.
2017-05-24 15:50:22 -07:00
Nick Sardo 729303f0de Watching ClusterId from within GCE cloud provider 2017-05-23 14:11:24 -07:00
Kubernetes Submit Queue ead8c98cdb Merge pull request #45987 from nicksardo/cloud-init-kubeclient
Automatic merge from submit-queue

Initialize cloud providers with a K8s clientBuilder

**What this PR does / why we need it**:
This PR provides each cloud provider the ability to generate kubernetes clients. Either the full access or service account client builder is passed from the controller manager. Cloud providers could need to retrieve information from the cluster that isn't provided through defined interfaces, and this seems more preferable to adding parameters.

Please leave your thoughts/comments.

**Release note**:
```release-note
NONE
```
2017-05-18 20:51:24 -07:00
Bowei Du c77ffb2685 Use beta GCP API instead of alpha in CloudCIDR controller
The feature we are using has been promoted to beta.
2017-05-17 16:18:29 -07:00
Nick Sardo 87a5edd2cd Initialize cloud providers with a K8s clientBuilder 2017-05-17 14:38:25 -07:00
Bowei Du ee847ebf8a Add metrics to all major gce operations {latency, errors}
The new metrics is:

  cloudprovider_gce_api_request_duration_seconds{request, region, zone}
  cloudprovider_gce_api_request_errors{request, region, zone}

`request` is the specific function that is used.
`region` is the target region (Will be "<n/a>" if not applicable)
`zone` is the target zone (Will be "<n/a>" if not applicable)

Note: this fixes some issues with the previous implementation of
metrics for disks:
- Time duration tracked was of the initial API call, not the entire
  operation.
- Metrics label tuple would have resulted in many independent
  histograms stored, one for each disk. (Did not aggregate well).
2017-04-27 12:49:30 -07:00
Mike Danese a05c3c0efd autogenerated 2017-04-14 10:40:57 -07:00
Bowei Du f5be63e0f7 Add PodCIDRs API for GCE (Google cloud alpha feature) 2017-04-10 12:05:02 -07:00
Hemant Kumar c4aaf47282 Implement API usage metrics for gce
This PR implements tracking of GCE API usage via prometheus metrics.
2017-03-28 16:33:21 -04:00
Bowei Du dc1e614a72 Split the GCE cloud provider into more managable chunks
Each major interface is now in its own file. Any package private
functions that are only referenced by a particular module was also moved
to the corresponding file. All common helper functions were moved to
gce_util.go.

This change is a pure movement of code; no semantic changes were made.
2017-03-23 14:40:16 -07:00
deads2k 5a8f075197 move authoritative client-go utils out of pkg 2017-01-24 08:59:18 -05:00
deads2k c47717134b move utils used in restclient to client-go 2017-01-19 07:55:14 -05:00
deads2k 6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Jeff Grafton 20d221f75c Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
Mike Danese 161c391f44 autogenerated 2016-12-29 13:04:10 -08:00
Mike Danese c87de85347 autoupdate BUILD files 2016-12-12 13:30:07 -08:00
Clayton Coleman 5df8cc39c9
refactor: generated 2016-12-03 19:10:46 -05:00
Chao Xu bcc783c594 run hack/update-all.sh 2016-11-23 15:53:09 -08:00
Mike Danese 3b6a067afc autogenerated 2016-10-21 17:32:32 -07:00