Justin Santa Barbara
a03ea54365
Rename SubnetName -> Name
...
No schema impact
2016-12-19 00:01:38 -05:00
Justin Santa Barbara
4475d68c2e
Remove dead code
2016-12-18 21:56:57 -05:00
Justin Santa Barbara
0ef9d51586
Allow kops delete instancegroup, even if ASG does not exist
...
We probably shouldn't, but we delete the ASG when you `kops delete ig`.
If the ASG doesn't exist though, we can still delete the IG.
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
Kris Childress
50f9028106
Fixing for tests, removing old function
2016-12-16 06:28:14 -07:00
Kris Childress
b0d0fd312d
Fixing orphaned LC's with kops
2016-12-16 06:26:07 -07: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
Justin Santa Barbara
dbab97e508
Use versioned marshaling where we can
...
In particular during a kops edit
2016-12-08 22:17:26 -05:00
Justin Santa Barbara
3ec68efbe7
Fix typo
2016-12-07 08:55:52 -05:00
chrislovecnm
bad489cb75
message when we change kubectl context
...
fixing kubectl config path when set to multiple paths
2016-12-04 15:58:35 -05:00
Kris Childress
72c5868966
Merge pull request #707 from DualSpark/node-validation
...
New feature - node validation
2016-11-29 16:47:44 -07:00
chrislovecnm
82cf2c2c0f
working on the start of validate
...
cluster validation seem to be working. Need to test more
documentation yo
refactoring to get rid of import cycle not allowed
2016-11-28 18:16:32 -07:00
chrislovecnm
3ffc4e91cb
Starting work on node lookup and validation
2016-11-28 18:16:31 -07:00
chrislovecnm
89ac0d24f8
starting porting node code
2016-11-28 18:16:31 -07:00
Zach Loafman
e60c36068f
Fix retries for AutoScalingGroup pending delete
...
This:
- reworks how retries are handled in fi/executor.go to a time-based scheme
- changes the single-task limit to 10m (from about 30s of no-progress)
- eliminates the inner IAM propagation retry for LaunchConfigurations,
because the task itself will just be redriven for a while. This also
eliminates any long-pole delay caused by this error (since task Run()
should be 'fast').
2016-11-28 17:04:02 -08: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
479c7782d6
Fixing DNS annotations on pods / Bumping failed iterations
...
- Adding template functions to nodeup
- Adding 30 -> 42 iteration boost for attempted iterations without progress
- Adding template to kube api manifest
2016-11-08 15:16:41 -08:00
Kris Childress
835e24f788
Working EIP and NGW CRUD for private networking..
...
Next step.. lets piece them all together
2016-11-08 15:16:41 -08:00
Kris Childress
a3dd1257ce
Working ElasticIP associations on subnet. Delete and Create!
2016-11-08 15:16:41 -08:00
Justin Santa Barbara
27fb687058
Fix typo: becasue -> because
2016-11-05 01:41:47 -04:00
Kris Childress
c12c4aa5d6
Adding first element from kubectl path to log message
2016-10-19 19:12:23 -06:00
Kris Childress
aa4649b32f
Adding support for multiple kubeconfig paths.
...
- Just removing the `to` part of the log message. I don't think its a huge win to have that in the logs, and was causing problems This will close #670
2016-10-19 06:08:38 -06:00
Chris Love
653618aa41
Merge pull request #693 from justinsb/fix_672
...
Don't merge stdout & stderr when running kubectl
2016-10-18 22:28:32 -06:00
Justin Santa Barbara
1d239d9b09
Don't remove route tables tagged with another cluster
2016-10-18 22:21:39 -04:00
Justin Santa Barbara
6ec5da2827
Add unit test for deleting untagged route table
2016-10-18 22:16:05 -04:00
Justin Santa Barbara
ba8514d840
Delete route tables, even if untagged, if we are deleting the VPC
...
The route table cannot exist without a VPC; if we're deleting the VPC we
must delete the route table also.
This will help fix problems when we fail to tag the route-table.
Issue #597
2016-10-18 21:59:56 -04:00
Justin Santa Barbara
7542b8980c
Don't merge stdout & stderr when running kubectl
...
Issue #672
2016-10-18 21:35:34 -04:00
Chris Love
0d78c65498
Merge pull request #660 from justinsb/fix_upgrade
...
Fix upgrade from kube-up
2016-10-18 10:39:33 -06:00
Justin Santa Barbara
d563d5589a
Fix deletion logic to ignore terminated instances
...
Silly mistake because golang case statements do not fall though
Fix #673
2016-10-18 00:30:31 -04:00
chrislovecnm
8fa2aac99f
fixing more headers
2016-10-15 19:20:56 -06:00
Justin Santa Barbara
2af1fde49d
Reuse the route table when importing
...
Not only is this lower-impact, but it also avoid a bug because the
subnets were considered "shared", and thus we would not manage the
route-table any more.
2016-10-15 14:18:30 -04:00
Justin Santa Barbara
c933008006
Don't validate cluster name when importing kube-up clusters
2016-10-14 22:38:29 -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
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
c234f20d05
Fix logging of instance ids
2016-10-05 23:11:54 -04:00
Justin Santa Barbara
5137e2546e
Tolerate InvalidInstanceID.NotFound when deleting instances
...
We treat as instance-already-deleted, i.e. not an error
Fix #592
2016-10-05 02:12:11 -04:00
Justin Santa Barbara
a338f482dd
Merge pull request #563 from justinsb/channels_for_clusters
...
Store channel in cluster, use it to determine version
2016-10-01 01:21:39 -04:00
Justin Santa Barbara
80becef5a3
rolling-update cleanups
2016-10-01 01:17:07 -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
a5cacebd99
Change rolling-update heuristics to be less aggressive
2016-09-30 23:42:47 -04:00
Justin Santa Barbara
5f8d68ec85
Refactor shared packages into util directory
2016-09-25 18:27:09 -04:00
Justin Santa Barbara
bb01cf6ddd
Make AWSCloud an interface, mock it out in tests
...
Beginnings of a mock for the AWSCloud, so that hopefully we aren't
calling out to AWS at all in the tests. We will likely start mocking
the actual EC2 APIs in future, but this seems a good starting point.
Fix #425
2016-09-24 15:52:52 -04:00
Justin Santa Barbara
8839e67f0b
Merge fixups
2016-09-24 11:46:34 -04:00
Justin Santa Barbara
05c799761f
First step towards rolling update
...
Start querying nodes in k8s also
Unclear whether we want to use two ASGs for greater control at the
moment.
2016-09-24 11:19:17 -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
9d7a7fc6e8
Merge pull request #349 from justinsb/govet_fixes
...
govet fixes
2016-08-26 02:16:12 -04:00
Justin Santa Barbara
637a10be12
govet fixes
2016-08-20 01:09:19 -04:00
Justin Santa Barbara
a7ece228fb
Fix issue with deleting DNS records when multiple matching zones found
...
We were accidentally reusing the variable we were closing over, I
believe
2016-08-19 23:55:38 -04:00
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
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
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
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
928fd6161d
Remove addons command
...
Encourage users to use kubectl instead
2016-08-03 00:42:42 -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
310ba12edf
Fix log message of shell commands
...
We were double-printing argv[0]
2016-07-29 01:30:34 -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
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
18af54de6e
Fix missing string cast
2016-07-14 11:06:39 -04:00
Justin Santa Barbara
47ef67a71d
Merge pull request #147 from justinsb/fix_69
...
Clearer error message when importing a cluster with a custom subnet
2016-07-14 11:05:33 -04:00
Justin Santa Barbara
57d6e0d8d9
Import the node instance type when importing a cluster
...
We now query for the launchconfiguration and import the first machine
type we find.
Fix #148
2016-07-14 10:51:39 -04:00
Justin Santa Barbara
7c1177cc82
Clearer error message when importing a cluster with a custom subnet
...
We can at least give the user better instructions on how to proceed.
Because this is not in general safe though, I'm not sure we want to
gloss over this.
Issue #69
2016-07-14 10:38:32 -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
0aed68c260
Add support for deleting an InstanceGroup
2016-07-11 00:08:55 -04:00
Justin Santa Barbara
c4f2fbfcaf
Tweaks to rolling-update CLI
2016-07-11 00:08:21 -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
eb589fd025
Import cluster should create the same style name
2016-07-11 00:03:22 -04:00
Justin Santa Barbara
4ac0395a9f
Merge pull request #103 from justinsb/delete_shutting_down_state
...
Tolerate shutting-down state on instance during delete
2016-07-09 22:32:21 -04:00
Justin Santa Barbara
0c867a8971
Merge pull request #108 from justinsb/fix_96
...
Detect & delete new ASG launch configs
2016-07-09 22:29:56 -04:00
Justin Santa Barbara
524fb645d0
Delete cluster deletes keypairs
...
Again we delete by name, which is why we name them by the very unlikely
to conflict name "kubernetes.<clustername>"
Issue #107
2016-07-09 22:26:12 -04:00
Justin Santa Barbara
5b8b4d4da3
Detect & delete new ASG launch configs
...
We now output a ClusterName property into the launchconfig, even though
we don't technically need it. But it allows us to more easily detect
the cluster, and it generally seems like a good idea.
Also rename to 'autoscaling-config' and clean up the cluster name
detection logic.
Fix #96
2016-07-09 22:07:24 -04:00
Justin Santa Barbara
d705a1001c
Clean up IAM roles
...
We match by name; this seems acceptable given that we make the cluster
name a FQDN.
Issue #97
2016-07-09 15:33:57 -04:00
Justin Santa Barbara
c058a0c2a8
Tolerate shutting-down state on instance during delete
2016-07-09 02:41:56 -04:00
Justin Santa Barbara
5c65600229
Delete Route53 host records on cluster-down
...
Initial implementation: we match by name, for example; when we have a
hosted zone id we should plumb it through.
Does implement bulk deletion, because on Route53 we have to delete
multiple resources at once.
Issue #74
2016-07-09 02:41:25 -04:00
Justin Santa Barbara
d1ef7580a9
Report less-scary message when IAM instance profile is not ready yet
...
IAM instance profile creation is very async, and this causes dependent
resources to fail. That's fine - we have good retry logic - but we
should output a less frightening error message.
Issue #35
2016-07-07 10:22:44 -04:00
Justin Santa Barbara
274a8eff3c
Fetch ELB tags in chunks of 20
...
ELB DescribeTags has a limit of 20 ELBs / call. So we paginate the
DescribeLoadBalancers call with page size = 20 also.
2016-07-06 13:46:16 -04:00
Justin Santa Barbara
d427858477
Rename to kops
...
The upup tool is now called kops, and we have moved repos
2016-06-30 09:25:25 -04:00
Justin Santa Barbara
be4be57f3a
upup: workaround for secrets problem with upgrade
2016-06-28 13:08:41 -04:00
Justin Santa Barbara
e3062a9f51
upup: improved upgrade procedure
2016-06-28 11:49:17 -04:00
Justin Santa Barbara
e315564cfa
upup: More delete cleanup, use statestore by default
2016-06-28 11:47:19 -04:00
Justin Santa Barbara
947a045667
Rename DNSDomain -> ClusterDNSDomain for clarity
2016-06-27 15:36:11 -04:00
Justin Santa Barbara
ee8bdb907e
upup delete: don't always print dependencies
2016-06-27 15:00:51 -04:00
Justin Santa Barbara
b6cf38c96e
AllocateNodeCIDRs need no longer be "bubbled down"
...
We have it on the KCM config; just set it there
2016-06-27 00:32:19 -04:00
Justin Santa Barbara
87b7c71fcc
Remove spurious errors when deleting a cluster
2016-06-27 00:03:49 -04:00
Justin Santa Barbara
492856069a
Apply gofmt
2016-06-26 23:24:17 -04:00
Justin Santa Barbara
eeed4a3031
Rationalize API to something we want to support forever
2016-06-26 23:09:02 -04:00
Justin Santa Barbara
ee325435e6
Rationalize properties to the minimal set
2016-06-26 09:45:05 -04:00
Justin Santa Barbara
3185a3fe5c
Fix upgrade
2016-06-23 10:28:17 -04:00
Justin Santa Barbara
90d7fb87ad
upup: improved delete; create upup export and upup upgrade
2016-06-23 08:59:20 -04:00
Justin Santa Barbara
75f386235a
upup: rolling-update add mutex lock
2016-06-17 09:36:43 -04:00
Justin Santa Barbara
1e7159a923
upup: detach internet gateway if vpc is to be deleted
2016-06-17 09:36:27 -04:00
Justin Santa Barbara
3ede6c1f4a
upup: uncompress gzipped data in delete cluster
2016-06-17 09:36:12 -04:00
Justin Santa Barbara
eb23e22b3c
upup: rolling-update should take --name, not --cluster-id
2016-06-13 17:37:30 -04:00
Justin Santa Barbara
0559ec1210
upup: Support for shared VPCs
...
A lot of work that had to happen here:
* Better reuse of config
* Ability to mark VPC & InternetGateway as shared
* Find models relative to the executable, to run from a dir-per-cluster
Fixes #95
2016-06-13 11:37:06 -04:00
Justin Santa Barbara
530b4c79db
upup: experimental addon management
2016-06-13 11:35:00 -04:00
Justin Santa Barbara
72afa859a3
upup: delete cluster should take -name to be consistent
...
Still not entirely sure on cluster-id vs name, but name is consistent
2016-06-11 23:08:40 -04:00
Justin Santa Barbara
0263826163
upup: delete cluster should check status of ASG
...
Before deleting the ASG, we need to check it exists.
Issue #99
2016-06-11 21:33:56 -04:00
Justin Santa Barbara
e63426ce65
upup: delete cluster should eventually give up
...
If it isn't making progress, eventually we should bail out so that we
can use this in scripts. However, we don't need to be too aggressive,
because it is not good to leak resources, and a user will likely
Control-C us pretty fast when they see they're in a loop.
Issue #99
2016-06-11 21:33:56 -04:00
Justin Santa Barbara
7543d1c19d
upup: apply gofmt
...
Missed a few gofmt places
2016-06-10 11:41:10 -04:00
Justin Santa Barbara
9b32edfb81
upup: add experimental cluster rolling-update command
...
Little more than a hack right now, but a good place to start.
2016-06-10 11:36:57 -04:00
Justin Santa Barbara
6e7c4209de
upup: Simple tag fixes to avoid comparison failures
...
We populate the actual expected tags in-place now
2016-06-10 11:33:33 -04:00
Justin Santa Barbara
70d7c1b92e
upup: avoid warning when building filters with nil name
2016-06-08 12:18:07 -04:00
Justin Santa Barbara
4c0f54f95d
upup: run create & delete in parallel
...
It makes logging harder, but we want to start testing it!
2016-06-07 15:23:07 -04:00
Justin Santa Barbara
cf840ef21a
upup: better cluster delete
2016-06-07 08:46:28 -04:00
Justin Santa Barbara
095bf95fc9
upup: simple command to delete (AWS) clusters
...
A relatively dumb retry strategy to work around dependencies, but it
works and it is difficult to do _much_ better.
2016-05-30 17:57:40 -04:00