Commit Graph

80 Commits

Author SHA1 Message Date
Antoine
e3bf18660e
👌 PR review
Use `log.Fatalln(err)` instead of `log.Errorln(err)` + `os.Exit(1)`
Use Label prefix instead of LabelName suffix
Rename all secret occurence with token
2020-06-04 00:49:12 +02:00
iwilltry42
a279e1259e
createCluster: add --switch command for kubeconfig current-context 2020-06-03 16:21:06 +02:00
iwilltry42
4710f65b85
Merge branch 'master' of github.com:rancher/k3d into enhancement/use-context 2020-05-29 11:42:47 +02:00
iwilltry42
06f543518c
fix: re-add support for named volumes used with --volume flag 2020-05-28 11:01:25 +02:00
iwilltry42
dabec2f091
createCluster: fix loadblancer consideration
- issue #248: nil pointer dereference because we're trying to access
non-existent loadblancer node
2020-05-27 18:23:39 +02:00
iwilltry42
0270ac7327
createCluster: take loadbalancer into consideration when mapping ports 2020-05-26 17:20:38 +02:00
iwilltry42
ba431c6235
Merge branch 'master' of github.com:rancher/k3d into enhancement/use-context 2020-05-26 14:49:45 +02:00
iwilltry42
21fd427d8a
maintenance: cleanup debug logs 2020-05-26 14:14:55 +02:00
iwilltry42
639daef7fb
Reorder parameters
- runtimes.Runtime should at max. the second function parameter (right
after context.Context)
2020-05-26 12:58:43 +02:00
iwilltry42
0d2c22455d
Overall: use context.Context in top-level exported functions
- package cluster: use context.Context as first function param in every
exported function
- package cmd: pass cmd.Context() to calls to package cluster exported
functions
2020-05-18 12:57:59 +02:00
iwilltry42
9c9f49646e
MasterLoadBalancer: add nodefilter & extra treatment
- masterlb is now an extra part of the cluster spec
- ports can now be attached to masterlb by using the 'loadbalancer'
nodefilter
- all ports exposed on the masterlb will be proxied to all master nodes
(on the same port)
2020-05-11 10:57:54 +02:00
iwilltry42
3071ec5755
createCluster: add --no-lb flag to disable the load balancer
- does not create the load balancer node
- exposes the API port on the first master node (master-0)
2020-05-09 13:02:02 +02:00
iwilltry42
c6564801f3
getKubeconfig: always return output filepath 2020-05-04 18:26:59 +02:00
iwilltry42
05f2fc1f66
docs: add more command information 2020-04-27 17:30:51 +02:00
iwilltry42
5b637126d7
createCluster: add --update-kubeconfig flag
- enables wait-for-master
- calls GetAndWriteKubeConfig after successful cluster creation to
  update the default kubeconfig with the new cluster's details
- does NOT automatically switch the current-context
- outputs a different line saying, that you can switch context now
2020-04-24 14:02:38 +02:00
iwilltry42
6677f82d5b
getKubeConfig: consider the KUBECONFIG env var when updating default kubeconfig 2020-04-24 07:52:23 +02:00
iwilltry42
5b1e723fdd
createCluster: add more detailed description and info regarding api port 2020-04-23 14:51:10 +02:00
iwilltry42
091190447c
createCluster: fix final print after cluster creation on windows (different setting of env vars) 2020-04-23 14:43:08 +02:00
iwilltry42
c51ec003bd
createCluster/network: add basic support for hostnetwork mode in docker 2020-04-16 10:07:19 +02:00
iwilltry42
1b7f5c5f78
createCluster/timeout: use context to handle cancellation
With the updated cobra depencendy, we're now passing a context
from the cmd to the called functions.
When creating a cluster, one can pass a Duration to the --timeout
flag, which will create a new context with a timeout.
In the two blocking functions, where we're waiting for the master nodes
(initializing master nodes and "normal" master nodes), we're now
checking for the context cancellation as well, which may be caused
by the timeout.
2020-04-15 11:52:22 +02:00
iwilltry42
80d1c5c2de
initialize proper timeout flag 2020-04-15 10:43:53 +02:00
Thorsten Klein
d8eb206e44
Merge pull request #218 from rancher/feature/master-loadbalancer
[v3/Feature] Add cluster-loadbalancer
2020-04-15 07:34:39 +02:00
iwilltry42
77bddc4dd0
create/cluster: check if cluster with given name exists
To prevent accidental rollbacks of existing clusters with the same name,
we now check if a cluster with the chosen name exists first.
If it exists, we don't do anything at all and just error our
2020-04-14 19:58:21 +02:00
iwilltry42
a24d6f864e
Proxy: deploy a configurable nginx proxy in front of the cluster
Up to now, we exposed ports on single master nodes, which is quite
inconvenient on user side and troublesome on development side.
Now, we're creating a proxy container which exposes a single port
and proxies traffic to all master nodes.
Currently, this only works with 'k3d create cluster' and won't
update the proxy when using 'k3d create node --role master'.
2020-04-08 17:45:27 +02:00
iwilltry42
164d850321
CLEANUP: clean TODOs in createCluster 2020-04-06 16:51:09 +02:00
iwilltry42
a7ef585e12
createCluster: allow 0 or 1 arg
Allow 0 or 1 argument for k3d create cluster.
If 0, then we'll use the default cluster name.
2020-04-06 16:34:32 +02:00
iwilltry42
7005f8182a
validate clustername on create and use global runtime variable 2020-03-29 19:39:41 +02:00
iwilltry42
2d35895edc
move no-lb setting to createClusterOpts 2020-02-01 14:37:57 +01:00
iwilltry42
3ff51a0446
move no-lb setting to createClusterOpts 2020-02-01 14:32:04 +01:00
iwilltry42
2b674cb4e3
use createClusterOpts 2020-02-01 14:10:14 +01:00
iwilltry42
5500872544
Fatal out when using portmapping without node filter on a cluster with more than one node 2020-02-01 13:33:07 +01:00
iwilltry42
55646119c2
CLI: rollback if cluster creation failed 2020-01-28 15:06:07 +01:00
iwilltry42
b8ac954d69
implement --wait asynchronously 2020-01-28 10:28:30 +01:00
iwilltry42
a25d1d346a
add clusterCreateOpts flag struct and implement extra args for k3s server/agent 2020-01-15 09:29:35 +01:00
iwilltry42
bc49f197d9
cleanup and prepare for push to rancher/k3d 2020-01-05 21:16:31 +01:00
iwilltry42
f571ff3143
getk3sversion 2020-01-02 14:32:25 +01:00
iwilltry42
8aad61a39a improve usage texts 2019-12-12 08:20:24 +01:00
iwilltry42
1a91401d19 start with --wait flag 2019-12-05 11:23:56 +01:00
iwilltry42
68609ec3a0 add info text after cluster creation 2019-12-05 09:55:24 +01:00
iwilltry42
ef2907de41 replace 127.0.0.1:6443 in kubeconfig as well 2019-12-05 09:33:22 +01:00
iwilltry42
52b23adec9 v1.0.0 as default version 2019-12-05 09:15:29 +01:00
iwilltry42
11b937a910 implement load images command 2019-12-04 14:54:58 +01:00
iwilltry42
e6d7726ffb add image volume 2019-12-04 08:19:42 +01:00
iwilltry42
4e24521c0d disable external datastore option for now 2019-11-26 17:07:23 +01:00
iwilltry42
189e430f90 fix port collisions due to default exposed port on master nodes 2019-11-22 18:46:52 +01:00
iwilltry42
bd39336b29 init ha setup with cluster-init 2019-11-20 21:38:59 +01:00
iwilltry42
7185a160c0 init new flags 2019-11-20 20:37:52 +01:00
iwilltry42
e2834f5320 fix error when no filter is set for single master api port 2019-11-11 12:45:28 +01:00
iwilltry42
5851da3ef3 start coupling network to clusters 2019-11-11 11:14:54 +01:00
iwilltry42
1ca9193776 add warning for multi-master setups 2019-11-11 09:33:41 +01:00