Commit Graph

1749 Commits

Author SHA1 Message Date
Arto Jantunen 53669b8217 Make ELB somewhat mockable 2017-11-28 11:48:57 +02:00
Rodrigo Menezes 2594d382ae Merge remote-tracking branch 'upstream/master' into additional_cidr 2017-11-27 23:30:42 -08:00
Kubernetes Submit Queue 967ed4acf5
Merge pull request #3928 from justinsb/kopeio_auth
Automatic merge from submit-queue.

Update kopeio auth
2017-11-27 15:02:12 -08:00
Rodrigo Menezes f908dcb3bf Check and docs 2017-11-26 20:37:16 -08:00
Kubernetes Submit Queue 0ade1dd2c4
Merge pull request #3822 from gambol99/dns_controller_optional
Automatic merge from submit-queue.

DNS Controller Optional

The current implementation enforces a dns-controller is running; given the user can switch the make the kube-apiserver server Internal and then reuse the dns for the masterInternalName; this effectlively removes the need to run the service (assuming your not using it for pods, node and service dns)

- adding a disableDnsController to the ExternalDNS spec provides a toggle on the addon (name is definitely up for debate)
- the default behaviour remains, the dns-controller is always pushed as an addon
2017-11-26 15:03:47 -08:00
Justin Santa Barbara d0944714f4 Update kopeio auth 2017-11-26 15:32:14 -05:00
Justin Santa Barbara e3c7f03aaa Avoid generating a CA keypair on-demand
Instead we must explicitly create it; this avoids races where we are
reading the private key and creating CA certs.

Issue #3875
2017-11-25 23:12:55 -05:00
Justin Santa Barbara b05faa0068 Set SleepDelay function in AWS
Works around nil SleepDelay problem: latest aws-sdk-go (in k8s 1.9 and
kops 1.8) has updated SleepDelay logic; fix is in
https://github.com/kubernetes/kubernetes/pull/55307 but that is only in
1.9.

Set the SleepDelay to work around the problem.
2017-11-22 16:50:19 -05:00
Kubernetes Submit Queue 8eac358795
Merge pull request #3869 from chrislovecnm/calico-2.6-update
Automatic merge from submit-queue.

Updating Calico manifests to Calico release 2.6.2

Renamed the k8s-1.8 manifest to a k8s-1.7. This is required because of config
change that occurs between k8s 1.6 and k8s 1.7. This refactor will also
be re-used when Calico Kubernetes data source support is added to kops.
Updated bootstrapchannelbuilder with the new Calico version numbers.

The diffs for the k8s-1.6 version is pretty rough, tried to make it cleaner, but nada.

FIXES: https://github.com/kubernetes/kops/issues/3866
FIXES: https://github.com/kubernetes/kops/issues/3867

Line: https://github.com/kubernetes/kops/compare/master...chrislovecnm:calico-2.6-update?expand=1#diff-891cbc61587adb202b66b7c9bc6896daR209  is why Calico would not start on k8s 1.6 - thanks @caseydavenport 

 **TODO**
Testing K8s versions

- [x] test 1.5
- [x] test 1.6
- [x] test 1.7
- [x] test 1.8

/cc @blakebarnett @itajaja
2017-11-22 10:20:04 -08:00
chrislovecnm 3067a21341 Updating Calico manifests to Calico release 2.6.2.
Renamed the k8s-1.8 manifest to a k8s-1.7. This is required because of config
change that occurs between k8s 1.6 and k8s 1.7. This refactor will also
be re-used when Calico Kubernetes data source support is added to kops.
Updated bootstrapchannelbuilder with the new Calico version numbers.
2017-11-22 09:45:21 -07:00
Justin Santa Barbara 1b58585c8c
Merge pull request #3892 from romana/romana-networking-update
Version and validation updates for romana networking.
2017-11-22 11:25:35 -05:00
Kubernetes Submit Queue e5194cf08b
Merge pull request #3904 from zengchen1024/generate_codes_for_cinder_volume_tasks
Automatic merge from submit-queue.

generate gazelle for cinder volume tasks

for issue #3886
2017-11-22 00:25:29 -08:00
zengchen1024 769a9e9dbb update gazelle 2017-11-22 14:29:14 +08:00
Kubernetes Submit Queue cabe97230f
Merge pull request #3887 from georgebuckerfield/fix-routetable-deletion
Automatic merge from submit-queue.

Respect the shared tag when deleting route tables

Fixes #3828.

Modifies the `buildTrackerForRouteTable` function (used by `ListRouteTables`) to set the `Shared` field of each returned route table resource, based on the presence of the `kubernetes.io/cluster/<clustername>: shared` tag. This prevents route tables with this tag from being deleted.

WIP while I add some more tests.
2017-11-21 21:05:31 -08:00
Kubernetes Submit Queue ae94d14e54
Merge pull request #3893 from zengchen1024/cinder_volume_task
Automatic merge from submit-queue.

Implement volume task for Openstack platform

Implement volume task to create volume for ETCD cluster.
Which issue this PR fixes: #3886
2017-11-21 15:00:13 -08:00
Kashif Saadat 79eef3cc6c Support replacing kops secrets via force flag 2017-11-21 11:47:03 +00:00
Rohith 4816ed5e36 DNS Controller Optional
The current implementation requires enforces a dns-controller is running; given the user can switch the make the kube-apiserver server Internal and then reuse the dns for the masterInternalName; this effectlively removes the need to run the service (assuming your not using it for pods, node and service dns)

- adding a disableDnsController to the ExternalDNS spec provides a toggle on the addon (name is definitely up for debate)
- the default behaviour remains, the dns-controller is always pushed as an addon
2017-11-20 22:06:50 +00:00
zengchen1024 0949d597b7 build volume task 2017-11-20 11:52:19 +08:00
zengchen1024 f1d673f77e implement volume task 2017-11-20 09:42:55 +08:00
georgebuckerfield eab351c913 Add tests for ListRouteTables function 2017-11-18 12:34:39 +00:00
Caleb Gilmour 04ef7ee0a3 Version and validation updates for romana networking. 2017-11-16 23:37:04 +00:00
Tom Denham 9dfe9443c0
Bump all flannel versions to latest release - v0.9.1 2017-11-16 12:29:59 -07:00
Kubernetes Submit Queue a84f086544
Merge pull request #3851 from justinsb/calico_on_other_versions_also
Automatic merge from submit-queue.

Apply gossip dns changes to 1.8 calico version also
2017-11-14 02:06:45 -08:00
Justin Santa Barbara dedf88c52b Apply gossip dns changes to 1.8 calico version also 2017-11-14 03:14:15 -05:00
marshallbrekka 5aea1d2484 Mount /etc/hosts in calico containers for gossip based DNS. 2017-11-14 02:23:59 -05:00
Justin Santa Barbara 0ce39f26b4 Regenerate gazelle 2017-11-14 02:02:40 -05:00
Kubernetes Submit Queue 17487a4853
Merge pull request #3820 from zengchen1024/add_openstack_cloud
Automatic merge from submit-queue.

add openstack cloud provider

Add an Openstack cloud provider. It does not implement all the interfaces of fi.Cloud, hence, can not create a cluster, but it can pass the work flow of creating cluster for the command like "kops create cluster --cloud openstack --zones nova -v 15 --target direct --yes myoscluster4.k8s.local"
Which issue this PR fixes: #3819
2017-11-13 22:19:23 -08:00
Giacomo Tagliabue b7a16a28cc add version map 2017-11-13 17:52:35 -05:00
Giacomo Tagliabue 3719d15c6b update templates and bootstrapper 2017-11-13 17:11:10 -05:00
Giacomo Tagliabue af64c2894c update calico template 2017-11-13 17:11:10 -05:00
zengchen1024 76b9aebafb update hack/.package 2017-11-13 17:03:30 +08:00
zengchen1024 f9c98c3b4c add openstack cloud provider 2017-11-13 16:59:24 +08:00
Justin Santa Barbara 148a65e1ad Fix CNI CPU allocations
* Limit each CNI provider to 100m

* Remove CPU limits - they cause serious problems
(https://github.com/kubernetes/kubernetes/issues/51135), but this also
makes the CPU allocation less problematic.

* Bump versions and start introducing the `-kops.1` suffix preemptively.

* Upgrade flannel to 0.9.0 as it fixes a lot.
2017-11-13 01:28:40 -05:00
Kubernetes Submit Queue f1fddb5512
Merge pull request #3620 from murali-reddy/remove-beta-init-container
Automatic merge from submit-queue.

kube-router: remove beta annotation versions (deprectated in 1.8) of init container

kube-router: remove beta annotation versions (deprectated in 1.8) of init container and move init container to spec section
2017-11-10 10:08:38 -08:00
Kubernetes Submit Queue aab07e365b
Merge pull request #3794 from shamil/patch-2
Automatic merge from submit-queue.

Add support for C5 instance family

AWS [released](https://aws.amazon.com/blogs/aws/now-available-compute-intensive-c5-instances-for-amazon-ec2) 5th generation of Compute oriented EC2 series. This PR adds support for them.
2017-11-10 01:14:33 -08:00
Rodrigo Menezes 255305b8ef Let a user use the hostname or set a hostnameOverride when the cloud provider is aws 2017-11-08 23:59:21 -08:00
Kubernetes Submit Queue 531d21018b
Merge pull request #3802 from KashifSaadat/canal-1.8-tolerations
Automatic merge from submit-queue.

Update tolerations in Canal spec so the pods can run on all nodes.
2017-11-08 12:06:56 -08:00
Kashif Saadat f7dbcf0978 Update tolerations so the pods can run on all nodes. 2017-11-08 17:06:49 +00:00
Rohith 260124d1d9 DNS Controller Watch Command line
- adding a fix to the building of the argument, as the double quote cause an yaml parsing error
  error building tasks: error remapping manifest addons/dns-controller.addons.k8s.io/pre-k8s-1.6.yaml: error parsing yaml: error converting YAML to JSON: yaml: line 37: did not find expected key
2017-11-08 15:00:39 +00:00
Alex Simenduev a99844ffb9 machine_types: go formatting 2017-11-08 12:20:53 +02:00
Alex Simenduev 304d7229d5
Add support for C5 instance family 2017-11-08 10:50:38 +02:00
Kashif Saadat 657a91729e Update Canal to use Calico v2.6.2. 2017-11-07 09:26:18 +00:00
Justin Santa Barbara 9b71713d68 Tag 1.8.0-beta.1 2017-11-06 23:24:51 -05:00
Justin Santa Barbara 7066368f5c
Merge pull request #2063 from pdh/additional-sans
Allows additional Subject Alternate Names
2017-11-06 22:51:52 -05:00
chrislovecnm 609e268a1d gazelle updates with new bazel version 2017-11-05 17:41:53 -07:00
chrislovecnm 5c300e6cb9 bazel updates 2017-11-04 20:55:38 -06:00
chrislovecnm 74b33ea6ff moving code that is not supported by windows 2017-11-04 20:50:19 -06:00
chrislovecnm 1e418c3e13 more goimport updates 2017-11-04 10:03:02 -06:00
pdh fc6f33db24 Allows additional Subject Alternate Names 2017-11-02 10:26:03 -07:00
chrislovecnm 4fd4bb8d0e subnet test not correct, not sure now 2017-11-01 13:48:12 -06:00
chrislovecnm 8d1ee1fa16 updating files for goimports 2017-11-01 12:51:43 -06:00
Kubernetes Submit Queue ed2f269b5b
Merge pull request #3748 from justinsb/log_google_application_credentials_path
Automatic merge from submit-queue.

GCE: log when loading from GOOGLE_APPLICATION_CREDENTIALS
2017-11-01 08:55:26 -07:00
Kubernetes Submit Queue 08c34b6eb4
Merge pull request #3184 from justinsb/test_does_not_change_tags
Automatic merge from submit-queue.

Fix shared subnet/vpc tags
2017-11-01 08:23:29 -07:00
Justin Santa Barbara ba9ec6aebc GCE: log when loading from GOOGLE_APPLICATION_CREDENTIALS 2017-10-31 20:31:21 -04:00
Justin Santa Barbara 9c005d785b GCE: Use CloudPlatformScope when requesting a token 2017-10-31 17:26:56 -04:00
Kubernetes Submit Queue 101e6e03f3
Merge pull request #3737 from justinsb/storageacl_comments
Automatic merge from submit-queue.

Fix log messages from storage acl tasks
2017-10-31 13:20:30 -07:00
Justin Santa Barbara 95fa47b9a9 Fix log messages from storage acl tasks
The messages were ambiguous at best, wrong at worst.
2017-10-30 23:46:06 -04:00
Justin Santa Barbara bfe3766de3 GCE: log the service account & scopes in use
Once we figure out why e2e is failing we can likely make this optional
(e.g. only with v=2 or above)
2017-10-30 23:45:23 -04:00
Justin Santa Barbara 2eb47b82ce Tolerate errors from Find for tasks with WarnIfInsufficientAccess
We glog.Warning a message, and we record a structured warning for future
use, but we allow operation to continue.
2017-10-30 01:56:41 -04:00
Justin Santa Barbara b2bcba4a6d GCE: Use object-level permissions for files in GCS
This lets us configure cross-project permissions while ourselves needing
minimal permissions, but also gives us a nice hook for future lockdown
of object-level permissions.
2017-10-29 19:17:00 -04:00
Justin Santa Barbara d1ee8026ac GCE: Tasks for object & bucket level permissions
We also switch to setting a bucket-level ACL permission, as this
requires less permissions.
2017-10-29 18:08:08 -04:00
Kubernetes Submit Queue efcf7e0bc7
Merge pull request #3723 from justinsb/consistent_error_messaging
Automatic merge from submit-queue.

Fix error message in StorageBucketIam task
2017-10-29 15:02:25 -07:00
Kubernetes Submit Queue 4a43f2f55f
Merge pull request #3724 from justinsb/fix_lifecycle_comment
Automatic merge from submit-queue.

Fix comment on Lifecycle constant
2017-10-29 14:30:05 -07:00
Justin Santa Barbara c14113a585 Apply goimports formatting to upup/pkg/fi/cloudup/gcetasks/ 2017-10-29 13:39:33 -04:00
Justin Santa Barbara 235ba5de18 Fix comment on Lifecycle constant 2017-10-29 13:30:54 -04:00
Justin Santa Barbara 19ca67e8e9 Fix error message in StorageBucketIam task
We want to include the entity both for consistency, and because it's
important information!
2017-10-29 13:29:57 -04:00
Justin Santa Barbara 3981f24626 Use compute API to fetch default service account directly
Requires less permissions and is more correct.
2017-10-28 13:02:42 -04:00
Kubernetes Submit Queue e38f2a5166
Merge pull request #3715 from dvavili/p3-support
Automatic merge from submit-queue.

Updates for p3 machine type

Adding support for P3 instances on AWS
2017-10-28 07:46:06 -07:00
Kubernetes Submit Queue 4162ae1e3b
Merge pull request #3712 from justinsb/storage_acls_minimal
Automatic merge from submit-queue.

GCE: Set up permissions for cross-project configurations
2017-10-28 07:15:19 -07:00
Divya Vavili b4bb1c98ec Updates for p3 machine type 2017-10-28 03:16:05 -07:00
Justin Santa Barbara 15dedf8e79 Updates from running gazelle 2017-10-28 03:27:18 -04:00
Justin Santa Barbara dbbe3f373b GCE: Set up permissions for cross-project configurations
This ensures that the cluster can read the kops state store files, even
if the GCS bucket is in a different project.

We automatically set up an IAM access policy that grants access.
2017-10-28 03:24:18 -04:00
chrislovecnm 4711d1596e update to imports that apimachinery is doing now automatically 2017-10-27 14:28:48 -06:00
Kubernetes Submit Queue a4d6895472 Merge pull request #3707 from andrewsykim/droplet
Automatic merge from submit-queue.

Implement DigitalOcean Droplet FI Task

Implements cloudup fi tasks for DigitalOcean droplets. It makes a few assumptions to reduce the size of this PR, those will be addressed in future PRs. 

Also does some cleanup in the DigitalOcean `dns` package.
2017-10-27 08:30:57 -07:00
andrewsykim 45bf2cb3a7 Implement DigitalOcean Droplet FI Task 2017-10-27 09:48:42 -04:00
Kubernetes Submit Queue 66f7400b06 Merge pull request #3581 from wongnai/master
Automatic merge from submit-queue.

UsePolicyConfigMap for kube-scheduler

Continued from #3546 

In this version, a single option `usePolicyConfigMap` is added that will install scheduler.addons.k8s.io, which contains a default configmap.
2017-10-26 20:11:09 -07:00
Kubernetes Submit Queue 1f4224b50d Merge pull request #3472 from chrislovecnm/global-rate-limiter
Automatic merge from submit-queue.

adding kubernetes core rate limiter handlers

This PR is re-using the handlers from the k8s core project, to create a global rate limiting.

This work starts work on https://github.com/kubernetes/kops/issues/3471
2017-10-26 19:03:26 -07:00
Manatsawin Hanmongkolchai a708919bf4 Generate scheduler policy by dynamic cluster addons 2017-10-27 08:56:07 +07:00
chrislovecnm 6dc953c3d4 adding kubernetes core regional global rate limiter that spans all calls 2017-10-26 17:46:21 -06:00
chrislovecnm dc338c4829 Refactoring phases to work in sequence properly 2017-10-26 13:17:34 -06:00
chrislovecnm 384c74d66c Refactoring IAM phase to Security Phase 2017-10-26 12:28:50 -06:00
chrislovecnm 4179c76513 updates to generate go-bin-data 2017-10-25 19:41:47 -06:00
Kubernetes Submit Queue 8df13bd468 Merge pull request #3679 from justinsb/support_api_aggregation
Automatic merge from submit-queue.

Initial aggregation work

Create the keypairs, which are supposed to be signed by a different CA.
    
Set the `--requestheader-...` flags on apiserver.
    
Fix #3152
Fix #2691
2017-10-24 12:08:27 -07:00
Mike Splain e000d21673 Add a v1.7.0 storage addon resource.
Fixes #3298
2017-10-23 22:11:28 -04:00
Kubernetes Submit Queue 760da7eeba Merge pull request #3637 from justinsb/bump_kopeio_networking
Automatic merge from submit-queue.

Bump kopeio networking to 20171015
2017-10-23 12:09:56 -07:00
Justin Santa Barbara 9cf22aeeef Sort Tags consistently to avoid test flakes 2017-10-23 11:39:18 -04:00
Justin Santa Barbara a7f82a6380 Fix shared subnet/vpc tags
* Stop setting the Name tag on a shared subnet/vpc

* Stop setting the legacy KubernetesCluster tag on a shared subnet/vpc
that is new enough (>=1.6); we rely on the shared tags instead

* Set tags on shared subnets; i.e. we _do_ set the shared tag on a
shared subnet; that is important for ELBs

* Set tags on shared VPCs; i.e. we _do_ set the shared tag on a shared
VPC; that is not used but consistent with subnets.

* Add tests for shared subnet
2017-10-23 11:30:25 -04:00
Justin Santa Barbara 15d50aff48 Update tests; add to bazel 2017-10-23 00:42:56 -04:00
Justin Santa Barbara 4bd997496d Grant kubelets system:node role in 1.8
This is an interim measure until we fully support the NodeAuthorizer and
dynamic kubelet bootstrapping.

Issue #3551
2017-10-23 00:34:24 -04:00
Justin Santa Barbara 88d2374f19 Fix typo in SessionAffinity terraform field 2017-10-22 16:55:55 -04:00
Justin Santa Barbara a879521ba3 Initial aggregation support
Create the keypairs, which are supposed to be signed by a different CA.

Set the `--requestheader-...` flags on apiserver.

Fix #3152
Fix #2691
2017-10-22 14:41:38 -04:00
Justin Santa Barbara dfa89c096e Bump kopeio networking to 20171015 2017-10-20 23:12:15 -04:00
Kubernetes Submit Queue 3315d29bdb Merge pull request #3630 from wlan0/api
Automatic merge from submit-queue.

Add Cloud Controller Manager addon

This adds the CCM addon for the Kubernetes cluster. 

This is a follow-up PR to https://github.com/kubernetes/kops/pull/3408. 

cc @chrislovecnm @andrewsykim
2017-10-20 19:07:50 -07:00
wlan0 d3143ec3cc add Cloud Controller Manager addon 2017-10-19 12:33:44 -07:00
chrislovecnm 3a7a4ebf7c fixing bazel testing for upup 2017-10-17 13:53:40 -06:00
Kubernetes Submit Queue b4c4afb8e7 Merge pull request #3657 from justinsb/missing_bazel_1
Automatic merge from submit-queue.

Fix misssing bazel dependency
2017-10-17 10:45:01 -07:00
Justin Santa Barbara 1d5a19b30c Fix misssing bazel dependency
Forgot to run gazelle again
2017-10-17 11:44:17 -04:00
Justin Santa Barbara 552d04589e Avoid spurious mirror tasks in plan 2017-10-17 09:59:50 -04:00
Kubernetes Submit Queue 1d5b2814d9 Merge pull request #3623 from KashifSaadat/canal-v2.5
Automatic merge from submit-queue.

Add Calico v2.5 support for Kubernetes v1.8+

Added support for Canal (Calico) v2.5.1, which is required to work with Kubernetes v1.8.0+.

Older versions of Calico relied on ThirdPartyResources API to store it's config data, however this is now fully deprecated in Kubernetes v1.8 and has moved over to CustomResourceDefinitions (CRD). Calico v2.5+ has been updated to use CRD, however there is a manual upgrade process involved to migrate the configuration data across: https://github.com/projectcalico/calico/blob/master/upgrade/v2.5/README.md
2017-10-16 19:51:08 -07:00
Bryan Boreham e2357f8568 Add critical-pod annotation and toleration for rescheduler
Background at
https://kubernetes.io/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/

Note the extra toleration is not strictly necessary, because
rescheduler adds CriticalAddonsOnly with effect NoSchedule, so it's
covered by the existing toleration, but that isn't documented so going
by the book we add both.
2017-10-16 13:50:10 +00:00
Kashif Saadat 6d624c7ad5 Add Calico v2.5 support for Kubernetes v1.8+ 2017-10-16 12:23:53 +01:00
Kubernetes Submit Queue 2c2f9fd6cd Merge pull request #3632 from justinsb/kopeio_cricial
Automatic merge from submit-queue.

kopeio-vxlan: mark critical, remove cpu limit
2017-10-15 14:44:57 -07:00
Justin Santa Barbara 0d7e72e43c kopeio-vxlan: mark critical, remove cpu limit 2017-10-15 14:30:44 -04:00
Justin Santa Barbara a6ab7c3c61 GCE: Install correct storage class
We only want to install the AWS storage class on AWS, and on GCE we want
to install the GCE storage class.
2017-10-14 11:36:58 -04:00
Murali Reddy 2c7d85f480 Remove beta annotation versions (deprectated in 1.8) of init containers and move init
container to spec section
2017-10-13 02:29:36 +05:30
Bryan Boreham 88e001f88e Update to Weave Net 2.0.5
including a Weave Net template for Kubernetes 1.7 and above which adds
a volume-mount for the iptables lock file, which avoids collisions
between Weave components and kube-proxy that would result in a
half-configured Weave network.

This is only for version 1.7 and above because it requires the change
in https://github.com/kubernetes/kubernetes/issues/47212
2017-10-12 11:08:44 +00:00
Kubernetes Submit Queue 4c4f12b262 Merge pull request #3588 from justinsb/sort_tf_literals
Automatic merge from submit-queue.

Sort terraform literals in ELB task
2017-10-10 22:24:59 -07:00
Justin Santa Barbara e063af8d5a Sort terraform literals in ELB task
Fixes #3578
2017-10-11 00:01:11 -04:00
Justin Santa Barbara d71bd09a6c GCE: Limit length of InstanceTemplate
We explicitly set a separate prefix for the names, and we ensure it is
not too long
2017-10-10 09:48:38 -04:00
Kubernetes Submit Queue 211dab152a Merge pull request #3522 from murali-reddy/3463-kube-router-rbac
Automatic merge from submit-queue.

Use system:kube-router User for clusterrole binding

Kube-router as it provides service proxy as well, it has a chicken-egg problem (can not
access api server till it can setup service proxy), so service account are not usable. certificate generated for kube-router has CN `system:kube-router`, so user  `system:kube-router` need to be given necessary RBAC permissions

Fixes #3463
2017-10-09 00:14:03 -07:00
Justin Santa Barbara af6a7ef4d8 Containerized mounter fixes per code review 2017-10-08 11:41:09 -04:00
Justin Santa Barbara 3a38d05385 GCE: install containerized mounter on COS
The containerized mounter is a little tricky to install, with lots of
bind mounts.  This code path is only hit on GCE though.
2017-10-08 11:12:37 -04:00
Kubernetes Submit Queue f42b1f676f Merge pull request #3538 from mikesplain/fix_kube_dns_pre_1.6
Automatic merge from submit-queue.

Fix CVE for kube-dns pre k8s 1.6

Additional fix for https://github.com/kubernetes/kops/issues/3512.

Testing now
2017-10-06 14:54:06 -07:00
Murali Reddy a43df55540 Certificate generated for kube-router has CN system:kube-router, so user
system:kube-router need to be given necessary RBAC permissions

Fixes #3463
2017-10-05 21:29:11 +05:30
Kubernetes Submit Queue 7397370f1e Merge pull request #3533 from justinsb/gce_rolling_update_special_restart
Automatic merge from submit-queue.

GCE: use recreateInstance when rolling a MIG
2017-10-04 18:42:13 -07:00
Mike Splain 2195da0f15 Fix CVE for kube-dns pre k8s 1.6 2017-10-04 15:23:31 -04:00
Justin Santa Barbara 8693683324 GCE: use recreateInstance when rolling a MIG 2017-10-04 02:54:40 -04:00
Justin Santa Barbara deff8d32c9 GCE: strip prefixes from Zone & MIG Name
Fixes bug where MIGs were not matched correctly.
2017-10-04 00:20:09 -04:00
Justin Santa Barbara ed25d60947 bazel: update for concurrent chages 2017-10-03 10:39:06 -04:00
Kubernetes Submit Queue 518e97d97b Merge pull request #3510 from justinsb/bazel
Automatic merge from submit-queue.

Initial bazel support

Builds on the 1.8 version bump

The "trick" is to strip the BUILD & BUILD.bazel files from the vendor-ed deps.

Will rebase after 1.8 version bump merges.
2017-10-03 01:19:27 -07:00
Kubernetes Submit Queue 48e61b9523 Merge pull request #3507 from justinsb/gce_rolling_update
Automatic merge from submit-queue.

rolling-update - initial GCE support
2017-10-03 00:05:03 -07:00
Justin Santa Barbara 737f2fcd80 rolling-update - initial GCE support 2017-10-02 23:07:35 -04:00
Mike Splain 538e351160 Fix silly typo from
6ea6e3aa3f (diff-d41e15155acd41a0ecf59ccd3d3309a3)
2017-10-02 15:12:52 -04:00
Justin Santa Barbara 0143be7c4f autogen: BUILD and BUILD.bazel 2017-10-02 14:27:21 -04:00
Kubernetes Submit Queue 6ea6e3aa3f Merge pull request #3511 from mikesplain/update_kube_dns_to_1.14.5
Automatic merge from submit-queue.

Update kube-dns to 1.14.5 for CVE-2017-14491

As described: https://security.googleblog.com/2017/10/behind-masq-yet-more-dns-and-dhcp.html

Not sure if it'd be possible to cut a new 1.7 release with this or something to give people a quick fix.

Current work around would be to manually update the addons in s3.  For those who may reference this, simply upgrading to 1.7.7 will not fix this in kops.

### Edit

~ @chrislovecnm

Please see https://github.com/kubernetes/kops/issues/3512 for more information on how to address these concerns with current kops releases.  We are still in the process of testing this release of kube-dns, which is a very critical component of kubernetes.
2017-10-02 10:32:16 -07:00
Mike Splain db995fc416 Update kube-dns to 1.14.5 for CVE-2017-14491 2017-10-02 12:14:54 -04:00
Justin Santa Barbara 544990842a More fixes for 1.8 API changes 2017-10-01 23:02:32 -04:00
Justin Santa Barbara 95d4f3eb59 More code updates for 1.8 2017-10-01 21:13:00 -04:00
Justin Santa Barbara 3478031533 API types changed package 2017-10-01 14:03:56 -04:00
Justin Santa Barbara 0c89c9851e Simple code updates for 1.8 breakages 2017-10-01 13:17:40 -04:00
Kubernetes Submit Queue 0905e71741 Merge pull request #3411 from justinsb/mirror_stores
Automatic merge from submit-queue.

Mirror keystore & secretstore
2017-09-30 23:08:33 -07:00
Kubernetes Submit Queue 2406e28404 Merge pull request #3486 from justinsb/use_iskubernetesgte_helper
Automatic merge from submit-queue.

Use IsKubernetesGTE helper instead of reparsing semver
2017-09-30 21:57:44 -07:00
Kubernetes Submit Queue 84891f39c7 Merge pull request #3492 from justinsb/fix_receiver_name
Automatic merge from submit-queue.

golint: rename two receievers for awsCloudImplementation
2017-09-30 20:44:55 -07:00
Kubernetes Submit Queue bd4ba4de8e Merge pull request #3487 from justinsb/cleanup_comment_maxtaskduration
Automatic merge from submit-queue.

Clean up comment on MaxTaskDuration
2017-09-30 20:08:24 -07:00
Justin Santa Barbara a4a58d277d Mirroring - Fixes from code review 2017-09-30 22:05:14 -04:00
Justin Santa Barbara df93d82bd8 Use IsKubernetesGTE helper instead of reparsing semver 2017-09-30 21:21:24 -04:00
Kubernetes Submit Queue 852455afed Merge pull request #3439 from justinsb/gce_zones_in_instancegroup
Automatic merge from submit-queue.

Add Zones field to InstanceGroup

The Zones field can specify zones where they are not specified on a
Subnet, for example on GCE where we have regional subnets.
2017-09-30 18:17:32 -07:00
Kubernetes Submit Queue 0ef1b697af Merge pull request #3493 from justinsb/dry_getgroups
Automatic merge from submit-queue.

Minor cleanups to #3446

Felt easier than iterating in PR comments!
2017-09-30 17:19:35 -07:00
Justin Santa Barbara 7fd1196708 Add Zones field to InstanceGroup
The Zones field can specify zones where they are not specified on a
Subnet, for example on GCE where we have regional subnets.
2017-09-30 19:44:35 -04:00
Justin Santa Barbara da99a7270d Subnets on GCE are regional, create one per region
We also make the subnet zone and CIDR optional on GCE
2017-09-30 19:22:14 -04:00
Kubernetes Submit Queue 0b97571545 Merge pull request #3480 from justinsb/gce_fix_migs_size_0
Automatic merge from submit-queue.

Support GCE MIGs of size 0
2017-09-30 15:25:45 -07:00
Justin Santa Barbara abd48ee653 Name CloudInstanceGroupMember consistently
Keep the naming of the type consistent.
2017-09-30 17:39:53 -04:00
Justin Santa Barbara 8280c4f9d3 Remove MarkIsReady function, calculate on demand
Avoids setting the trap of failing to call MarkIsReady
2017-09-30 17:39:53 -04:00
Justin Santa Barbara a5d72ca190 DRY FindAutoscalingGroups by removing from resources pkg 2017-09-30 17:39:53 -04:00
Justin Santa Barbara 44e67c4f93 DRY mock-aws cloudinstances functions 2017-09-30 17:39:53 -04:00
chrislovecnm c9cc561885 refactoring FindInstanceTemplates into gce cloud interface 2017-09-30 14:02:58 -06:00
Justin Santa Barbara cc97557096 golint: rename two receievers for awsCloudImplementation
Keep the receiver name the same
2017-09-30 12:21:46 -04:00
Justin Santa Barbara afa3753bcf Clean up comment on MaxTaskDuration 2017-09-30 02:12:29 -04:00
Justin Santa Barbara 2e39109ff7 Support GCE MIGs of size 0 2017-09-29 21:46:20 -04:00
chrislovecnm a431eb3e43 refactoring to use cloud based GetGroups 2017-09-29 12:29:07 -06:00
chrislovecnm 93f3600f36 adding aws_cloud instancegroups delete and get methods 2017-09-28 15:52:50 -06:00
chrislovecnm db5b931579 Adding three new funcs for cloud providers, for refactoring delete and
get
2017-09-28 15:52:49 -06:00
Justin Santa Barbara 7166365006 GCE: Ignore Lifecycle in forwarding rule 2017-09-25 22:26:50 -04:00
Kubernetes Submit Queue 3ddbf3e695 Merge pull request #3383 from haad/addon-external-dns
Automatic merge from submit-queue. .

Add external-dns as addon.

This superseeds route53mapper as it has multicloud support documentation and YAML taken from https://github.com/kubernetes-incubator/external-dns
2017-09-24 23:51:08 -07:00
Justin Santa Barbara e98edff7bd GCE: Avoid nil dereference on new GCE networks
Non-legacy GCE networks don't have a CIDR
2017-09-24 20:53:44 -04:00
Justin Santa Barbara e08dfc6831 Fix tests: create helper function for PopulateClusterSpec 2017-09-24 00:09:09 -04:00
Justin Santa Barbara 559d885480 Mirror keystore & secretstore
This allows us to have our API objects in kops-server, but our
configuration on S3 or GCS.
2017-09-24 00:09:02 -04:00
Kubernetes Submit Queue dcd0406b64 Merge pull request #3437 from chrislovecnm/fixing-logging
Automatic merge from submit-queue. .

getting rid of uneeded logging in ux

Logging cleanup
2017-09-23 20:28:59 -07:00
Kubernetes Submit Queue e97efcc4f9 Merge pull request #3436 from justinsb/mock_aws_should_use_same_providerid
Automatic merge from submit-queue. .

AWS mock provider should use the AWS cloudprovider id
2017-09-23 19:47:41 -07:00
Kubernetes Submit Queue a7fccedf5e Merge pull request #3406 from justinsb/baremetal_relax_to_create_objects
Automatic merge from submit-queue. .

baremetal: fill out more of the baremetal mappings
2017-09-23 18:39:27 -07:00
Kubernetes Submit Queue 9ffa37ac6b Merge pull request #3435 from justinsb/gce_network_mode_custom
Automatic merge from submit-queue. .

Create GCE networks in auto mode, not legacy mode

auto mode allows for conversion to custom mode at the API level, and
legacy mode is deprecated.
2017-09-23 18:03:41 -07:00
chrislovecnm 9754d2e4a4 getting rid of uneeded logging in ux 2017-09-23 18:54:02 -06:00
Justin Santa Barbara bde0c46b10 AWS mock provider should use the AWS cloudprovider id
Otherwise our tests get a little confused; for example they weren't
outputing the Terraform provider block.
2017-09-23 20:52:54 -04:00
Justin Santa Barbara ecc78c06bd Create GCE networks in auto mode, not legacy mode
auto mode allows for conversion to custom mode at the API level, and
legacy mode is deprecated.
2017-09-23 16:32:52 -04:00
Justin Santa Barbara 73dd870118 GCE integration test: verify TF output 2017-09-23 16:27:15 -04:00
Justin Santa Barbara e730e043ab Add function to get etcd status
This will allow us to permit changing the etcd configuration only if
etcd has not yet been configured.
2017-09-22 23:27:26 -04:00
Justin Santa Barbara 45032502c6 baremetal: fill out more of the baremetal mappings
This gets us to the point where we can create the objects.
2017-09-22 23:03:07 -04:00
Kubernetes Submit Queue b3f26f8cd0 Merge pull request #3206 from felipejfc/calico-portmap
Automatic merge from submit-queue. .

Support for using hostPort when using calico

For enabling hostPort we need to turn on portmap cni plugin.
In this PR I updated calico and calico-cni images to latest version which already includes the portmap binary, and then I only needed to modify the cni config file to enable it and change its extension from .conf to .conflist.

This is related to:
https://github.com/kubernetes/kops/issues/3132

I think we should do the same for kube-router, flannel and weave (are there any other cni plugin supported by kops?)
2017-09-22 13:08:41 -07:00
Kubernetes Submit Queue e96c13b10e Merge pull request #3330 from gambol99/limit_dns_controller
Automatic merge from submit-queue. .

DNS Controller Limitation

The current implementation does not place any limitation on the dns annontation which the dns-controller can consume. In a multi-tenented environment we have to ensure certain safe guards are met, so users can't by accident or intentionally alter our internal dns. Note; the current behaviour has not been changed;

- added the --watch-namespace option to the dns controller and WatchNamespace to the spec
- cleaned up area of the code where possible or related
- fixed an vetting issues that i came across on the journey
- renamed the dns-controller watcher files
2017-09-22 10:25:04 -07:00
Kubernetes Submit Queue 79cc0fce41 Merge pull request #3393 from justinsb/hcl_print_on_error
Automatic merge from submit-queue. .

Dump invalid HCL if we hit it
2017-09-22 09:49:37 -07:00
Justin Santa Barbara fa1be5371c Dump invalid HCL if we hit it 2017-09-22 09:29:21 -04:00
Rohith b64795673d DNS Controller Limitation
The current implementation does not place any limitation on the dns annontation which the dns-controller can consume. In a multi-tenented environment was have to ensure certain safe guards are met, so users can't byt accident or intentionally alter our internal dns. Note; the current behaviour has not been changed;

- added the --watch-namespace option to the dns controller and WatchNamespace to the spec
- cleaned up area of the code where possible or related
- fixed an vetting issues that i came across on the journey
- renamed the dns-controller watcher files
2017-09-22 11:37:00 +01:00
Kubernetes Submit Queue e0aa4e8bef Merge pull request #3405 from justinsb/remove_aws_gce_tag_options
Automatic merge from submit-queue. .

Remove unused GCE/AWS options
2017-09-21 22:24:54 -07:00
Kubernetes Submit Queue 0756ece56f Merge pull request #3421 from KashifSaadat/canal-config-options
Automatic merge from submit-queue. .

Support additional config options for Canal Networking

Add support for additional global and iptables configuration options within the Canal Networking Spec: https://docs.projectcalico.org/v2.4/reference/felix/configuration

- **ChainInsertMode:** Controls whether Felix inserts rules to the top of iptables chains, or appends to the bottom. Leaving the default option is safest to prevent accidentally breaking connectivity. Default: 'insert' (other options: 'append')
- **PrometheusMetricsEnabled:** Set to enable the experimental Prometheus metrics server (default: false)
- **PrometheusMetricsPort:** TCP port that the experimental Prometheus metrics server should bind to (default: 9091)
- **PrometheusGoMetricsEnabled:** Enable Prometheus Go runtime metrics collection
- **PrometheusProcessMetricsEnabled:** Enable Prometheus process metrics collection
2017-09-21 08:20:49 -07:00
Kubernetes Submit Queue c3379df06b Merge pull request #3409 from justinsb/clientset_secret_stores
Automatic merge from submit-queue. .

SecretStore and CAStore implementations backed by API
2017-09-20 23:33:48 -07:00
Kubernetes Submit Queue 80928386e8 Merge pull request #3404 from justinsb/gce_instancetemplate_matching
Automatic merge from submit-queue. .

GCE: Prevent instancetemplate spurious mismatches
2017-09-20 12:51:57 -07:00
Kashif Saadat f1109dbf29 Support additional config options for Canal Networking 2017-09-20 15:44:02 +01:00
Kubernetes Submit Queue e55947139e Merge pull request #3407 from justinsb/baremetal_further
Automatic merge from submit-queue. .

baremetal: more wiring up
2017-09-18 23:47:07 -07:00
Kubernetes Submit Queue 751855025b Merge pull request #3401 from justinsb/gce_change_detection_logic
Automatic merge from submit-queue. .

GCE: Fix logic around change detection

We need to ignore the Lifecycle field
2017-09-18 23:00:28 -07:00
Justin Santa Barbara d9a3c46b0b Clientset fixes per code review 2017-09-17 23:22:14 -04:00
Justin Santa Barbara 914fe68ee2 SecretStore and CAStore implementations backed by API
Not yet wired in
2017-09-17 23:01:13 -04:00
Justin Santa Barbara f157cccf85 baremetal: more wiring up
This lets us get further on a kops update
2017-09-17 15:17:57 -04:00
Justin Santa Barbara 17f0f44012 Remove unused GCE/AWS options
Another step closer to removing the tags
2017-09-17 14:52:34 -04:00
Justin Santa Barbara 487b83a8ca GCE: Prevent instancetemplate spurious mismatches
The lack of a Kind on the networkInterface was causing the
InstanceTemplate to be considered dirty.
2017-09-17 14:25:23 -04:00
Justin Santa Barbara 0e03fb61ad GCE: Ignore the Lifecycle field for change detection
Not copying the Lifecycle field causes spurious changes to be detected.
2017-09-17 14:11:36 -04:00
Justin Santa Barbara 055f510c6f Create minimal mock GCECloud, first test
We test create cluster - we actually have an issue with the length of
the names on longer cluster names; first step is to get test coverage.
2017-09-16 11:02:30 -04:00
Adam Hamsik 2f89143e4f Bump feature flag version for external-dns addon. 2017-09-16 13:05:55 +02:00
Felipe Cavalcanti c443bb2c1d bump calico version in bootstrap channel, so that kops will apply calico portmap compatibility to existing clusters 2017-09-15 13:17:50 -03:00
Kubernetes Submit Queue 5cb443d4a9 Merge pull request #3290 from romana/romana-networking-option
Automatic merge from submit-queue

Add romana to built-in CNI options

This PR adds `romana` as a networking option for kops.

It installs the latest "preview" release of Romana v2.0, which provides the expected features in terms of IP allocations and route configuration. Network policy features are being ported to 2.0 and will be in the final release. (We intend to submit a followup PR for kops as part of that rolling out that release.)

Note: in this setup, we're using the etcd cluster that kops deploys for k8s. This isn't ideal, but some possibilities (eg: StatefulSets) aren't practical for the CNI itself, and creating a parallel etcd cluster via manifests seemed to be a more-intrusive approach than using the existing one.
If this is a concern or problem, then I'm very open to discussing and implementing it based on your suggestions.

Also, some functionality is exclusive to AWS environments. Other cloud platforms are on Romana's roadmap but not developed yet. Let me know that restriction needs to be enforced in code or directly documented.
2017-09-14 20:43:05 -07:00
Kubernetes Submit Queue 593f444297 Merge pull request #3359 from justinsb/delete_more_secrets
Automatic merge from submit-queue

Support for deleting tokens & keypairs
2017-09-14 19:30:08 -07:00
Kubernetes Submit Queue 9ebe302939 Merge pull request #3291 from justinsb/baremetal_1
Automatic merge from submit-queue

Skeleton bare-metal provider
2017-09-14 15:55:59 -07:00
Kubernetes Submit Queue 2363a36f49 Merge pull request #3300 from justinsb/fingerprint_variable_rename
Automatic merge from submit-queue

Warn if SSH fingerprint is obviously bad
2017-09-14 15:22:05 -07:00
Justin Santa Barbara 0769d218dc Fxies per code review 2017-09-14 09:33:06 -04:00
Caleb Gilmour 79d331e590 Add support for Romana as a networking option 2017-09-13 22:48:18 +00:00
Kubernetes Submit Queue 26e1cb06bf Merge pull request #3190 from justinsb/flannel_vlxan
Automatic merge from submit-queue

Flannel: change default backend type

We support udp, which has to the default for backwards-compatibility,
but also new clusters will now use vxlan.
2017-09-12 19:03:17 -07:00
Justin Santa Barbara f463a8e30e Add docs for flannel-vxlan option 2017-09-12 20:53:00 -04:00
Kubernetes Submit Queue 721ba52139 Merge pull request #3287 from gambol99/toolbox_template
Automatic merge from submit-queue

Toolbox template

Extending the current implementation of toolbox template to include multiple files and snippets. Note, I've removed the requirements for defaults as I think people should be forced to specifically pass them

- allowing the users to use a snippets directory for reusable templates
- allows the users to specify multiple templates files via multiple --template <path>, use a directory or both
- allows the users to specify multiple configuration files via multiple --values <path>,  use a directory or both
- adding a safety check to ensure templates don't reference an unknown values
- fixing the vetting issues to the method YamlToJson -> YAMLToJSON
- as usual anything a saw on the journey which doesn't comply with go-vet got changed

Examples of a snippet

```YAML
hooks:
  - name: some_service.service
    manifest: |
      {{ include "some_service.service" . | indent 6 }}
```
We currently use something similar to template our cluster and instances group documents, handling the differences between prod, ci and ephemeral
2017-09-10 14:04:05 -07:00
Justin Santa Barbara 106875115d Support for deleting tokens & keypairs
This now allows for deleting all secrets, which means we can have a
procedure for rotating all keys.
2017-09-09 01:04:45 -04:00
Kubernetes Submit Queue ae51cfef95 Merge pull request #3336 from justinsb/nodeportaccess
Automatic merge from submit-queue

nodePortAccess, experimental spec override flag
2017-09-08 15:40:01 -07:00
Rohith aaf6143a98 Toolbox Templating
Extending the current implementation of toolbox template to include multiple files and snippets. Note, i've removed the requirements for defaults as I think people should be forced to specifically pass them.

- fixing the vetting iseues to the method YamlToJson -> YAMLToJSON
- adding a safety check to ensure templates don't reference an unknown value
- extending the unit test to ensure the above works on main and snippets
- include the ability to specify multiple configuration files, useful for common.yaml and prod.yaml etc

Requested Changes - Toolbox Templating

Added the requested changes

- moved the templater into it's own package rather than using base util
- moved to using the sprig library for additional template function
- @note: i couldn't find a native way in sprig to do snippets, also the i've overloaded the indent as it appears to do the indent on all lines rather than on the newline, meaning i'd have to shift my first line back by the indent to get it to work, which seems ugly
2017-09-08 20:30:21 +01:00
Kubernetes Submit Queue 08410fdca9 Merge pull request #3314 from Pharb/fix_3313_ebs_optimization
Automatic merge from submit-queue

Check actual EbsOptimized status during cluster update

Fixes #3313.

It seems like the actual EbsOptimized state of the LaunchConfiguration is not read during `kops update cluster` and always trigges a modification of instance-groups that have `rootVolumeOptimization: true`.

If any meaningful test can be created for this, please let me know.
2017-09-06 12:13:46 -07:00
Justin Santa Barbara 8b168f5419 Fix RenderGCE issue on Address
Fix regression in #3292
2017-09-04 16:41:12 -04:00
Justin Santa Barbara 9d31ed1b08 nodePortAccess, experimental spec override flag
This will allow us to set CIDRs for nodeport access, which in turn will
allow e2e tests that require nodeport access to pass.

Then add a feature-flagged flag to `kops create cluster` to allow
arbitrary setting of spec values; currently the only value supported is
cluster.spec.nodePortAccess
2017-09-04 14:27:31 -04:00
Justin Santa Barbara 15d6834113 Flannel: support choosing a backend type
We support udp, which has to the default for backwards-compatibility,
but also new clusters will now use vxlan.
2017-08-30 21:16:21 -04:00
Justin Santa Barbara 8e68be7932 Skeleton bare-metal provider
Just creating the provider, it isn't wired in yet.
2017-08-30 21:10:46 -04:00
Bradley cf1a907d0e Fixes #3317 allowing to spawn flannel on all nodes in the cluster 2017-08-30 14:58:01 +01:00
Patrick Harböck 8db87d20cd Check actual EbsOptimized status during cluster update 2017-08-30 00:30:00 +02:00
Eric Hole 673cdf6b5f Fixes merge conflicts 2017-08-28 19:10:21 -07:00
Justin Santa Barbara 9f8ef34f75 Warn if SSH fingerprint is obviously bad
In particular this catches double-encoding
2017-08-28 11:22:19 -04:00
Kubernetes Submit Queue 327235a22c Merge pull request #3288 from justinsb/refactor_pki
Automatic merge from submit-queue

Refactor PKI classes into their own package
2017-08-28 07:01:27 -07:00
Kubernetes Submit Queue 1cba2a2346 Merge pull request #3292 from chrislovecnm/gce-change-to-interface
Automatic merge from submit-queue

Implementing GCE as an interface - modelling aws cloud provider

GCE and other cloud providers are structs instead of an interface.  AWS cloud provider implements an interface.  This PR refactors `GCECloud` as an interface, and creates `gceCloudImplementation`.

- [x] Need to e2e test
2017-08-28 05:54:57 -07:00
Kubernetes Submit Queue f123138665 Merge pull request #3281 from justinsb/aws_session_always_verbose
Automatic merge from submit-queue

AWS: Always use verbose errors
2017-08-28 04:32:16 -07:00
Kubernetes Submit Queue 1aef760d86 Merge pull request #3272 from KashifSaadat/canal-custom-endpoint-to-host-action
Automatic merge from submit-queue

Allow user defined endpoint to host action for Canal

Adds ability to define `Networking.Canal.DefaultEndpointToHostAction` in the Cluster Spec. This allows you to customise the behaviour of traffic routing from a pod to the host (after calico iptables chains have been processed). `ACCEPT` is the default value and is left as-is.

`If you want to allow some or all traffic from endpoint to host, set this parameter to “RETURN” or “ACCEPT”. Use “RETURN” if you have your own rules in the iptables “INPUT” chain; Calico will insert its rules at the top of that chain, then “RETURN” packets to the “INPUT” chain once it has completed processing workload endpoint egress policy.`
2017-08-28 02:31:00 -07:00
chrislovecnm 0779fb6fc4 Implementing GCE as an inteface modelling aws cloud provider 2017-08-27 22:19:25 -06:00
Justin Santa Barbara a16c8b1500 Refactor PKI classes into their own package
This will support generation of keys on the node.
2017-08-27 08:14:55 -04:00
Kubernetes Submit Queue 908722ac94 Merge pull request #3284 from georgebuckerfield/refactor-apiserver-templates
Automatic merge from submit-queue

Refactor apiserver templates

Fixes #3247 by moving the apiserver configuration out of template files and into code.
2017-08-26 17:39:19 -07:00
Kashif Saadat 2ffc790c66 Added validation to Networking Canal spec. 2017-08-26 12:53:44 +01:00
Kashif Saadat d9e4a62994 Allow user defined endpoint to host action for Canal 2017-08-26 12:53:44 +01:00
georgebuckerfield 58960f39cd Move etcd config for apiserver into code, set cloud provider for Digital Ocean to external 2017-08-26 08:23:19 +01:00
Justin Santa Barbara a26b28576e AWS: Always use verbose errors
As otherwise very difficult to diagnose errors
2017-08-25 23:08:39 -04:00
Justin Santa Barbara cc6fb51f91 Merge pull request #3255 from alrs/replace-deprecated-aws-session-new
Replace deprecated aws session.New() with session.NewSession()
2017-08-25 23:01:51 -04:00
georgebuckerfield ff7f60dc35 Initial work on moving apiserver templates into code 2017-08-26 00:32:28 +01:00
Lars Lehtonen c26f4b31f0
Return existing struct in awsup error conditions 2017-08-25 13:14:58 -07:00
Murali Reddy 9b8f74d569 remove --cluster-cidr from manifest.
Kube-router was using --cluster-cidr flag to get the subnet allocated
for pod CIDR's. But now kube-router has the ability internally to infer
the CIDR allocated for the pod's by getting the information from
kubernetes API server node spec's
2017-08-25 01:21:51 +05:30
Kubernetes Submit Queue 4edc267fb8 Merge pull request #3090 from gambol99/file_assets
Automatic merge from submit-queue

Cluster / InstanceGroup File Assets

@chrislovecnm @justinsb ... 

The current implementation does not make it ease to fully customize nodes before kube install. This PR adds the ability to include file assets in the cluster and instaneGroup spec which can be consumed by nodeup. Allowing those whom need (i.e. me :-)) greater flexibilty around their nodes. @Note, nothing is enforced, so unless you've specified anything everything is as the same

- updated the cluster_spec.md to reflect the changes
- permit users to place inline files into the cluster and instance group specs
- added the ability to template the files, the Cluster and InstanceGroup specs are passed into context
- cleaned up and missed comment, unordered imports etc along the journey

notes: In addition to this; need to look at the detecting the changes in the cluster and instance group spec. Think out loud perhaps using a last_known_configuration annotation, similar to kubernetes
2017-08-22 19:49:48 -07:00
Kubernetes Submit Queue 2d7fb51c2a Merge pull request #3025 from chrislovecnm/mapping-and-uploading-kubernetes-assets
Automatic merge from submit-queue

inventory assets - mapping and uploading kubernetes containers
2017-08-22 19:15:31 -07:00
Lars Lehtonen afea9d05c5
Replace deprecated aws session.New() with session.NewSession() 2017-08-22 17:28:55 -07:00
andrewsykim 0411ba270e Create cluster requirements for DigitalOcean 2017-08-22 09:01:19 -04:00
chrislovecnm 6071ce7383 refactoring for tracking via assets container registry 2017-08-21 17:29:16 -06:00
chrislovecnm 7efb0f31f6 updating phases 2017-08-21 15:17:34 -06:00
chrislovecnm 2afdb5ab2e mapping-and-uploading-kube-assets 2017-08-21 15:16:56 -06:00
Kubernetes Submit Queue 0eabaa863f Merge pull request #3207 from KashifSaadat/delete-old-cloud-labels
Automatic merge from submit-queue

Delete old tags when cloudLabels / labels / taints are removed

If you remove custom cloudLabels/labels/taints from the cluster configuration, kops does not correctly update the AWS resources to delete the tags. This seems to be because it only calls the AWS API method `CreateOrUpdateTags`, which won't remove tags that aren't in the supplied list.

The current behaviour is that every `kops update cluster` will show a tag difference but never successfully apply the changes (remove the extra tags).

This PR will perform a diff of the current and expected tags, and call the `DeleteTags` API if there are any tags to delete.
2017-08-21 10:53:14 -07:00
Kubernetes Submit Queue 19d34b852f Merge pull request #3242 from KashifSaadat/awstasks-lifecycle-property
Automatic merge from submit-queue

Set lifecycle on ElasticIP and NAT Gateway tasks to avoid spurious changes

Identified in issue #476
Extension of fixes within PR #3226
2017-08-21 10:20:31 -07:00
andrewsykim 525fde3609 implement digitalocean volumes task 2017-08-21 09:50:36 -04:00
Kashif Saadat b79f310d6b Set lifecycle on ElasticIP and NAT Gateway tasks to avoid spurious changes 2017-08-21 08:43:59 +01:00
Kubernetes Submit Queue 9c86800207 Merge pull request #3085 from chrislovecnm/file-asset-tasks
Automatic merge from submit-queue

starting work on file assets builder

I refactored to the dockerassets pkg to assetstasks, in order to not add yet another package.  Added file copy task, that I have tested with s3 locally, but not certain how to add memfs tests.

Fixes: https://github.com/kubernetes/kops/issues/3086
2017-08-20 08:21:06 -07:00
Kashif Saadat 1574b19798 Correctly delete cloud labels that are no longer present in the expected resources (cloudLabels, labels, taints). 2017-08-19 09:19:02 +01:00
Kubernetes Submit Queue a3fdefa74c Merge pull request #3041 from justinsb/it_shared_vpc_and_subnet
Automatic merge from submit-queue

Add integration tests for shared subnet & VPC
2017-08-18 15:55:53 -07:00
chrislovecnm ee17e6567c starting work on file assets builder 2017-08-18 13:04:12 -06:00
Rohith c15221c872 - adding a Roles filter to the file assets to choose who gets the asset 2017-08-18 18:06:44 +01:00
Rohith 2c9b27370e - using the nodetask rather than the direct MkdirAll 2017-08-18 18:06:44 +01:00
Rohith aa1a92c60e Cluster / InstanceGroup File Assets
The current implementation does not make it ease to fully customize nodes before kube install. This PR adds the ability to include file assets in the cluster and instaneGroup spec which can be consumed by nodeup. Allowing those whom need (i.e. me :-)) greater flexibilty around their nodes. @Note, nothing is enforced, so unless you've specified anything everything is as the same

- updated the cluster_spec.md to reflect the changes
- permit users to place inline files into the cluster and instance group specs
- added the ability to template the files, the Cluster and InstanceGroup specs are passed into context
- cleaned up and missed comment, unordered imports etc along the journey
2017-08-18 18:06:44 +01:00
Felipe Cavalcanti 73ac4ca809 support for using hostPort when using calico cni 2017-08-18 13:13:27 -03:00
Kubernetes Submit Queue 429004fdf1 Merge pull request #3162 from tmjd/update-calico-2-4-0
Automatic merge from submit-queue

Update to Calico 2.4.1

- Switch Calico images to be pulled from quay.io

Addresses #3161
2017-08-17 15:09:36 -07:00
Kubernetes Submit Queue e3d6b15b53 Merge pull request #3187 from tmjd/update-canal-2-4-1
Automatic merge from submit-queue

Update Canal to the latest

Update Calico and Flannel versions
- Calico to v2.4.1
- Flannel to v0.8.0

The #3161 issue should be reviewed for the Default Deny NetworkPolicy behavior change this PR brings along.
2017-08-17 10:24:03 -07:00
Kubernetes Submit Queue d96e1870cf Merge pull request #3148 from justinsb/validation_cleanup
Automatic merge from submit-queue

Rework legacy validation to use field error helpers
2017-08-17 05:47:31 -07:00
Justin Santa Barbara 9c5d4c2bdc Rework legacy validation to use field error helpers 2017-08-17 07:43:41 -04:00
Kashif Saadat 34486b027c Correctly set lifecycle on DNSName, LoadBalancer and LoadBalancerAttachment resources 2017-08-17 10:42:38 +01:00
Kubernetes Submit Queue 0620cce89e Merge pull request #3063 from gambol99/hook_order
Automatic merge from submit-queue

Cluster Hooks Enhancement

Cluster Hook Enhancement

The current implementation is presently limited to docker exec, without ordering or any bells and whistles. This PR extends the functionality of the hook spec by;

- adds ordering to the hooks, with users able to set the requires and before of the unit
- cleaned up the manifest code, added tests and permit setting a section raw
- added the ability to filter hooks via master and node roles
- updated the documentation to reflect the changes
- extending the hooks to permit adding hooks per instancegroup as well cluster
- @note, instanceGroup are permitted to override the cluster wide one for ease of testing
- on the journey tried to fix an go idioms such as import ordering, comments for global export etc
- @question: v1alpha1 doesn't appear to have Subnet fields, are these different version being used anywhere?
2017-08-14 04:24:46 -07:00
Kubernetes Submit Queue 7942869729 Merge pull request #3176 from gambol99/etcv3
Automatic merge from submit-queue

Etcd v3 Support

Etcd V3 Support
    
The current implementation is running v2.2.1 which is two years old and end of life. This PR adds the ability to use etcd v3 and set the versions if required. Note at the moment the image is still using the gcr.io registry image and much like Etcd TLS PR there presently is no 'automated' migration path from v2 to v3.
    
- the feature is gated behind the version of the etcd cluster, both clusters events and main must use the same storage type
- the version for v2 is unchanged and pinned at v2.2.1 with v3 using v3.0.17
- @question: we should consider allowing the user to override the images though I think this should be addressed generically, than one offs here and then. I know @chrislovecnm is working on a asset registry??
2017-08-12 08:07:48 -07:00