Commit Graph

237 Commits

Author SHA1 Message Date
Justin Santa Barbara 4545352c00 Don't rolling-update all masters at once
Also add force command to rolling-update, for testing sanity.

Fix #284
2016-08-16 12:53:37 -04:00
Justin Santa Barbara 9b7291ab24 A few nodeup cleanups
* Correctly identify user tasks as a dependency for services
* Cleaned up flag-walking
2016-08-16 10:10:44 -04:00
Justin Santa Barbara 5d8c170360 Rename old upgrade command; make new upgrade intuitive
The old upgrade command (which was only called as part of a kube-up ->
kops upgrade) is now `kops toolbox convert-imported`.  The docs are
updated, but this is only normally called once per import so this should
not be high impact.

The upgrade command now looks for things that need upgrading.  Currently
only `upgrade cluster` is implemented; it currently only checks the
KubernetesVersion.  If KubernetesVersion is out of date, it will be
printed, and if --yes is specified the cluster spec will be set to the
next value.
2016-08-16 09:28:36 -04:00
Justin Santa Barbara 6f52c099ef Merge pull request #316 from justinsb/lock_k8s_version
Set KubernetesVersion on cluster creation
2016-08-15 23:12:05 -04:00
Justin Santa Barbara 201e6c05a9 Set KubernetesVersion on cluster creation
This is the only remaining "magic" setting, which changes externally
- when new versions of k8s are released.  (The AMIs are locked in the
instance groups)

We now record the current version of KubernetesVersion in the cluster
spec.  It can still easily be changed if needed, but this also means we
don't need to make "fake" changes.
2016-08-15 22:02:44 -04:00
Justin Santa Barbara 6aee9528e1 Validate that the cluster name is a valid DNS name
This should help users avoid the common mistake of just specifying the
name, not a fully-qualified domain name.

Fix #46
2016-08-15 01:21:12 -04:00
Justin Santa Barbara d9fb3812cb Merge pull request #307 from justinsb/fix_208
If no changes are needed in an update, don't print a confusing message
2016-08-14 23:43:06 -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 37199e4849 Sanitize tf SSH keypair name
Fix #299
2016-08-14 23:23:44 -04:00
Justin Santa Barbara 62fc3cfd69 Merge pull request #302 from justinsb/hints_on_update
Provide hints after update cluster
2016-08-14 22:21:51 -04:00
Justin Santa Barbara e778c792fe Provide hints after update cluster
This should make kops more discoverable

Issue #166

Issue #263
2016-08-14 22:19:52 -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 7699dc8fd2 Merge pull request #294 from justinsb/use_ssh_key
SSH key improvements
2016-08-11 22:28:41 -04:00
Justin Santa Barbara 1f68107ded Merge pull request #292 from justinsb/run_ci_versions
Run CI versions of k8s
2016-08-11 22:28:33 -04:00
Justin Santa Barbara 5f98402e2a Merge pull request #275 from justinsb/hi1_instance_types
Add support for hi1 instance type
2016-08-11 22:26:29 -04:00
Justin Santa Barbara a3cfec6c24 Support changing the SSH public key
This requires that we include the OpenSSH fingerprint in the AWS key
name.
2016-08-11 12:00:52 -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
Justin Santa Barbara 93a3c344ed Add another eventual consistency error code 2016-08-11 02:45:02 -04:00
Justin Santa Barbara 8fb4215e17 Run CI versions of k8s
CI versions are not pushed to gcr.io, so we need to preload the images
by downloading them and doing a docker load.
2016-08-11 01:32:42 -04:00
Justin Santa Barbara 6f1341dd04 Add docker flags: insecure-registry and mtu
Also add tests

Issue #42
2016-08-08 13:55:34 -04:00
Justin Santa Barbara 5c6a22538b Add instance types: cc2, cg1, cr1, d2 2016-08-06 02:04:33 -04:00
Justin Santa Barbara 7f6ea78730 Add support for hi1 instance type 2016-08-06 00:00:48 -04:00
Justin Santa Barbara de0482a411 More consistency in publickey CLI
Also docs skeleton
2016-08-05 01:23:13 -04:00
Justin Santa Barbara 05c724f780 Support for deleting secrets 2016-08-05 00:58:11 -04:00
Justin Santa Barbara af841d50c0 Create more consistent secret CLI 2016-08-04 22:18:29 -04:00
Justin Santa Barbara 4e2a4cda1e Fix flag name in error message: zone-name -> dns-zone 2016-08-04 21:39:37 -04:00
Justin Santa Barbara 928fd6161d Remove addons command
Encourage users to use kubectl instead
2016-08-03 00:42:42 -04:00
Justin Santa Barbara 5bbe399558 Merge pull request #248 from justinsb/fix_238
Better output when kubectl not in PATH
2016-08-02 23:55:56 -04:00
Justin Santa Barbara a9922d0a07 Fix concurrent map write bug in TF creation
Thanks for reporting @azell

Fix #235
2016-08-02 23:12:53 -04:00
Justin Santa Barbara 45dd1da4a1 Better output when kubectl not in PATH
Also add to README

Fix #238
2016-08-02 23:06:51 -04:00
Justin Santa Barbara dc5fecabac Temporarily ignore changes on the ASG
This is to permit users to add tags to the ASG.

The long-term fix is to allow specification of additional tags at the
cluster level; the canonical use-case is for the AWS billing tags.

Issue #241
2016-08-02 10:01:22 -04: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 cf1529e9df Revert "Add `kops get secrets` command"
This reverts commit 19e19a0f09.
2016-07-29 13:06:26 -04:00
Justin Santa Barbara 049fbf808f Merge pull request #227 from justinsb/get_secrets
Add `kops get secrets` command
2016-07-29 01:39:25 -04:00
Justin Santa Barbara 310ba12edf Fix log message of shell commands
We were double-printing argv[0]
2016-07-29 01:30:34 -04:00
Justin Santa Barbara 19e19a0f09 Add `kops get secrets` command
Matches our naming pattern, and now using our text grid output
2016-07-29 01:12:03 -04:00
Justin Santa Barbara 3e3ca5a2b8 Merge pull request #222 from justinsb/fix_204
Run the master on the pod network, unless IsolateMaster=true
2016-07-29 00:51:50 -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 2b3f55563e Run the master on the pod network, unless IsolateMaster=true
The master is now registered as a Node.  It is marked as Unschedulable,
so normal pods will not run on it.  But Daemonsets will, and it is
surprising that they don't work unless hostNetwork=true.

The default is now what seems to be expected:
* we allocate the master a real CIDR on the pod network
* kube-proxy runs on the master, so it can talk to pods
* we run kubelet on the master with enable-debugging-handlers, so
  kubectl logs etc works

To get the old behaviour, edit the cluster spec and set
`isolateMasters: true`
2016-07-28 12:12:16 -04:00
Justin Santa Barbara e3e58f605e support multiple zones in `kops import`
Seems to be less special-cased also.

Fix #216
2016-07-27 11:03:22 -04:00
Justin Santa Barbara 97cb6a7296 Add test for bigint format 2016-07-24 21:49:35 -04:00
Justin Santa Barbara 9a741043bc Fix build with golang 1.5
Replace big.Int Text(10) with String()

Also create a makefile target to test building with golang 1.5:
check-builds-in-go15

Fixes #163
2016-07-22 22:49:54 -04:00
Justin Santa Barbara 1240e1d924 Fix bug where edit cluster was computing with the old spec
Also add some tests, and fix some variable naming to hopefully stop it
happening again.

Fix #194
2016-07-22 18:19:40 -04:00
Justin Santa Barbara bbf1755f57 Discover an existing InternetGateway when running with Terraform Output
We currently don't do discovery of existing resources when running with
Terraform output, but when using a shared VPC this is wrong - we need to
reuse the existing gateway.

Directly discover the existing gateway.  We might need to do full
discovery later, but for now this is sufficient.

Fix #181
2016-07-22 12:48:11 -04:00
Justin Santa Barbara 9e9855d1a4 Simpler upgrade procedure: reuse subnet
By reusing the subnet & security groups, we are able to skip the ELB
steps of the upgrade procedure.  The new cluster also has the same
identity as the old cluster for security groups, so we don't need to
reconfigure ELB etc.

Fixes #175
Fixes #174
2016-07-22 11:47:12 -04:00
Justin Santa Barbara 31892fb08d Refactor tests for cleaner separation 2016-07-22 10:19:01 -04:00
Justin Santa Barbara 11d51b04a9 Adapt IAM policies when running in cn-north-1
Fix #27
2016-07-21 22:19:43 -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 c0477381c1 Fixes for terraform block device mapping output 2016-07-21 10:09:16 -04:00
Justin Santa Barbara 8fdda787b9 Merge pull request #154 from justinsb/fix_153
Populate kube-apiserver apiserver-count flag for HA
2016-07-21 09:30:45 -04:00