iwilltry42
2d0ec0a1d0
createNode: fix log output generating nil pointer...
...
... dereference in addNodeToCluster when cluster does not exist.
Fixes #277
4 years ago
iwilltry42
2d6a67822c
remove fixed FIXME :)
4 years ago
iwilltry42
374d9d16d7
completion: NodeRoles for '--role' flag on 'create node'
4 years ago
iwilltry42
5020259cb5
completion: improve short/long command descriptions
4 years ago
iwilltry42
91425d3738
completion: AvailableClusters for '--cluster' flag in createNode and loadImage
4 years ago
iwilltry42
45a7b2dd7d
completion: new ValidArgsAvailableNodes
...
- completion proposes list of existing nodes
- available for get/delete/start/stop node
4 years ago
iwilltry42
d3f7621ed8
completion: use AvailableClusters completion for start, stop, delete, getKubeconfig
4 years ago
iwilltry42
2e75b90ffb
completion/getCluster: move validargs function to util package
4 years ago
iwilltry42
17c1fccd9c
completion: add custom completion for 'get clusters'
4 years ago
iwilltry42
76b7450b02
remove --runtime root flag and make docker the default
4 years ago
iwilltry42
c83341b512
loadImage: add command alias
4 years ago
iwilltry42
933ac38059
loadImages: loop over all input images
4 years ago
iwilltry42
487393bbde
loadImage: cleanup command and initiate enhancements
4 years ago
Antoine
0862f11324
👌 replace `k3d getk3stoken` command by `--token` flag onto command `k3d get cluster`
4 years ago
iwilltry42
ad06e90e13
fix issues with context.Context and remove LOG_LEVEL=debug in e2e test
4 years ago
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
4 years ago
Antoine
07be211bca
💚 fix ci review unchecked function error
4 years ago
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`
4 years ago
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`
4 years ago
iwilltry42
a279e1259e
createCluster: add --switch command for kubeconfig current-context
4 years ago
iwilltry42
b8886b86c4
get: allow multiple or no names for getCluster/getNodes
...
- no name: get all
- one or more name: get only named nodes/clusters
4 years ago
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
4 years ago
iwilltry42
ae9be0603d
volumes: only warn about possible issues and don't error out
...
- allows for specifying more possibilities
4 years ago
iwilltry42
cf2c839b27
createNode: use default role label and cmd...
...
...if existing node does not match target role
Fixes #254
4 years ago
iwilltry42
5afa25154c
docs: add some notes about 'k3d start cluster --wait --timeout'
4 years ago
iwilltry42
332c3a8c9b
startCluster: add --wait and --timeout
...
- functionality mostly copy-pasted from createCluster
4 years ago
iwilltry42
06f543518c
fix: re-add support for named volumes used with --volume flag
4 years ago
iwilltry42
dabec2f091
createCluster: fix loadblancer consideration
...
- issue #248 : nil pointer dereference because we're trying to access
non-existent loadblancer node
4 years ago
iwilltry42
0270ac7327
createCluster: take loadbalancer into consideration when mapping ports
4 years ago
iwilltry42
434cf8e91d
overall: pass context from top to bottom
4 years ago
iwilltry42
21fd427d8a
maintenance: cleanup debug logs
4 years ago
iwilltry42
639daef7fb
Reorder parameters
...
- runtimes.Runtime should at max. the second function parameter (right
after context.Context)
4 years ago
iwilltry42
0d2c22455d
Overall: use context.Context in top-level exported functions
...
- package cluster: use context.Context as first function param in every
exported function
- package cmd: pass cmd.Context() to calls to package cluster exported
functions
4 years ago
iwilltry42
e788614ff1
rootCmd: add back --version flag
4 years ago
iwilltry42
9c9f49646e
MasterLoadBalancer: add nodefilter & extra treatment
...
- masterlb is now an extra part of the cluster spec
- ports can now be attached to masterlb by using the 'loadbalancer'
nodefilter
- all ports exposed on the masterlb will be proxied to all master nodes
(on the same port)
4 years ago
iwilltry42
3071ec5755
createCluster: add --no-lb flag to disable the load balancer
...
- does not create the load balancer node
- exposes the API port on the first master node (master-0)
4 years ago
iwilltry42
ecea154735
docs: add website link
4 years ago
iwilltry42
c6564801f3
getKubeconfig: always return output filepath
4 years ago
iwilltry42
de9ee91083
getKubeconfig: allow specifying one or more clusters or '--all'
4 years ago
iwilltry42
05f2fc1f66
docs: add more command information
4 years ago
iwilltry42
2d68ef12e4
deleteCluster: remove cluster details from kubeconfig
...
- refactoring in pkg/cluster/kubeconfig
- new functions to delete a cluster from kubeconfig
- call RemoveClusterFromDefaultKubeConfig after deleting cluster
4 years ago
iwilltry42
5b637126d7
createCluster: add --update-kubeconfig flag
...
- enables wait-for-master
- calls GetAndWriteKubeConfig after successful cluster creation to
update the default kubeconfig with the new cluster's details
- does NOT automatically switch the current-context
- outputs a different line saying, that you can switch context now
4 years ago
iwilltry42
6677f82d5b
getKubeConfig: consider the KUBECONFIG env var when updating default kubeconfig
4 years ago
iwilltry42
5b1e723fdd
createCluster: add more detailed description and info regarding api port
4 years ago
iwilltry42
091190447c
createCluster: fix final print after cluster creation on windows (different setting of env vars)
4 years ago
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
4 years ago
iwilltry42
d9e0e0f914
getKubeConfig: update existing kubeconfigs
4 years ago
iwilltry42
407fcd4e1f
rename to UpdateKubeConfig
4 years ago
Jacob Weinstock
fdd5e5a57a
log to stdout or stderr depending on the log level
4 years ago
iwilltry42
c51ec003bd
createCluster/network: add basic support for hostnetwork mode in docker
4 years ago