Commit Graph

334 Commits

Author SHA1 Message Date
chrislovecnm 53848f1f7f Work on cli documentation 2017-05-07 21:03:29 -06:00
Roberto J Rojas 4d4dcc7942 #1005 cmd: root, create, delete, edit, update and upgrade use of templates and i18n. 2017-04-26 16:02:03 -04:00
prashima 5c92bc6a2d Added featureflag for vSphere cloud. Fixes #26. (#29) 2017-04-20 23:37:40 -07:00
Abrar Shivani 5889814c90 Support for vSphere Cloud Provider 2017-04-20 23:33:21 -07:00
Miao Luo 4f98f5b47e Use CoreDNS for vSphere provider (#2)
* Add support of CoreDNS for vSphere provider.

* Add instructions about how to setup CoreDNS for vSphere provider.

* Address comments for CoreDNS support code.
2017-04-20 23:33:20 -07:00
Miao Luo 716349bf22 Fix the type of vSphere fields in CloudConfig and update auto-generated conversion files.
To make sure the vSphere fields in CloudConfiguration can be successfully serialized
and output into config file.
2017-04-20 23:33:18 -07:00
Miao Luo efdffd1c41 Address comments.
1. Check the emptiness of VSPHERE_USERNAME and VSPHERE_PASSWORD
2. Move vSphere specific fields from clusterSpec to clusterSpec.CloudConfig
2017-04-20 23:33:17 -07:00
Miao Luo 30573e9aaf Add more supports for vsphere.
Accept vSphere's server, datacenter, cluster setting by flags
"vsphere-server", "vsphere-datacenter", and "vsphere-resource-pool".
Username and password can be set by environment variables:
"VSPHERE_USERNAME" and "VSPHERE_PASSWORD".
2017-04-20 23:32:59 -07:00
dima bf06e36a4f change flag to --encrypt-etcd-storage=true 2017-04-19 13:27:56 +02:00
dima e7ddeb71ec add tests and fix existed for --encrypt-volume option 2017-04-03 14:47:28 +02:00
dima 0da368476a create encrypted volume during initiation cluster 2017-04-03 14:15:31 +02:00
Justin Santa Barbara c9f412f0c8 Add authorization flag
Also add AlwaysAllow to the schema
2017-03-29 13:53:06 -04:00
Justin Santa Barbara 4006741a5d Update for new taints / labels names 2017-03-27 23:13:39 -04:00
Justin Santa Barbara 7e8ed66620 Merge branch 'master' into tenancy 2017-03-27 21:31:16 -04:00
Robin Percy 4b030fed69 Added taints property to IG Spec.
- new property is only used when KubernetesVersion is 1.6 or greater
- taints are passed to kubelet via --register-with-taints flag
- Set a default NoSchedule taint on masters
- Set --register-schedule=true when --register-with-taints is used
- Changed the log message in taints.go to be less alarming if taints are
  found - since they are expected on 1.6.0+ clusters
- Added Taints section to the InstanceGroup docs
- Only default taints are allowed in the spec pre-1.6
- Custom taint validation happens as soon as IG specs are edited.
2017-03-25 18:36:00 -07:00
Daniel Cohen aa1205036d Specify instance tenancy on AWS
Allow tenancy to default to empty

Don't allow dedicated clusters to launch unsupported instances
2017-03-21 14:13:17 -04:00
Justin Santa Barbara cb4641fea3 Code updates 2017-03-16 02:40:50 -04:00
Robin Percy f9b3c5e584 Now applying the tags to IGs at render time.
- Previous method would have caused issues with the way tags are used
  for filtering resources.
- Updated docs and comments to only refer to instance groups, rather
  than all AWS resources
2017-02-23 06:10:15 -08:00
Robin Percy 7a1792e7cb go fmt fixes and apimachinery run 2017-02-22 09:51:18 -08:00
Robin Percy 6fa4acd49e Exposed cloud labels as a CLI option
- --cloud-labels will be applied to every kops-created resource
- Also ran apimachinery to regenerated the conversions for the new
  Cluster.ClusterLabels property.
2017-02-22 06:24:35 -08:00
Justin Santa Barbara 7d68f744f6 Initial support for cloudformation output 2017-02-17 10:59:16 -05:00
Justin Santa Barbara fa5066c073 Set bastion image when creating cluster
Fix #1901
2017-02-15 01:55:49 -05:00
Matthew Mihok bc235765d1 Adding basic flannel support 2017-02-11 16:26:18 -05:00
Stephen Schlie 991fc5bc7c Integrating Canal (Flannel + Calico) for CNI (#1459)
* Integrating Canal (Flannel + Calico) for CNI

Initial steps to integrate Canal as a CNI provider for kops

Removed CNI in help as per chrislovecnm

* Integration tests, getting closer to working

- Added some integration tests for Canal
- Finding more places Canal needed to be added
- Sneaking in update to Calico Policy Controller

* Add updated conversion file

* turned back on canal integration tests

* fixed some rebase issues

* Fixed tests and flannel version

* Fixed canal yaml, and some rebasing errors

- Added some env vars to the install-cni container to get the proper
  node name handed off

* Added resource limits

- set resource limits on containers for Canal
- Ran through basic calico tutorials to verify functionality

* Updating Calico parts to Calico 2.0.2
2017-02-11 11:03:23 -05:00
Justin Santa Barbara 5a4ddb2f8d create cluster: take correct k8s version
We were not overriding the cluster version, even when a kubernetes
version could be determined from the direct specifications.
2017-02-07 01:18:13 -05:00
Justin Santa Barbara 2d5fd877ad Add --master-count flag, to make it easy to run masters in the same AZ
* The master zones are the default set of zones unless explicitly set
* The master count is the number of master zones unless explicitly set
* We then round-robin around the zones
* We append a suffix -1, -2, -3 if there are more masters than zones
* We trim prefixes to keep etcd member names short

Fix #1653
2017-01-31 01:11:06 -05:00
Thomas Peitz 3b2f07e04b Use StrincSliceVar in create_cluster/Remove parsseZoneList 2017-01-30 18:58:49 +01:00
Thomas Peitz 510ec842c7 Rebase CreateClusterOptions 2017-01-30 18:58:48 +01:00
Thomas Peitz 96f71b8fab Allow additional NodeSecurityGroupIDs, MasterSecurityGroupIDs 2017-01-30 18:58:48 +01:00
Thomas Peitz 1f6b27c387 Rename parseZoneList method to parseInputList 2017-01-30 18:58:48 +01:00
Chris Love 97a4ba8c02 Merge pull request #1661 from justinsb/fix_1641
Allow specification of multiple CIDRs to create cluster
2017-01-29 01:28:28 -07:00
Justin Santa Barbara bd5d7c83a5 AssociatePublicIP defaults to nil
Rather than always setting it (incorrectly in many cases), we infer it
from the subnets.

Users can still set it, we just don't default it to a value we then
ignore.

Fix #1582
2017-01-28 21:40:31 -05:00
Justin Santa Barbara 7e232f14d8 Allow specification of multiple CIDRs to create cluster
Fix #1641
2017-01-28 15:58:50 -05:00
Chris Love 849815b638 Merge pull request #1601 from justinsb/validate_subnet_no_mixing
validation: Validate we specify ids for all subnets
2017-01-24 23:01:41 -07:00
Justin Santa Barbara bc4b143acc Merge pull request #1584 from justinsb/make_api_access_discoverable
Populate the API access fields, so they are discoverable
2017-01-25 00:16:57 -05:00
Justin Santa Barbara 9e015285f8 validation: Validate we specify ids for all subnets
Move our validation to the apimachinery style.  And then add a
validation that we specify IDs either for all subnets or no subnets.
2017-01-24 12:38:52 -05:00
Justin Santa Barbara 27d9ac4872 Populate the API access fields, so they are discoverable 2017-01-24 12:20:54 -05:00
Justin Santa Barbara 3e3e2d16ed Move cloud interaction out of cmd/kops, into cloudup
It didn't belong in the "CLI layer"

Arguably we should move most of the create logic out of the CLI layer.
2017-01-20 11:16:02 -05:00
Justin Santa Barbara 30ae86bb86 Automatically infer VPC & Subnet CIDRs
Issue #1492
2017-01-20 02:04:36 -05:00
Justin Santa Barbara 686e4efa3b Egress follow up
* Round trip to v1alpha1
* Enable test
2017-01-20 00:40:41 -05:00
Justin Santa Barbara 09cb9b654c Change int to int32 in API
We shouldn't be using the variable-sized int in the API
2017-01-15 18:23:44 -05:00
Justin Santa Barbara f70029cae0 Use update cluster from create cluster
We were trying to call but the result was subtly different (because of
different defaulting.)  The two code paths makes testing hard, so just
have one code path.
2017-01-09 20:49:35 -05:00
Justin Santa Barbara 41495f36fe Default bastion name should be bastion.<clusterName>
bastion-<clustername> is not necessarily in the same hosted zone, nor is
bastion-<dnszone>, and bastion-<dnszone> is not necessarily unique
across clusters.
2017-01-09 11:01:56 -05:00
Justin Santa Barbara 61011650dd Support private hosted zones in DNS 2017-01-09 09:32:52 -05:00
Justin Santa Barbara d62a7e0fb0 De-emphasize cni for private topologies
Fix #1373
2017-01-08 14:57:39 -05:00
Justin Santa Barbara 64924d81e7 Merge pull request #1377 from justinsb/conversion_tests
Add conversion tests, and fix some problems
2017-01-07 22:38:25 -05:00
Justin Santa Barbara 53135fa57e Add conversion tests, and fix some problems
* We were naming our etcd zones inconsistently
* When we wrote to v1alpha2, we would change the etc member names

Fix #1202
2017-01-07 21:54:15 -05:00
Kris Nova 336237e879 Bug fixes and bastion reworking 2017-01-05 07:45:52 -07:00
Justin Santa Barbara 56b07c04d9 Fix gofmt & calico autogen 2016-12-28 13:23:53 -05:00
Kris Childress 898f7e33d8 Default to bastion-$clustername for new bastion clusters 2016-12-25 19:29:39 -07:00
heschlie a4b7093b0d Calico integration
Adding the option to install Calico with the `--networking calico`
argument.  This will currently deploy Calico v2.0 to the cluster.

Documentation has also been updated with information about Calico and
where one can find more information or help.
2016-12-20 10:13:00 -08:00
Justin Santa Barbara 8ce09c65e9 Fixes per code review 2016-12-19 01:18:28 -05:00
Justin Santa Barbara a03ea54365 Rename SubnetName -> Name
No schema impact
2016-12-19 00:01:38 -05:00
Justin Santa Barbara aeef9dc6eb A few real-world fixes to create-cluster around initialization 2016-12-18 23:56:36 -05:00
Justin Santa Barbara 91b77ae11e Multi-version testing; fix few edge cases
By testing with data from various schema versions, we effectively check
that they are equivalent.

Also this uncovered a few places where we were not strictly ordering
things - add some sorts in there.
2016-12-18 23:14:29 -05:00
Justin Santa Barbara b7accc4abd Set subnet types, create bastion subnets 2016-12-18 21:56:57 -05:00
Justin Santa Barbara 031168f014 Populate zones when created a new cluster/subnet 2016-12-18 21:56:57 -05:00
Justin Santa Barbara 1ef2c367c1 Reintroduce subnet assignemnt logic 2016-12-18 21:56:57 -05:00
Justin Santa Barbara fed68310fa Schema v1alpha2
* Zones are now subnets
* Utility subnet is no longer part of Zone
* Bastion InstanceGroup type added instead
* Etcd clusters defined in terms of InstanceGroups, not zones
* AdminAccess split into SSHAccess & APIAccess
* Dropped unused Multizone flag
2016-12-18 21:56:57 -05:00
Justin Santa Barbara 9bfd067520 Simple integration test for create cluster
Calls create cluster command
Compares to expected YAML output
2016-12-17 23:20:03 -05:00
Justin Santa Barbara c01c2af656 Mark ObjectMeta as a named field
This will work around some apimachinery bugs
(https://github.com/kubernetes/client-go/issues/8)
2016-12-14 22:26:57 -05:00
Roberto J Rojas f7247ea834 Display SSH Public key being used. Fixes issue #1140 2016-12-13 15:03:17 -05:00
alok87 66d2e4791d IdleTimeout configurable from editcluster 2016-12-04 16:35:39 +05:30
alok87 91e332f759 Handled nil checks for attributes 2016-12-04 14:59:29 +05:30
alok87 fd51303622 Check for topology nil and bastionMachineType empty handle 2016-12-02 13:20:06 +05:30
alok87 d4eccb2688 Made bastion as part of TopologySpec 2016-12-01 09:56:45 +05:30
alok87 6b17c27572 Bastion Improvements 2016-11-23 12:37:42 +05:30
alok87 6206bc711e Separate configuration for bastion 2016-11-23 12:35:10 +05:30
alok87 2f1ebdea15 Enable/disable bastion, defaults to false 2016-11-23 12:31:51 +05:30
Justin Santa Barbara c3fd29a0e9 Logging cleanup 2016-11-19 16:23:51 -05:00
Justin Santa Barbara 76dc86ff49 Apply gofmt 2016-11-19 15:01:06 -05:00
chrislovecnm 19ea96e387 working on weave 2016-11-16 23:41:50 -05:00
chrislovecnm 4ae70c4fba why is this no worky 2016-11-16 21:11:12 -07:00
chrislovecnm a890390fbf updating bugs 2016-11-16 20:05:27 -05:00
chrislovecnm f8e10dc200 because these peeps do awesome code reviews 2016-11-16 16:39:35 -07:00
chrislovecnm 25ee1e4cdb adding weave support 2016-11-16 15:48:32 -07:00
Justin Santa Barbara b28701b70b Recognize kopeio-vxlan for use with private topologies 2016-11-16 14:20:27 -05:00
Justin Santa Barbara ee44353cde Add support for kopeio networking 2016-11-16 14:20:23 -05:00
Justin Santa Barbara ae84beddb7 Use more api machinery when writing 2016-11-13 22:11:36 -05:00
Justin Santa Barbara 933506bdbb Apply gofmt 2016-11-13 21:06:55 -05:00
Kris Childress b1febd9caf Stubbing out tests
- Fixing build errors
- Missed a privatemasters reference
- Fixing the nil pointer problem in SG awstask
2016-11-08 15:16:41 -08:00
Kris Childress c1644cc4e7 Remove refs to `privatemasters` 2016-11-08 15:16:41 -08:00
Kris Childress 5b81b86265 Documentation and CNI requirements
- Fixing topology.md (linting after review)
- Adding error message for a neglected --networking cni on private topologies
- Adding troubleshooting to documentation
2016-11-08 15:16:41 -08:00
Kris Childress e962f9c5fd Adding bastion support 2016-11-08 15:16:41 -08:00
Kris Childress 9bd9e30bdd Adding another large commit after a make codegen 2016-11-08 15:16:41 -08:00
Kris Childress a1c5c77b23 docs 2016-11-08 15:16:41 -08:00
Kris Childress 8fba14b85b Small refactor - getting ready to start YAML 2016-11-08 15:16:41 -08:00
Kris Childress 000e847af2 Topology Initial Commit
- Refactor private networking -> topology
- Define new topology models (no changes yet)
- Docs
- Create cluster --topology and -t
- New functions for topology templating
2016-11-08 15:16:41 -08:00
chrislovecnm 6e3bece0d0 adding model and options to handle cni networking 2016-10-19 09:20:36 -06:00
Justin Santa Barbara d832522b61 Fix flag description on dns-zone
Fix #674
2016-10-17 23:00:26 -04:00
Chris Love 6ceeb25d10 Merge pull request #654 from justinsb/govet_fixes
govet fixes; add govet makefile target
2016-10-15 21:00:36 -06:00
chrislovecnm 8fa2aac99f fixing more headers 2016-10-15 19:20:56 -06:00
Justin Santa Barbara 3f54852497 govet fixes; add govet makefile target 2016-10-15 13:25:31 -04:00
Justin Santa Barbara 542f8fb4f2 Refactor CLI to match kubectl approach
We have an Options class for each command, and a Run function that can
be called directly.
2016-10-11 09:47:11 -04:00
Justin Santa Barbara 5ac44018d4 Move API to pkg/apis/kops
This is a breaking change for people using the API (sorry), but is
hopefully a simple search and replace:

"k8s.io/kops/upup/pkg/api"
 -> api "k8s.io/kops/pkg/apis/kops"

"k8s.io/kops/upup/pkg/api/registry"
 -> "k8s.io/kops/pkg/apis/kops/registry"

This is the "correct" place for it in the k8s API infrastructure - we
are working towards a versioned API here.
2016-10-11 08:52:54 -04:00
Justin Santa Barbara 767c9a6416 Fix tests; don't hit s3 until we need to 2016-10-07 01:38:44 -04:00
Justin Santa Barbara afa8682dac Default ApplyClusterCmd to all the instance groups
Simpler, and ensures "one code path"
2016-10-07 01:13:26 -04:00
Justin Santa Barbara 5d255d17cb API example 2016-10-07 01:13:26 -04:00
Justin Santa Barbara f7fa324858 Initial k8s-style kops API
We try to emulate the k8s Clientset approach
2016-10-07 01:13:02 -04:00
Justin Santa Barbara 647618b755 Store channel in cluster, use it to determine version 2016-10-01 00:04:09 -04:00
Justin Santa Barbara addaf5e4b4 Don't add terraform to --out
Fix #486
2016-09-24 11:25:39 -04:00
Justin Santa Barbara ebf84d33d6 Merge pull request #273 from moleksyuk/master
Add no-public-ip option to instance groups
2016-09-08 11:45:43 -04:00
Justin Santa Barbara dff14fe283 Change default networking model to kubenet
Fix #400
2016-09-08 00:54:26 -04:00
Justin Santa Barbara ef1f64f308 Start cleaning up API: optional fields should be pointers 2016-09-08 00:49:40 -04:00
Justin Santa Barbara bf99d6b381 Prefer exitWithError to os.Exit 2016-09-06 10:22:58 -04:00
Justin Santa Barbara e1a4d6e609 Move CloudProvider not set error message 2016-09-06 10:21:35 -04:00
Mykhailo Oleksiuk ea532e3566 Rename --no-associate-public-ip to --associate-public-ip 2016-09-01 18:54:25 +03:00
Mykhailo Oleksiuk aa6693a6ed megre from upstream 2016-09-01 13:23:50 +03:00
Justin Santa Barbara dc63e307df Allow pluggable networking: classic, kubenet, external 2016-08-22 12:32:15 -04:00
Justin Santa Barbara 5fb39913cc If no changes are needed in an update, don't print a confusing message
Fix #208
2016-08-14 23:40:18 -04:00
Justin Santa Barbara 7cde6890a4 Export admin password in kubecfg
This is where users expects to find it, because it is how kube-up does
it.

Issue #166
2016-08-14 22:18:58 -04:00
Justin Santa Barbara 219c6e4308 Use the SSH key from the secret store
It is an error if there is not exactly one, but we have commands to
manage it now.
2016-08-11 12:00:46 -04:00
Mykhailo Oleksiuk fad3d3a4f4 move --no-associate-public-ip to instance group 2016-08-06 14:46:46 +03:00
Mykhailo Oleksiuk 0c96f5dd1d add parameter --no-public-ip 2016-08-05 17:21:15 +03:00
Mykhailo Oleksiuk 911092e419 rename parameter --disable-associate-public-ip to --no-public-ip 2016-08-05 17:08:25 +03:00
Mykhailo Oleksiuk a264bee96f add parameter --disable-associate-public-ip 2016-08-05 17:00:14 +03:00
Mykhailo Oleksiuk d3228dfec0 add parameter --disable-associate-public-ip 2016-08-05 12:57:33 +03:00
Mykhailo Oleksiuk 7984bfcb62 add parameter --disable-associate-public-ip 2016-08-04 18:34:18 +03:00
Mykhailo Oleksiuk ec122d54a6 add parameter --no-associate-public-ip 2016-08-04 18:17:40 +03:00
Mykhailo Oleksiuk a860fdbdfd add parameter --no-associate-public-ip 2016-08-04 17:19:20 +03:00
Justin Santa Barbara 39a3d71def Revert "Import SSH public key into the keystore"
This reverts commit bd3ab166b7.
2016-07-29 13:06:37 -04:00
Justin Santa Barbara bd3ab166b7 Import SSH public key into the keystore
This means it only needs to be specified during `kops create`.  We
remove the option from `kops update` for consistency.

This will shortly be manageable using the secrets functionality.

Fix #221
2016-07-29 00:45:37 -04:00
Justin Santa Barbara 2a43565e30 Fix typo: istance -> instance 2016-07-26 19:05:26 -04:00
Justin Santa Barbara 42d8a61d7c Fix build problem 2016-07-22 10:23:43 -04:00
Justin Santa Barbara 31892fb08d Refactor tests for cleaner separation 2016-07-22 10:19:01 -04:00
Justin Santa Barbara 2fa3bcc952 UX: Split create command into `create` and `update`
We separate out the `create cluster` operation from the `update cluster`
operation.  Now create cluster only creates the spec (unless you pass
--yes), and is only for new clusters.

`update cluster` works on new or existing clusters, and should be called
to apply changes.

`update` is not the best name, because it means something different in
kubectl, but I think it's a good start.
2016-07-21 11:54:09 -04:00
Justin Santa Barbara 302f23463e Configuration of admin access to ports 22 and master-443
Fix #143
2016-07-14 10:33:26 -04:00
Justin Santa Barbara 1102e7818d Perform as much validation as possible before writing a cluster config
This prevents us getting into a situation where an invalid cluster is
saved, and then cannot be deleted.
2016-07-14 09:54:21 -04:00
Justin Santa Barbara 4b3b0ab59a Don't export kubecfg if we're only doing a --dryrun
We don't have all the keys/certs yet!

Fix #136
2016-07-13 11:09:43 -04:00
Justin Santa Barbara df56204479 Export kubecfg after as create cluster by default
It is scoped to a particular context, so seems harmless, and users will
(almost?) always do it after creation.

Fix #129
2016-07-12 23:02:43 -04:00
Justin Santa Barbara 1d59f2aa80 Replace StateStore with a registry
StateStore was highly orientated towards a VFS system; replace it with a
Registry abstraction that is more object based.

We also rationalize much of the CLI (cmd) command logic also.
2016-07-11 00:07:59 -04:00
Justin Santa Barbara 9c07670d26 Don't force HA master by default
Users can still get HA master by explicitly specifying a list of
`--master-zones`.

But HA master is not as well tested, is slower, needs more machines etc
and we probably shouldn't silently force it as the default.

Fix #33
2016-07-05 12:23:47 -04:00
Justin Santa Barbara 58fbef0572 Apply gofmt 2016-07-01 10:02:30 -04:00
Justin Santa Barbara d8b661777b Merge cloudup tool into `kops create cluster` 2016-06-30 10:25:50 -04:00