hetzner-k3s 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4f45064341000a4cf3a3ec6aef60c2b26eb95758e3c0e1d16c87740b8e549834
4
- data.tar.gz: 0ec683973e5c27811c8f9a2d82804ce3721d9a93137c46d15087f8e06a9fe4b2
3
+ metadata.gz: 362875671a52928fd320f24cb0ef38728fe85f5395282f8d9df9550c8531162f
4
+ data.tar.gz: b873e5f6823a443f48577a5126c20f2b5b4db3a1e2c4fb791af059718cbf39a0
5
5
  SHA512:
6
- metadata.gz: 7ac95d48d017c7997c3e20b7dd3d5160bf5188a4bff9144efc382606bf2d83462221287b8ba9c16ff62b5f3687486f310f042add4c50f06228e0f2da4afb63db
7
- data.tar.gz: bd2caff255115cdd82582b5c143249ca92983d4232ab77ba03fe5d4719fc812dfb3af7b8617fc6adaa0c9093ef66c0b6f1cdbdee5f60c25e5f2f819fc6fa8f0b
6
+ metadata.gz: ecee605e0fc079b62a3cd6af152d30dbdb7ea5cb4785f8a2bcda6218996f7a86bcdcac23f0010d61f6a16e7964f6e587f0c6e0a54ba41c790af15c6490b3ecdb
7
+ data.tar.gz: 476d5dd9a39dfd45258cd32d208e3e15d6f79f6cf326d482694e6b6311259731ebb090965fc1dcefbb216ee25cd5e01cbdfb36d5a65bafa9a80e56eb047e3d7c
data/Dockerfile ADDED
@@ -0,0 +1,11 @@
1
+ FROM ruby:2.7.4-alpine
2
+
3
+ RUN apk update --no-cache \
4
+ && apk add build-base git openssh-client
5
+
6
+ RUN gem install hetzner-k3s
7
+
8
+ COPY entrypoint.sh /entrypoint.sh
9
+
10
+ ENTRYPOINT ["/entrypoint.sh"]
11
+
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hetzner-k3s (0.3.3)
4
+ hetzner-k3s (0.3.4)
5
5
  bcrypt_pbkdf
6
6
  ed25519
7
7
  http
data/README.md CHANGED
@@ -33,6 +33,16 @@ gem install hetzner-k3s
33
33
 
34
34
  This will install the `hetzner-k3s` executable in your PATH.
35
35
 
36
+ ### With Docker
37
+
38
+ Alternatively, if you don't want to set up a Ruby runtime but have Docker installed, you can use a container. Run the following from inside the directory where you have the config file for the cluster (described in the next section):
39
+
40
+ ```bash
41
+ docker run --rm -it -v ${PWD}:/cluster -v ${HOME}/.ssh:/tmp/.ssh vitobotta/hetzner-k3s create-cluster --config-file /cluster/test.yaml
42
+ ```
43
+
44
+ Replace `test.yaml` with the name of your config file.
45
+
36
46
  ## Creating a cluster
37
47
 
38
48
  The tool requires a simple configuration file in order to create/upgrade/delete clusters, in the YAML format like in the example below:
@@ -60,6 +70,9 @@ worker_node_pools:
60
70
 
61
71
  It should hopefully be self explanatory; you can run `hetzner-k3s releases` to see a list of the available releases from the most recent to the oldest available.
62
72
 
73
+ If you are using Docker, then set `kubeconfig_path` to `/cluster/kubeconfig` so that the kubeconfig is created in the same directory where your config file is.
74
+
75
+
63
76
  If you set `masters.instance_count` to 1 then the tool will create a non highly available control plane; for production clusters you may want to set it to a number greater than 1. This number must be odd to avoid split brain issues with etcd and the recommended number is 3.
64
77
 
65
78
  You can specify any number of worker node pools for example to have mixed nodes with different specs for different workloads.
@@ -214,6 +227,9 @@ Once the cluster is ready you can create persistent volumes out of the box with
214
227
 
215
228
  ## changelog
216
229
 
230
+ - 0.3.4
231
+ - Added Docker support
232
+
217
233
  - 0.3.3
218
234
  - Add some gems required on Linux
219
235
 
data/entrypoint.sh ADDED
@@ -0,0 +1,12 @@
1
+ #!/bin/sh
2
+
3
+ cp -R /tmp/.ssh /root/.ssh
4
+ chmod 700 /root/.ssh
5
+ chmod 600 /root/.ssh/*
6
+ chmod 644 /root/.ssh/*.pub
7
+
8
+ eval $(ssh-agent -s) 2&>1 > /dev/null
9
+
10
+ ssh-add ~/.ssh/* 2&>1 > /dev/null
11
+
12
+ hetzner-k3s "$@"
@@ -1,5 +1,5 @@
1
1
  module Hetzner
2
2
  module K3s
3
- VERSION = "0.3.3"
3
+ VERSION = "0.3.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hetzner-k3s
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vito Botta
@@ -121,6 +121,7 @@ files:
121
121
  - ".rspec"
122
122
  - ".travis.yml"
123
123
  - CODE_OF_CONDUCT.md
124
+ - Dockerfile
124
125
  - Gemfile
125
126
  - Gemfile.lock
126
127
  - LICENSE.txt
@@ -129,6 +130,7 @@ files:
129
130
  - bin/console
130
131
  - bin/setup
131
132
  - cluster_config.yaml.example
133
+ - entrypoint.sh
132
134
  - exe/hetzner-k3s
133
135
  - hetzner-k3s.gemspec
134
136
  - lib/hetzner.rb