Commit Graph

30 Commits

Author SHA1 Message Date
iwilltry42
4bfac51c7c
createCluster/createNode: use K3S_URL instead of --server 2020-05-11 09:17:48 +02:00
iwilltry42
c061104b53
createNode: copy as many details as possible from existing
- we now use the full containerJSON details when getting a node
- we now use as many details as possible to copy k3d settings from an
existing node when adding a new node to a running cluster
2020-05-11 08:42:44 +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
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
5c15dcbeca
add wait 2020-04-15 12:10:14 +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
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
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
60659c74c8 cleanup delete node command and add --all flag 2019-12-03 19:17:10 +01:00
iwilltry42
189e430f90 fix port collisions due to default exposed port on master nodes 2019-11-22 18:46:52 +01:00
iwilltry42
536b543cc2 implement get nodes 2019-11-13 14:58:59 +01:00
iwilltry42
4adb695b47 add tls san for non-default host name 2019-10-25 11:16:48 +02:00
iwilltry42
116dd5dad8 fix api-port 2019-10-25 11:09:26 +02:00
iwilltry42
7063d62508 initial implementation of 'get clusters' 2019-10-15 18:57:54 +02:00
iwilltry42
544480e010 add cluster secret 2019-10-10 16:39:13 +02:00
iwilltry42
84cdfac7cb introduce node roles 2019-10-10 15:02:56 +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
iwilltry42
43eb626b0c specify role, image and labels 2019-09-30 12:33:17 +02:00
iwilltry42
cd4223e4ed create multiple nodes at once 2019-09-30 09:28:00 +02:00
iwilltry42
8eb9832298 delete cluster 2019-09-27 16:34:49 +02:00
iwilltry42
ac43655396 update golangci-lint 2019-09-26 18:15:06 +02:00
iwilltry42
edc52c6ae6 delete node containerd 2019-09-25 15:07:17 +02:00
iwilltry42
5f5c516ba2 adapt new way of choosing runtime 2019-09-25 10:04:40 +02:00
iwilltry42
24ba46fc2a initial test to create container 2019-09-24 21:19:03 +02:00
iwilltry42
a4f5f80286 add utils and function skeletons 2019-09-03 17:29:57 +02:00