iwilltry42
b6e3babb4a
fix: move waiting out of loop (which caused early context cancelation issues)
2020-05-28 14:32:09 +02:00
iwilltry42
332c3a8c9b
startCluster: add --wait and --timeout
...
- functionality mostly copy-pasted from createCluster
2020-05-28 13:53:20 +02:00
iwilltry42
21fd427d8a
maintenance: cleanup debug logs
2020-05-26 14:14:55 +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
4bfac51c7c
createCluster/createNode: use K3S_URL instead of --server
2020-05-11 09:17:48 +02:00
iwilltry42
da8adf5469
createNode: update nginx masterlb with new master node
...
- if --role=master, update nginx config and reload it
2020-05-09 15:11:06 +02:00
iwilltry42
b7b8f6a5a6
createNode: use any node as blueprint
...
- if no node with the target role exists in the cluster, just choose any
other (non-proxy) node instead
- to make this work, we also need to add the k3s url label to every node
2020-05-09 14:12:29 +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
0cdce098bd
createCluster: do not create masterlb if hostnetwork is selected to avoid port collisions
2020-05-04 14:19:30 +02:00
iwilltry42
dec8043edf
createCluster: add masterlb to list of nodes, so it will be considered during rollback
2020-05-04 07:42:45 +02:00
iwilltry42
3b77ecd6dd
getLogs: return error if container is not in running state to avoid long unnecessary wait
2020-04-26 17:17:14 +02:00
iwilltry42
5121ef80a5
create/start/stop cluster: fix how Master-LoadBalancer is treated
...
- always include the k3d.role label and use LoadBalancerRole for
masterlb
- start masterlb last when starting a stopped cluster so it won't fail
2020-04-22 13:18:26 +02:00
iwilltry42
469d8ab62d
use default value for apiPort
2020-04-16 09:49:03 +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
3cd4c0a8bc
create/cluster: remove unnecessary goto initNode
2020-04-14 19:37:13 +02:00
iwilltry42
4a582efcc8
Merge branch 'master-v3' of ssh://github.com/rancher/k3d into feature/master-loadbalancer
2020-04-14 17:31:06 +02:00
iwilltry42
dc1bbd6965
manage imageVolume lifecycle
2020-04-14 17:30:12 +02:00
iwilltry42
a54d05e9a5
fix sleep to prevent race conditions and add log output for loadbalancer creation
2020-04-08 18:03:50 +02:00
iwilltry42
3585161da0
Merge branch 'master-v3' of ssh://github.com/rancher/k3d into feature/master-loadbalancer
2020-04-08 17:53:03 +02:00
iwilltry42
33d54132ed
add arbitrary sleep to avoid master registering race conditions
2020-04-08 17:52:24 +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
2b674cb4e3
use createClusterOpts
2020-02-01 14:10:14 +01:00
iwilltry42
70221e0f29
concurrently wait for masters to become ready if --wait is set (or timeout)
2020-01-28 15:07:10 +01:00
iwilltry42
b8ac954d69
implement --wait asynchronously
2020-01-28 10:28:30 +01:00
iwilltry42
bc49f197d9
cleanup and prepare for push to rancher/k3d
2020-01-05 21:16:31 +01:00
iwilltry42
644b369b60
switch from K3S_CLUSTER_SECRET to K3S_TOKEN and use exact matching to get node containers by name and make --cluster flag required when creating a new node
2019-12-19 11:50:25 +01:00
iwilltry42
fd4b803681
start fixing createNode
2019-12-12 19:14:26 +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
ff98343420
extend
2019-11-20 22:52:48 +01:00
iwilltry42
bd39336b29
init ha setup with cluster-init
2019-11-20 21:38:59 +01:00
iwilltry42
098fe0803c
implement start/stop for nodes and clusters
2019-11-13 13:43:56 +01:00
iwilltry42
31270fe08c
add some comments
2019-11-11 11:39:36 +01:00
iwilltry42
b596eeb70b
add more warnings for cluster deletion
2019-11-11 11:34:57 +01:00
iwilltry42
100ba3db2b
add cluster network deletion
2019-11-11 11:24:09 +01:00
iwilltry42
5851da3ef3
start coupling network to clusters
2019-11-11 11:14:54 +01:00
iwilltry42
b52da4ac52
fix filtering
2019-11-07 12:01:33 +01:00
iwilltry42
116dd5dad8
fix api-port
2019-10-25 11:09:26 +02:00
iwilltry42
1e33e0de8c
add deleteCluster functionality
2019-10-16 13:45:22 +02:00
iwilltry42
7063d62508
initial implementation of 'get clusters'
2019-10-15 18:57:54 +02:00
iwilltry42
87c36f124c
add k3s_url to worker nodes
2019-10-10 16:57:49 +02:00
iwilltry42
544480e010
add cluster secret
2019-10-10 16:39:13 +02:00
iwilltry42
30a98cce38
create cluster network if not present
2019-10-10 15:44:16 +02:00
iwilltry42
eb9d14fe47
node network
2019-10-10 15:12:54 +02:00
iwilltry42
84cdfac7cb
introduce node roles
2019-10-10 15:02:56 +02:00
iwilltry42
1ec7a3e02a
parsecmd funcs
2019-10-02 18:34:42 +02:00
iwilltry42
cd72e22dce
patch specs with node role specific settings
2019-09-30 13:54:48 +02:00
iwilltry42
7583340d23
create cluster
2019-09-30 13:18:42 +02:00