Commit Graph

304 Commits

Author SHA1 Message Date
Eng Zer Jun
5e5a35c67c
refactor: move from io/ioutil to io and os package (#827) 2021-10-27 15:52:37 +02:00
Thorsten Klein
f8f17caf78
[Cleanup] Types, ready-log-messages & closing connections (#818)
- new special internal role `initServer` used only to determine the correct ready-log-message
- ready-log-messages now looked up by role and new `Intent` type (cluster-create/cluster-start/node-create/node-start), as especially for the init server there are different log messages indicating that we can proceed with the next step
- moving types around:
	- K3s env vars now under .../types/k3s/env.go
	- defaults now under .../types/defaults.go
	- ...
- improved waiting for log messages
	- not checking the whole log again and again in a loop
	- follow log with a single reader (and retry in case we see a fatal error, meaning that the K3s container will restart -> backoff after 10 tries)
	- BREAKING: new `*runtimeTypes.NodeLogsOpts` parameter in GetNodeLogs
2021-10-27 12:56:04 +02:00
Maxim Eryomenko
407ced6405
chore(cmd): add subcommands in one call (#819) 2021-10-27 09:43:10 +02:00
Harley Laue
376f0378af
[Docs] Clarify node create help text about cluster reference (#808) 2021-10-22 09:08:57 +02:00
iwilltry42
a4d573fc2c
fix: check temp file with env vars expanded instead of original config file to avoid validation failures 2021-10-21 21:28:31 +02:00
Thorsten Klein
12180ffdd5
[Fix] more resilient post-create cluster preparation (DNS) (#780) 2021-10-13 17:36:42 +02:00
Thorsten Klein
53bdbec636
[Fix] k3d config migrate missing nodefilter migration (#767)
configMigrate: add missing migrations for nodefilters and fix perm of outputfile
2021-10-05 10:42:09 +02:00
iwilltry42
2a2bee0e63
fix: not gathering env info on cluster start (+ fix ipam e2e test) 2021-09-30 14:59:27 +02:00
iwilltry42
f801e46e9e
fix --k3s-arg not applied from CLI due to wrong viper instance
- fixes #747
2021-09-20 09:21:59 +02:00
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
630788f1e7 clusterCreate: add --lb-config-override flag
- allow overriding k3d-proxy settings (workerProcesses,
defaultProxyTimeout)
- add new field to loadbalancer config and SimpleConfig structs
2021-09-07 08:23:46 +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
91426eabd1 cmd: make config initialization more general
- move viper initialization from k3d config file to separate util
sub-package in cmd/
- use that new subpackage init function to leverage the config file in
`k3d cluster delete`
- cover that with an e2e test case
2021-09-06 17:44:38 +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
iwilltry42
8a745062ed
Merge branch 'main' into main-v5 2021-08-18 13:38:39 +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
Łukasz Oleś
5d0d0acc77
[FIX] Do not override hostIP when hostPort is missing (#693, @lukaszo) 2021-08-16 14:58:33 +02:00
iwilltry42
ed7db5daa9
cleanup: rootcmd use the common way of creating a cobra cmd 2021-07-23 10:20:50 +02:00
Thorsten Klein
a5c1d3becb
[Enhancement] Docs: update for v5 (first iteration) (#682) 2021-07-21 10:38:49 +02:00
iwilltry42
b94a057d9a
cleanup completion functions 2021-07-20 13:05:20 +02:00
iwilltry42
2516cad12e
allow for adding ports to a running cluster via the loadbalancer 2021-07-09 12:08:30 +02:00
iwilltry42
c6ee295deb
Merge branch 'main-v5' into feature/cluster-edit-ports 2021-07-09 10:55:40 +02:00
iwilltry42
d41b49d423
document using new nodefilter syntax with : instead of [] for indexing 2021-07-09 10:48:27 +02:00
iwilltry42
8e29ad4f1a
add some more portmapping work 2021-07-09 10:48:26 +02:00
iwilltry42
f6c3bd2e8b
clusterCreate: use tempfile with expanded env vars as viper input file 2021-07-09 10:48:25 +02:00
iwilltry42
7bcb1730c6
nodeCreate: remove dead code and parallelize adding nodes to the cluster completely 2021-07-09 10:48:24 +02:00
iwilltry42
e063405b02
some really final log output after creating/deleting nodes 2021-07-09 10:48:24 +02:00
iwilltry42
de401c6db3
add debug functionality to get current loadbalancer config 2021-07-09 10:46:17 +02:00
Thorsten Klein
77aa76d7f2
[FEATURE] add ability to add ports to an existing loadbalancer (#615) 2021-07-09 10:46:16 +02:00
ejose19
bfead49c46
[Enhancement] Refactoring: normalize label flags (k3s node & runtime) (#598, @ejose19) 2021-07-09 10:46:16 +02:00
Thorsten Klein
261ac0faf4
[BREAKING] Config File Enhancements: v1alpha3, migrations, generic k3s-args (#605)
Excerpt:
- new version v1alpha3 with k3s extraArgs using node filters
  - reflected in CLI via --k3s-arg
- new migration option to migrate (internally and via cli) from v1alpha2
to v1alpha3
- enhancements to how config files are being read
- e2e tests for config file migration
2021-07-09 10:46:12 +02:00
iwilltry42
296f24c9b7
Revert 'Revert "add --node-label flag for node create command (#584, @developer-guy, @ejose, @dentrax)"'
This reverts commit 70872648b3.
2021-07-09 10:45:30 +02:00
Thorsten Klein
c5f7884f78
[ENHANCEMENT] imageImport: start existing tools node before using it and add option to keep it around (#672) 2021-07-09 08:22:05 +02:00
iwilltry42
831e58fdce
init clusteredit 2021-07-07 17:12:00 +02:00
iwilltry42
bb237d3389
fix: do not allow the same direct port-mapping on more than one node 2021-07-07 15:52:18 +02:00
iwilltry42
6c06208b8f document using new nodefilter syntax with : instead of [] for indexing 2021-07-07 15:30:04 +02:00
iwilltry42
9574002b38 add some more portmapping work 2021-07-07 15:30:04 +02:00
iwilltry42
7db9275a5b
clusterCreate: use tempfile with expanded env vars as viper input file 2021-07-06 13:20:26 +02:00
iwilltry42
574148685d
nodeCreate: remove dead code and parallelize adding nodes to the cluster completely 2021-07-06 13:20:25 +02:00
iwilltry42
cc544a273e
some really final log output after creating/deleting nodes 2021-07-06 13:20:25 +02:00
iwilltry42
a928e41a2a
add debug functionality to get current loadbalancer config 2021-07-06 13:20:19 +02:00
Thorsten Klein
897e49a8ee
[FEATURE] add ability to add ports to an existing loadbalancer (#615) 2021-07-06 13:20:18 +02:00
ejose19
1deb0aa64d
[Enhancement] Refactoring: normalize label flags (k3s node & runtime) (#598, @ejose19) 2021-07-06 13:20:18 +02:00
Thorsten Klein
99fe3c75c4
[BREAKING] Config File Enhancements: v1alpha3, migrations, generic k3s-args (#605)
Excerpt:
- new version v1alpha3 with k3s extraArgs using node filters
  - reflected in CLI via --k3s-arg
- new migration option to migrate (internally and via cli) from v1alpha2
to v1alpha3
- enhancements to how config files are being read
- e2e tests for config file migration
2021-07-06 13:20:17 +02:00
iwilltry42
774af31d24
Revert 'Revert "add --node-label flag for node create command (#584, @developer-guy, @ejose, @dentrax)"'
This reverts commit 70872648b3.
2021-07-06 13:20:17 +02:00
Christian Mäder
3451675bc7
[Enhancement] Follow Docker's image nameing convention in k3d image import (#653, @cimnine) 2021-07-05 13:40:14 +02:00
iwilltry42
6c94d7db3d
overall/license: update to year range -2021 2021-05-21 13:07:59 +02:00