538 Commits

Author SHA1 Message Date
Antoine
07be211bca
💚 fix ci review unchecked function error 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
Antoine
a6aa1ff2d2
🔧 Update Makefile and .gitignore
Add go compiler flag to makefile
Add makefile target with debug compiler flag
Exclude Idea project file
2020-06-04 00:43:08 +02:00
Thorsten Klein
c19cb27251
Merge pull request #261 from rancher/feature/create-cluster-switch
[Feature] create cluster --switch
v3.0.0-rc.0
2020-06-03 16:24:48 +02:00
iwilltry42
2ae5535ac0
docs: add --switch flag to command tree 2020-06-03 16:22:22 +02:00
iwilltry42
a279e1259e
createCluster: add --switch command for kubeconfig current-context 2020-06-03 16:21:06 +02:00
Thorsten Klein
54c640ad62
Merge pull request #260 from rancher/enhancement/get-more-nodes-clusters
[Enhancement] get: allow multiple or no names for getCluster/getNodes
2020-06-03 15:52:37 +02:00
iwilltry42
b8886b86c4
get: allow multiple or no names for getCluster/getNodes
- no name: get all
- one or more name: get only named nodes/clusters
2020-06-03 15:51:21 +02:00
Thorsten Klein
c55658c5fe
Merge pull request #259 from rancher/enhancement/create-node-wait
[Enhancement] createNode: add --wait and --timeout flags
2020-06-03 15:10:56 +02:00
iwilltry42
8fc407be84
docs: add 'create node --wait --timeout X' flags explanations 2020-06-03 14:59:21 +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
Thorsten Klein
d0c24fed99
Merge pull request #258 from rancher/update-loadbalancer-cases
[Enhancement] Update loadbalancer if handling master nodes
2020-06-03 12:54:36 +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
Thorsten Klein
4491dfcc29
Merge pull request #244 from rancher/enhancement/use-context
[Enhancement] v3/overall: use context.Context everywhere (creating possibilities without breaking interfaces later)
2020-06-02 19:31:19 +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
ff3990a01b
docs: fix link and k3d command in registries doc 2020-06-02 19:26:00 +02:00
iwilltry42
6eb561152e
docs: port and adapt registries section from master-v1 2020-06-02 19:20:11 +02:00
iwilltry42
ae9be0603d
volumes: only warn about possible issues and don't error out
- allows for specifying more possibilities
v3.0.0-beta.2
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
4ce4dcce4c
Merge branch 'master' of github.com:rancher/k3d 2020-05-29 13:04:00 +02:00
iwilltry42
a3375abf23
installScript: grep for line containing 'k3d version' when checking for version due to multiline output 2020-05-29 13:03:17 +02:00
Thorsten Klein
0c5ca44349
Merge pull request #256 from izzatzr/InstallScriptFix
use version command in install script (thanks @izzatzr)
2020-05-29 13:01:28 +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
Thorsten Klein
637c48e63c
Merge pull request #252 from rancher/feature/start-cluster-wait-for-master
[Feature] v3/startCluster: add --wait and --timeout
2020-05-29 11:28:51 +02:00
iwilltry42
5afa25154c
docs: add some notes about 'k3d start cluster --wait --timeout' 2020-05-29 11:26:27 +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
Izzat Zuliya R
898dbda4fc
Update install.sh
change --version flag to new v3 subcommand
2020-05-29 12:46:48 +07: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
Thorsten Klein
acf4cd2011
Merge pull request #251 from rancher/fix/support-named-volumes
fix: re-add support for named volumes used with --volume flag
2020-05-28 11:05:31 +02:00
iwilltry42
06f543518c
fix: re-add support for named volumes used with --volume flag 2020-05-28 11:01:25 +02:00
iwilltry42
dabec2f091
createCluster: fix loadblancer consideration
- issue #248: nil pointer dereference because we're trying to access
non-existent loadblancer node
2020-05-27 18:23:39 +02:00
Thorsten Klein
2a0b425f67
Merge pull request #250 from lionelnicolas/bugfix/fix-copy-paste-in-makefile
installScript: fix duplication in curl command (thanks @lionelnicolas)
2020-05-27 07:20:14 +02:00
Lionel Nicolas
1c7eaf7f35 installScript: fix duplication in curl command 2020-05-26 23:06:23 -04:00
Thorsten Klein
7aa4a1f4b6
Merge pull request #249 from rancher/latest-k3s-from-channel-server
[Enhancement] installScript: use channel server to fetch latest stable k3s version
2020-05-26 18:35:05 +02:00
iwilltry42
cb2a3bad2f
installScript: use channel server to fetch latest stable k3s version 2020-05-26 18:03:11 +02:00
iwilltry42
0270ac7327
createCluster: take loadbalancer into consideration when mapping ports 2020-05-26 17:20:38 +02:00
iwilltry42
7817054801
do not use context pointer 2020-05-26 17:15:20 +02:00
iwilltry42
f6c312256e
add names to error messages 2020-05-26 15:12:34 +02:00
iwilltry42
ba431c6235
Merge branch 'master' of github.com:rancher/k3d into enhancement/use-context 2020-05-26 14:49:45 +02:00
iwilltry42
434cf8e91d
overall: pass context from top to bottom 2020-05-26 14:47:21 +02:00
Thorsten Klein
c531a7b4bb
Merge pull request #246 from vandot/master
install.sh: remove unneeded echo for uname (thanks @vandot)
2020-05-26 14:17:03 +02:00
iwilltry42
21fd427d8a
maintenance: cleanup debug logs 2020-05-26 14:14:55 +02:00
iwilltry42
639daef7fb
Reorder parameters
- runtimes.Runtime should at max. the second function parameter (right
after context.Context)
2020-05-26 12:58:43 +02:00