iwilltry42
2aecabb8ca
add node commands
4 years ago
iwilltry42
08f7a47119
new syntax for cluster creation and kubeconfig manipulation
4 years ago
iwilltry42
24f92b9c3f
createCluster: use default 6443 api port in hostNetwork mode
...
Fixes #284
4 years ago
iwilltry42
76d90478f5
Go Module: use v3 for go module compatibility
4 years ago
iwilltry42
0b23807d44
createCluster: make '--wait' be true by default
4 years ago
iwilltry42
3cd1a05b91
Maintenance: move all labels to constants and fix log formatting issues
4 years ago
iwilltry42
d6b5d4dbf5
createCluster: fallback to default api port if random allocation fails
4 years ago
iwilltry42
3205cbac67
createCluster: ask OS/kernel for free port...
...
... instead of leaving this up to docker, since then we don't know about
it when creating the labels, etc. used e.g. for updating the kubeconfig with
the correct port
4 years ago
iwilltry42
711e1ed048
createCluster: use random hostPort for API-Port by default
...
- this makes it easier to create multiple clusters without having to
worry about choosing a different port every time
- This is for you @ibuildthecloud ;)
4 years ago
iwilltry42
5643b4e60c
proxy: increase timeout to 10 minutes
...
- prevent stream from breaking during e.g. 'kubectl get logs -f POD'
Fixes #276
4 years ago
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