kubes 0.2.2 → 0.2.3

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: f5115dab9c9c9e52678c67ba1c6a956ffe9369961555d6393e8ad0ca40868fdd
4
- data.tar.gz: 6f04422236a9df6a5833633c0fdc2b1bc49d31786c0fd1f1f599a75a7b7771eb
3
+ metadata.gz: c4f9062190dfd5888032514dc726587aeb3f55c826d1af71670c22268942ca4f
4
+ data.tar.gz: 9cfe8ce6833abc6c25323ceb960cbd8f63d9ba2bec698572328420607c12f8da
5
5
  SHA512:
6
- metadata.gz: c60e4d318db13f130929e1e554b93594f23cfda75b3a2e6974f395b1c1440734077bd85d9e11f0460371f62d8810e402db493c7fdf86b3f823ca8eb8810bb32e
7
- data.tar.gz: b344b7af0da2964097d564407402cac1b880d134b1d213f1a40deb0234e661c7e08dc15fa3005fcfd4ba6f714d4262f5bd25c17fc876c545d0fac41898cb2a86
6
+ metadata.gz: db1890f00464a7ed111dae86f8bdd084c7a947d36f8d74ba84e4e3abe6175d04cd6b6b81fe2dad59601c5553ba77a86cc8fd6ebfab9553d2a74c707562e935de
7
+ data.tar.gz: a02cd12c91fc241b281182a6773f2e58c8d12246881757374e3d07994541b9d0e83a0edd74e7d069e640b0f1a756bcba9d30088f62d75f84a3949dbf11974d5f
@@ -1,8 +1,11 @@
1
- # Change Log
1
+ # Changelog
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project *loosely tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
5
5
 
6
+ ## [0.2.3]
7
+ - #15 use kubernetes default deployment strategy instead
8
+
6
9
  ## [0.2.2]
7
10
  - #14 init template updates, dockerfile_port helper
8
11
 
@@ -34,11 +34,6 @@ spec:
34
34
  selector:
35
35
  matchLabels:
36
36
  app: demo
37
- strategy:
38
- rollingUpdate:
39
- maxSurge: 25
40
- maxUnavailable: 25
41
- type: RollingUpdate
42
37
  template:
43
38
  metadata:
44
39
  labels:
@@ -50,7 +50,7 @@ Note, the behavior of the from is an *or* since the namespaceSelector and podSel
50
50
 
51
51
  ## Example 2
52
52
 
53
- If you need more control over the ingress selectors you can use the from method. He's an example:
53
+ If you need more control over the ingress selectors, you can use the `from` method. Here's an example:
54
54
 
55
55
  .kubes/resources/web/network_policy.rb
56
56
 
@@ -8,8 +8,8 @@ Helper | Description
8
8
  --- | ---
9
9
  built_image | Method refers to the latest Docker image built by Kubes. This spares you from having to update the image manually in the deployment resource.
10
10
  dockerfile_port | Exposed port extracted from the Dockerfile of the project.
11
- extra | The `KUBES_ENV` value.
12
- with_extra | Appends the `KUBES_ENV` value to a string if it's set. It's covered in the [Extra Env Docs]({% link _docs/extra-env.md %}).
11
+ extra | The `KUBES_EXTRA` value.
12
+ with_extra | Appends the `KUBES_EXTRA` value to a string if it's set. It's covered in the [Extra Env Docs]({% link _docs/extra-env.md %}).
13
13
 
14
14
  Here's also the source code with the helpers: [helpers.rb](https://github.com/boltops-tools/kubes/blob/master/lib/kubes/compiler/shared/helpers.rb).
15
15
 
@@ -37,11 +37,6 @@ spec:
37
37
  selector:
38
38
  matchLabels:
39
39
  role: web
40
- strategy:
41
- rollingUpdate:
42
- maxSurge: 25
43
- maxUnavailable: 25
44
- type: RollingUpdate
45
40
  template:
46
41
  metadata:
47
42
  labels:
@@ -30,11 +30,6 @@ spec:
30
30
  selector:
31
31
  matchLabels:
32
32
  app: demo
33
- strategy:
34
- rollingUpdate:
35
- maxSurge: 25
36
- maxUnavailable: 25
37
- type: RollingUpdate
38
33
  template:
39
34
  metadata:
40
35
  labels:
@@ -82,6 +82,11 @@ module Kubes::Compiler::Dsl::Syntax
82
82
  end
83
83
 
84
84
  def default_strategy
85
+ return unless maxUnavailable || maxSurge
86
+
87
+ maxSurge = maxUnavailable if maxUnavailable && !maxSurge
88
+ maxUnavailable = maxSurge if !maxUnavailable && maxSurge
89
+
85
90
  {
86
91
  rollingUpdate: {
87
92
  maxSurge: maxSurge,
@@ -91,14 +96,6 @@ module Kubes::Compiler::Dsl::Syntax
91
96
  }
92
97
  end
93
98
 
94
- def default_maxSurge
95
- 25
96
- end
97
-
98
- def default_maxUnavailable
99
- 25
100
- end
101
-
102
99
  def default_template
103
100
  {
104
101
  metadata: templateMetadata,
@@ -1,3 +1,3 @@
1
1
  module Kubes
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
@@ -5,5 +5,6 @@ replicas 1
5
5
  image built_image # IE: user/<%= app %>:kubes-2020-06-13T19-55-16-43afc6e
6
6
 
7
7
  # revisionHistoryLimit 1 # uncomment to reduce old ReplicaSets, default is 10 https://bit.ly/3hqrzyP
8
+ # maxUnavailable 25
8
9
 
9
10
  # More docs: kubes.guru/docs/dsl/deployment/
@@ -9,11 +9,6 @@ spec:
9
9
  selector:
10
10
  matchLabels:
11
11
  role: web
12
- strategy:
13
- rollingUpdate:
14
- maxSurge: 25
15
- maxUnavailable: 25
16
- type: RollingUpdate
17
12
  template:
18
13
  metadata:
19
14
  labels:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kubes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-07-18 00:00:00.000000000 Z
11
+ date: 2020-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport