Commit Graph

60 Commits

Author SHA1 Message Date
iwilltry42
6c94d7db3d
overall/license: update to year range -2021 2021-05-21 13:07:59 +02:00
iwilltry42
d7b25ac6ab
v3 -> v4 2020-12-04 13:45:57 +01:00
iwilltry42
76d90478f5
Go Module: use v3 for go module compatibility 2020-06-18 07:58:36 +02:00
iwilltry42
bc49f197d9
cleanup and prepare for push to rancher/k3d 2020-01-05 21:16:31 +01:00
iwilltry42
bdcdbd817a init cobra 2019-09-03 12:04:02 +02:00
misakwa
4e52afd578 Add agent-arg and pass through to container 2019-07-30 23:08:40 -05:00
iwilltry42
081ec611bc --keep flag to not remove the tarball after import 2019-07-11 15:43:49 +02:00
iwilltry42
deccb0122a enable importing multiple images at once 2019-07-01 12:17:03 +02:00
iwilltry42
ab2c54ca1d add import-image command for importing single image 2019-07-01 11:31:35 +02:00
Andy Zhou
f037e1b225 Deprecate --timeout, shift shot hand options around
We have been giving user warnings about --timeout going away for a
while. Now fully deprecate it.

Use -t for --wait option

Move -w from --wait to --workers. Many users of K3d generate multi-node
clusters, -w will make their life easier.
2019-06-06 12:26:26 -07:00
Andy Zhou
1565e43365 Modify --api-port to take a stirng argument
--api-port only takes the port as argument. This patch modifies it to
take a string argument, in the form of host:port.
2019-06-03 17:16:46 -07:00
iwilltry42
f771dcf8b5 shell flag text 2019-05-31 12:34:44 +02:00
iwilltry42
eb5b88052e add auto mode for shell based on SHELL env var and support zsh 2019-05-29 09:14:36 +02:00
Andy Zhou
abd9a984eb Add --shell argument
Add subshell argument --shell. Currently, support only bash, which is
also the default value.
2019-05-27 17:16:04 -07:00
Andy Zhou
d63f7d4bf2 Rename bash command to shell
@iwilltry42 suggested to group all shell support under and single
subcommand -- shell.
2019-05-27 17:14:43 -07:00
Andy Zhou
2971dd6845 Add the ability to execute commands directly with the bash subcommand
In addition to provide an interactive shell, this patch adds the
'--command' and '-c' options to allow user to issue a command in the
context of a cluster.

For example:

$ k3d bash -c 'kubectl cluster-info'
2019-05-24 17:16:12 -07:00
Andy Zhou
4ef6710e22 Add basic bashShell() function
Add the basic frame work for supporting spawning a bash shell by cli
command.

With this change, we can spawn a bash shell in the context of a cluster

$ k3d create -n my-cluster
$ k3d bash -n my-cluster
[my-cluster] $>

// execute commands with KUBECONFIG already set up
[my-cluster] $> kubectl get pods
2019-05-24 17:16:12 -07:00
Andy Zhou
6dfb1e054b
Merge pull request #61 from andyz-dev/always-on
[Feature] Implement --always-on flag for the create command
2019-05-21 10:46:00 -07:00
Andy Zhou
b9713c4ac4 Add --auto-restart flag for the create command
When creating clusters with the --auto-restart flag, any running cluster
will remain "running" up on docker daemon restart.

By default, without this flag, a "running" cluster becomes "stopped"
after docker daemon restart.

Clusters stopped with 'k3d stop' command will remain stopped after
docker daemon restart regardless the settings of this flag.
2019-05-21 09:31:45 -07:00
Andy Zhou
3683eeb181 Deprecate the --timeout option
Use --wait <timeout> instead
2019-05-20 14:07:12 -07:00
Andy Zhou
c3c8f0d6f8 Golang format clean up
Changes made by 'make fmt'.
2019-05-16 00:02:10 -07:00
Andy Zhou
a0eb69b73e Allow the volume argument to be specified multiple times
Most k3d arguments are using in "stringSlice" style, allowing the
argument to supplied multiple times. Currently "volume" is an exception
to this style, require multiple arguments to be supplied in a single
argument, separated by comma.

This commit improve the k3d usability by improve the consistency of its
argument style.
2019-05-15 09:35:07 -07:00
iwilltry42
464d2e23c5 Offset multiplication 2019-05-14 13:13:56 +02:00
iwilltry42
107700dc98 update log messages 2019-05-14 13:12:10 +02:00
iwilltry42
a0c0c3ff9d add --api-port and --port-auto-offset 2019-05-13 09:08:32 +02:00
iwilltry42
7d6ae201e9 make node-specifier mandatory 2019-05-13 08:12:09 +02:00
Andy Zhou
32cc70b599
Merge pull request #32 from andyz-dev/publish
[Feature] Add --publish/--add-port flag for port mappings
2019-05-09 01:09:40 -07:00
Andy Zhou
4ebf34218b Consolidate the default cluster name into as single definition
To ensure all reference of the default cluster name are the same.
Not having to check for typos will make it easier to maintain.
2019-05-08 11:30:56 -07:00
iwilltry42
15b1326456 [bugfix] default name without underscore 2019-05-08 18:28:38 +02:00
Andy Zhou
f70a8b42f7 Add support for the --publish option for create subcommand
Inspired by the docker CLI, --publish take same input as docker CLI and
provides similar functions. For the k3s cluster server node, it behaves
the same as docker cli; it exports the k3d server ports to the host
ports.

Handling for worker nodes will be added in the subsequent patches.

This option can be used mutiple times for exposing more ports.

--add-port is an alias to this option.
2019-05-08 01:45:16 -07:00
iwilltry42
40fb583160 better image and version flags 2019-05-07 09:09:05 +02:00
iwilltry42
e78a548da2 [Feature] add --image/-i flag to specify custom k3s image 2019-05-06 08:13:11 +02:00
iwilltry42
942e667b24 add some comments 2019-04-29 08:19:01 +02:00
iwilltry42
6fdc1e4a70 automatically get latest k3s version tag at build time 2019-04-23 11:12:42 +02:00
iwilltry42
a26aa65782 make k3s v0.4.0 default version 2019-04-17 09:45:42 +02:00
iwilltry42
7eec5b061b use docker sdk wherever possible 2019-04-15 15:48:43 +02:00
iwilltry42
866b98c429 rename and add authors 2019-04-12 07:36:59 +02:00
iwilltry42
65b5f06bfc add server-arg and env flags 2019-04-11 14:31:46 +02:00
iwilltry42
4e477d3262 rename to k3d 2019-04-10 20:10:36 +02:00
Rishabh Gupta
29fced4ef7 Added version tags, separated command implementaitons, added wait and timeout
Signed-off-by: Rishabh Gupta <r.g.gupta@outlook.com>
2019-04-09 13:47:47 +05:30
iwilltry42
476e3de625 improve cluster handling via struct and add --all flag to commands 2019-04-09 09:16:09 +02:00
iwilltry42
845339e9da add install script 2019-04-09 07:59:30 +02:00
Darren Shepherd
68c38a104f Add ls and l alias to list
I find myself typing ls often by accident.
2019-04-09 07:59:30 +02:00
iwilltry42
fae59d652a update readme and bump version 2019-04-09 07:59:30 +02:00
iwilltry42
58a32b3003 add --all flag to every command where it makes sense 2019-04-04 09:46:03 +02:00
Thorsten Klein
a35051001a
Merge pull request #1 from ibuildthecloud/master
Improve logging of command and add help text for users
2019-04-04 09:23:52 +02:00
iwilltry42
1f417ce948 enhanced list 2019-04-04 09:19:26 +02:00
iwilltry42
8758d5b48d cleanup and add travis 2019-04-04 08:08:09 +02:00
iwilltry42
a1cdcc26c7 general purpose getClusters 2019-04-03 21:48:07 +02:00
Darren Shepherd
9bb89374ce Make get-kubeconfig scriptable and add more info at cluster create
After cluster create just print a simple command line to the screen to
help the user along.
2019-04-03 10:47:46 -07:00