hetzner-k3s 0.3.8 → 0.3.9

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: 3fdaf203f7f6bd6c8fec1ef578ab63bb252646975a1e8fcbc9163c6383cb89f7
4
- data.tar.gz: 24281bf2c3e1aa4ee234e36bb847e7e3282f7c468284c2b97e4eae6630d33fa3
3
+ metadata.gz: 9c3b95ba8775783388acc881cbffd928c3fb00d92b6e6a5369b2bbd47f163aae
4
+ data.tar.gz: 495ea16d040b3808cb069ef6b03cec04bd7e6dd8f3fe7e623e7e49a1e3dc6eb3
5
5
  SHA512:
6
- metadata.gz: a2d0012766b865d8625c23de2ce4585235765d527732a7352b24dcdfab92a27666df02b12d0b2c362d44c91f98556e806fc31e6c95f906d9a3441cf0b5e668df
7
- data.tar.gz: 3f069ba0a23f430e0647c666da5acd65fdc9d05cc3d3ab55e1f761251d6e11f7cfda04a1d15d95fef68cde21235a779defd7644d55fb48bc9e08412135a447b5
6
+ metadata.gz: 01a31eca33e328550f1583ff036c9002f8deb784bb76e0cb1e01df0677be9d678bfae1f619354bdb538ced6ba3a95bb5f03180429536c245e822372b452e82a7
7
+ data.tar.gz: aa92fef9440c4e85afe30bbecb86091f44d0cd693c71b44b141432199f1c710488f6b7dfbf0dd59658d8a9d341414c5c75ea5d162cff12b10949f22cd0ef1cda
data/Dockerfile CHANGED
@@ -3,8 +3,7 @@ FROM ruby:2.7.4-alpine
3
3
  RUN apk update --no-cache \
4
4
  && apk add build-base git openssh-client
5
5
 
6
- COPY Gemfile Gemfile
7
- COPY hetzner-k3s.gemspec hetzner-k3s.gemspec
6
+ COPY . .
8
7
 
9
8
  RUN gem install hetzner-k3s
10
9
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hetzner-k3s (0.3.8)
4
+ hetzner-k3s (0.3.9)
5
5
  bcrypt_pbkdf
6
6
  ed25519
7
7
  http
data/README.md CHANGED
@@ -38,7 +38,7 @@ This will install the `hetzner-k3s` executable in your PATH.
38
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
39
 
40
40
  ```bash
41
- docker run --rm -it -v ${PWD}:/cluster -v ${HOME}/.ssh:/tmp/.ssh vitobotta/hetzner-k3s:v0.3.7 create-cluster --config-file /cluster/test.yaml
41
+ docker run --rm -it -v ${PWD}:/cluster -v ${HOME}/.ssh:/tmp/.ssh vitobotta/hetzner-k3s:v0.3.8 create-cluster --config-file /cluster/test.yaml
42
42
  ```
43
43
 
44
44
  Replace `test.yaml` with the name of your config file.
@@ -72,6 +72,9 @@ It should hopefully be self explanatory; you can run `hetzner-k3s releases` to s
72
72
 
73
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
74
 
75
+ **Important**: The tool assignes the label `cluster` to each server it creates, with the clsuter name you specify in the config file, as the value. So please ensure you don't create unrelated servers in the same project having
76
+ the label `cluster=<cluster name>`, because otherwise they will be deleted if you delete the cluster. I recommend you create a separate Hetzner project for each cluster, see note at the end of this README for more details.
77
+
75
78
 
76
79
  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.
77
80
 
@@ -225,10 +228,18 @@ The other annotations should be self explanatory. You can find a list of the ava
225
228
  Once the cluster is ready you can create persistent volumes out of the box with the default storage class `hcloud-volumes`, since the Hetzner CSI driver is installed automatically. This will use Hetzner's block storage (based on Ceph so it's replicated and highly available) for your persistent volumes. Note that the minimum size of a volume is 10Gi. If you specify a smaller size for a volume, the volume will be created with a capacity of 10Gi anyway.
226
229
 
227
230
 
231
+ ## Keeping a project per cluster
232
+
233
+ I recommend that you create a separate Hetzner project for each cluster, because otherwise multiple clusters will attempt to create overlapping routes. I will make the pod cidr configurable in the future to avoid this, but I still recommend keeping clusters separated from each other. This way, if you want to delete a cluster with all the resources created for it, you can just delete the project.
234
+
235
+
228
236
  ## changelog
229
237
 
238
+ - 0.3.9
239
+ - Add command "version" to print the version of the tool in use
240
+
230
241
  - 0.3.8
231
- - Fix: added a check on a label to ensure that only servers that belong to the cluster are deleted from the project.
242
+ - Fix: added a check on a label to ensure that only servers that belong to the cluster are deleted from the project
232
243
 
233
244
  - 0.3.7
234
245
  - Ensure that the cluster name only contains lowercase letters, digits and dashes for compatibility with the cloud controller manager
@@ -3,6 +3,7 @@ require "http"
3
3
  require "sshkey"
4
4
 
5
5
  require_relative "cluster"
6
+ require_relative "version"
6
7
 
7
8
  module Hetzner
8
9
  module K3s
@@ -11,6 +12,11 @@ module Hetzner
11
12
  true
12
13
  end
13
14
 
15
+ desc "version", "Print the version"
16
+ def version
17
+ puts Hetzner::K3s::VERSION
18
+ end
19
+
14
20
  desc "create-cluster", "Create a k3s cluster in Hetzner Cloud"
15
21
  option :config_file, required: true
16
22
 
@@ -1,5 +1,5 @@
1
1
  module Hetzner
2
2
  module K3s
3
- VERSION = "0.3.8"
3
+ VERSION = "0.3.9"
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.8
4
+ version: 0.3.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vito Botta