Commit Graph

37 Commits

Author SHA1 Message Date
Thorsten Klein
7071129df8
[Enhancement] More powerful registry-create opt (#727)
- `--registry-create NAME[:HOST][:HOSTPORT]` changed from bool flag
- respective config added to config file
2021-09-08 19:09:23 +02:00
iwilltry42
7073a8fad7 migrate to module rancher/k3d/v5 2021-09-07 08:58:57 +02:00
iwilltry42
5aa1edfb73
update to go1.17 and update direct dependencies 2021-09-07 08:57:05 +02:00
Thorsten Klein
7ba71ad66c
[Feature] CreateNode: add token and network flags and allow remote cluster (#734)
- `--cluster` flag parsed for `https://` prefix and node creation treated differently accordingly
- new `--network` string array flag to add the node to multiple networks (primary network when adding to a remote cluster)
- new `--token` flag to provide the cluster token
2021-09-07 07:31:18 +02:00
iwilltry42
9efe980789 overall: make error handling and error logs a bit more streamlined 2021-08-31 09:33:39 +02:00
Thorsten Klein
b4158a1dc1
[Enhancement] Network Magic (#721)
- before starting the cluster, gather environment info via tools node
- use hostIP/gatewayIP for DNS (iptables + resolv.conf updated in entrypoint script)
- revamp of custom entrypoint scripts
2021-08-30 14:59:12 +02:00
Thorsten Klein
212979d0bb
[Enhancement] DNS Injection (#718)
- remove`--no-hostip` flag and the related `disableHostIPInjection` config option
- inject host IP on every cluster startup (except when hostnetwork is chosen)(/etc/hosts + CoreDNS)
- inject host entries for every cluster network member container into the CoreDNS configmap
2021-08-24 10:18:53 +02:00
Mateusz Urbanek
917c19eae5
feat(logging): using new package containing logrus.Logger instead of global scope logrus (closes #583) (#699, @Shanduur) 2021-08-18 12:22:44 +02:00
ejose19
bfead49c46
[Enhancement] Refactoring: normalize label flags (k3s node & runtime) (#598, @ejose19) 2021-07-09 10:46:16 +02:00
MichalK
cbe187d008
[Fix] Use default gateway, when bridge network doesn't have it (#666, @kuritka)
Signed-off-by: kuritka <kuritka@gmail.com>
2021-07-02 10:05:26 +02:00
iwilltry42
34aac579d2
runtimes/docker: use getDockerClient function everywhere so all functions can work via e.g. ssh 2021-06-04 07:43:06 +02:00
iwilltry42
6c94d7db3d
overall/license: update to year range -2021 2021-05-21 13:07:59 +02:00
iwilltry42
b4c910b729
runtimes/docker/network: only read ipam config if exists
- fixes #576
  - IPAM config is empty for e.g. the "host" network
2021-04-30 14:29:00 +02:00
Thorsten Klein
24cf263c73
[FEATURE] IPAM via subnet flag (#560) 2021-04-20 07:39:51 +02:00
iwilltry42
8b0174bed2
runtimes/docker/getgatewayip: properly catch non-existent ipam config 2021-03-02 18:38:55 +01:00
MichalK
76fc9ebed7
[Fix] Reuse registry in multicluster (fixes #485,@kuritka) (#486, @kuritka) 2021-02-09 17:45:15 +01:00
Erik Kristensen
63d54842c0
[Feature] Support docker over ssh (#324, @ekristen & @inercia) 2021-02-04 17:54:49 +01:00
iwilltry42
7b8506b1d9
fix: proper handling of registries and networks when deleting clusters/nodes 2021-01-19 18:53:32 +01:00
Thorsten Klein
185ffcd34f
[Enhancement] clusterDelete: proper node and network handling (#437)
This comes with several fixes/improvements

- only consider containers that have the default object label (app=k3d)
- handle network deletion
  - check if there are other k3d containers connected
  - if there are only registries, disconnect them
  - if there are non-registry nodes, leave everything as it is
  - if there are any containers connected, that are not automatically
  disconnected, log a warning and continue
2021-01-07 11:32:30 +01:00
Thorsten Klein
ecc025b35e
[Feature] Registry for v4 & Restructure Cluster Creation (#334) 2020-12-09 15:59:20 +01:00
iwilltry42
d7b25ac6ab
v3 -> v4 2020-12-04 13:45:57 +01:00
iwilltry42
ca23c6d898
clusterCreate/network: only use the exact chosen network
Before, we just looked up the name of the docker network, causing docker
to do some sort of relaxed matching (prefix?) which could cause k3d to
choose the first matching network instead of the exact match.
Now we're enforcing exact Regex matching to prevent this.
Fixes #374
2020-10-08 09:31:59 +02:00
iwilltry42
dc0ba9873b
patch CoreDNS configmap with host.k3d.internal 2020-10-01 21:09:12 +02:00
iwilltry42
972c004930
add entry for host.k3d.internal to /etc/hosts in the node containers 2020-09-29 15:20:43 +02:00
iwilltry42
76d90478f5
Go Module: use v3 for go module compatibility 2020-06-18 07:58:36 +02:00
iwilltry42
434cf8e91d
overall: pass context from top to bottom 2020-05-26 14:47:21 +02:00
iwilltry42
7744c52ec7
overall: always defer close docker client connections 2020-04-27 18:27:33 +02:00
iwilltry42
c51ec003bd
createCluster/network: add basic support for hostnetwork mode in docker 2020-04-16 10:07:19 +02:00
iwilltry42
9e59f6ed36
network: only filter for name when checking for existing networks and do not use aliases in endpointsconfig 2020-04-11 15:53:40 +02:00
iwilltry42
bc49f197d9
cleanup and prepare for push to rancher/k3d 2020-01-05 21:16:31 +01:00
iwilltry42
100ba3db2b add cluster network deletion 2019-11-11 11:24:09 +01:00
iwilltry42
e5c9f8e910 fix runtimes 2019-11-11 11:16:51 +01:00
iwilltry42
5851da3ef3 start coupling network to clusters 2019-11-11 11:14:54 +01:00
iwilltry42
30a98cce38 create cluster network if not present 2019-10-10 15:44:16 +02:00
Thorsten Klein
433ff16467 add utils 2019-09-06 17:39:56 +02:00
Thorsten Klein
73efb98b32 start docker runtime 2019-09-06 14:45:16 +02:00
iwilltry42
7b6ee28daa runtimes dir 2019-09-06 12:27:49 +02:00