iwilltry42
c27410ea32
createCluster: Fix getHostIP edge cases
...
- sometimes, the exec process returns a non-zero exit code but still has
logs which are helpful for us
- sometimes everything fails and we should gracefully handle this
2020-10-07 11:02:46 +02:00
iwilltry42
11cc797922
overall/logging: new trace log level
...
- new root flag '--trace' with precedence over '--verbose'
- some new trace logs
- migrated some debug logs to trace logs to reduce debug verbosity
2020-10-07 08:58:03 +02:00
iwilltry42
da0b23331f
clusterCreate: less breaking hostIP injection
...
- only print a warning, if hostIP couldn't be fetched
- even if the exec returns a non-zero exit code, still try to read the
logs
2020-10-07 08:29:09 +02:00
iwilltry42
d063482a32
clusterCreate: add --no-hostip flag to disable the automatic injection of the host.k3d.internal entry into /etc/hosts and CoreDNS
2020-10-05 15:19:00 +02:00
iwilltry42
60069f6f19
fix typo
2020-10-01 21:10:04 +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
b5a9d6397f
fix unittests
2020-09-20 17:53:41 +02:00
iwilltry42
5fbd42898e
clusterStart: also don't wait for serverlb if it's running already
2020-08-14 12:15:03 +02:00
iwilltry42
d5709b9a09
clusterStart: do not try to start node if it's already running to avoid waiting forever on a log message
2020-08-14 12:09:29 +02:00
Thorsten Klein
b029655c8b
Merge pull request #328 from rancher/feature/node-status
...
[Feature] Node Status
2020-08-13 19:04:40 +03:00
iwilltry42
d3c5cfb766
fix: allow allow port-ranges on the loadbalancer
2020-08-12 15:58:00 +02:00
iwilltry42
cc3fe46a23
clusterList: include node state
2020-08-12 11:24:15 +02:00
iwilltry42
1285fb90c4
overall: add node status field
2020-08-12 11:14:18 +02:00
kshelton
eaa7784625
Handle leading '/' in names for docker runtime
2020-08-06 18:03:49 +00:00
iwilltry42
e5d093d3ce
clusterList: add bool for loadbalancer
2020-07-15 09:10:47 +02:00
iwilltry42
ec3f10ec57
use server/agent instead of master/worker
2020-07-14 20:29:33 +02:00
iwilltry42
b02c783130
adjust toplevel pkg functions to new syntax
2020-07-14 15:02:51 +02:00
iwilltry42
eac293a263
Overall: helper container images should always use same tag as CLI or fallback to latest
2020-06-18 09:01:04 +02:00
iwilltry42
76d90478f5
Go Module: use v3 for go module compatibility
2020-06-18 07:58:36 +02:00
iwilltry42
3cd1a05b91
Maintenance: move all labels to constants and fix log formatting issues
2020-06-12 19:00:01 +02:00
iwilltry42
5643b4e60c
proxy: increase timeout to 10 minutes
...
- prevent stream from breaking during e.g. 'kubectl get logs -f POD'
Fixes #276
2020-06-12 12:47:32 +02:00
iwilltry42
2d0ec0a1d0
createNode: fix log output generating nil pointer...
...
... dereference in addNodeToCluster when cluster does not exist.
Fixes #277
2020-06-12 12:39:36 +02:00
iwilltry42
bdb5a1f858
getKubeconfig: fix condition when no overwriting contexts
...
Reference: https://github.com/rancher/k3d/pull/268#issuecomment-639829646
2020-06-10 19:20:02 +02:00
iwilltry42
76b7450b02
remove --runtime root flag and make docker the default
2020-06-05 08:50:47 +02:00
iwilltry42
dc740d5829
loadImage: exit early if no valid image was specified
2020-06-04 15:30:01 +02:00
iwilltry42
f39a9513fd
dependencies: update docker dependencies to fix issues with failing windows builds introduced by the usage of the archive package
2020-06-04 15:03:18 +02:00
iwilltry42
dbb24f4e1c
loadImages: accept mixed runtimeImage and tarball args
...
- loads images from tarballs and runtime
- only tries to do something if respective lists are not empty
- only creates tools node if it's not present yet
- uses new tools image to remove tarballs after process
2020-06-04 11:55:40 +02:00
iwilltry42
933ac38059
loadImages: loop over all input images
2020-06-04 09:50:45 +02:00
iwilltry42
7dec0cc1be
Merge branch 'master' of github.com:rancher/k3d into feature/load-images-from-tar
2020-06-04 08:58:29 +02:00
iwilltry42
487393bbde
loadImage: cleanup command and initiate enhancements
2020-06-04 08:36:52 +02:00
Antoine
0862f11324
👌 replace k3d getk3stoken command by --token flag onto command k3d get cluster
2020-06-04 00:56:02 +02:00
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
Antoine
6d9d5a0cc4
✨ Add get k3stoken feature
...
Add new command verb `k3stoken` to `k3d get`
Populate cluster secret field
Add test for `k3d get k3stoken` command
Externalize validable flag `--all`, in anticipation to reuse into `getKubeConfig.go`
2020-06-04 00:49:12 +02:00
Antoine
f6eaf25a2e
♻️ Some side effect refactoring
...
Print usage When no k3d verb was specify
Replace fake Cluster object create into getKubeConfig by realy complete object obtain thanks to cluster.GetCluster() function
Use constant variable for node Label name use into populateClusterFieldsFromLabels() function, in forecast to rename label `k3d.cluster.secret` to `k3d.cluster.token`
2020-06-04 00:49:08 +02:00
iwilltry42
42ee62e552
createNode: add --wait and --timeout flags
...
- new struct: createNodeOpts for wait and timeout values
- new commands for creating/adding multiple nodes which then wait for
all nodes to be up, if specified
- tests/e2e: new test for adding a master node
2020-06-03 14:55:50 +02:00
iwilltry42
eeaa25dce6
WaitForNodeLogMessage: move default expected messages to constants
2020-06-03 14:16:09 +02:00
iwilltry42
ee8b34d9f6
createNode: do not copy '--cluster-init' when creating a new master node, as this will break the node
2020-06-03 13:40:13 +02:00
iwilltry42
b28f93d207
UpdateLoadbalancerConfig: deduplicate and warn if node is down
...
- getCluster: now deduplicates the node list (i.e. overwrites existing
nodes in the list with "fresh" nodes and appends new ones)
- UpdateLoadbalancerConfig: print warning if "host not found in
upstream" returned by nginx after updating the config, as it's not a
failure per se, but shouldn't be ignored
2020-06-03 12:52:10 +02:00
iwilltry42
f0d3389a1f
removeNode: update loadbalancer if master
...
- use idempotent UpdateKubeconfig which takes a fresh list of master
nodes and uses it to update the loadbalancer
- removeNode: use aforementioned function to update the loadbalancer
config when removing a master node
2020-06-02 20:03:42 +02:00
iwilltry42
477fe8b395
Merge branch 'master' of github.com:rancher/k3d into enhancement/use-context
2020-06-02 19:26:20 +02:00
iwilltry42
ae9be0603d
volumes: only warn about possible issues and don't error out
...
- allows for specifying more possibilities
2020-05-29 14:26:18 +02:00
iwilltry42
cf2c839b27
createNode: use default role label and cmd...
...
...if existing node does not match target role
Fixes #254
2020-05-29 14:03:51 +02:00
iwilltry42
16f01f5fc9
runtime/getNode: do not return nil
...
- fixes : #253
2020-05-29 13:34:11 +02:00
iwilltry42
d3766a5a1e
createCluster: also wait for loadbalancer to be up and running before returning
2020-05-29 12:33:22 +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
99f5a6884a
getNodeLogs: accept time.Time parameter
...
- fixes startCluster's --wait/--timeout functionality
--> now doesn't check all the logs (e.g. from previous run)
----> no more false positives when checking for a specifc log message
only in the current run
2020-05-29 11:21:12 +02:00
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
06f543518c
fix: re-add support for named volumes used with --volume flag
2020-05-28 11:01:25 +02:00