metatron 0.2.3 → 0.2.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: 677b9ecf8b5a4c678cf17d251ad3fdd916646c5ba4ac249468f19dc095e8642a
4
- data.tar.gz: 6a0dc0822303e49d401b6cb015d446a5bfd8ffaa97a9537b1126427864995503
3
+ metadata.gz: 9d92a6b2a14d474fff5472464de565bf24ecc825560017ab2397336cbefd14d9
4
+ data.tar.gz: aa7752fdeed5671d34d5d3d3cf986a331a99afa65bde6728560777a683f77f19
5
5
  SHA512:
6
- metadata.gz: de59bb3b607c464110887c24924876ad58bf025f3aa9462f1fda4a9e312c8a7c4b8aa0243bb8dafdc37dda66f866f58ed27c025944fda6d2049fce502255e0e0
7
- data.tar.gz: f7913c719a841d6085aeeb3188d57e8bb4da7d8e6cd60fb73ab496a3929b40c0c5021d8723ae4beffa7df27ba1b71601ff16d2339c5976854147ccb2e9348214
6
+ metadata.gz: cb6b3c627a184450a5dadd6b76a00bebb9b9d76b10c589df37910a5d1e5db25c83b2fdb9bdea08a8252f461851c874fe617fe8b34ad95e5858331ed7ad79779a
7
+ data.tar.gz: 6bc5bf3ee64bca70f3231a07b5faf19735d9a7b42917fbececf4918b86e171fa3b9f05450a81e8b19e6c1311d2d6b577057abb6a3a79129f1c9029c437c0d30e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- metatron (0.2.3)
4
+ metatron (0.2.4)
5
5
  json (~> 2.6)
6
6
  puma (~> 6.3)
7
7
  sinatra (~> 2.2)
@@ -8,7 +8,7 @@ module Metatron
8
8
  include Concerns::Namespaced
9
9
  include Concerns::PodProducer
10
10
 
11
- attr_accessor :replicas, :additional_labels
11
+ attr_accessor :replicas, :additional_labels, :strategy
12
12
 
13
13
  def initialize(name, replicas: 2)
14
14
  super(name)
@@ -23,14 +23,14 @@ module Metatron
23
23
  metadata: {
24
24
  name:,
25
25
  labels: { "#{label_namespace}/name": name }.merge(additional_labels)
26
- }.merge(formatted_annotations),
26
+ }.merge(formatted_annotations).merge(formatted_namespace),
27
27
  spec: {
28
28
  replicas:,
29
- strategy: { type: "RollingUpdate", rollingUpdate: { maxSurge: 2, maxUnavailable: 0 } },
29
+ strategy:,
30
30
  selector: {
31
31
  matchLabels: { "#{label_namespace}/name": name }.merge(additional_pod_labels)
32
32
  }
33
- }.merge(pod_template)
33
+ }.merge(pod_template).compact
34
34
  }
35
35
  end
36
36
  end
@@ -8,7 +8,7 @@ module Metatron
8
8
  include Concerns::PodProducer
9
9
  include Concerns::Namespaced
10
10
 
11
- attr_accessor :replicas, :service_name, :pod_management_policy
11
+ attr_accessor :replicas, :service_name, :pod_management_policy, :update_strategy
12
12
 
13
13
  def initialize(name, replicas: 1)
14
14
  super(name)
@@ -21,8 +21,10 @@ module Metatron
21
21
  alias enableServiceLinks enable_service_links
22
22
  alias podManagementPolicy pod_management_policy
23
23
  alias serviceName service_name
24
+ alias strategy update_strategy
25
+ alias updateStrategy update_strategy
24
26
 
25
- def render
27
+ def render # rubocop:disable Metrics/AbcSize
26
28
  {
27
29
  apiVersion:,
28
30
  kind:,
@@ -33,12 +35,12 @@ module Metatron
33
35
  spec: {
34
36
  replicas:,
35
37
  serviceName:,
36
- strategy: { type: "RollingUpdate", rollingUpdate: { maxSurge: 2, maxUnavailable: 0 } },
38
+ updateStrategy:,
37
39
  selector: {
38
40
  matchLabels: { "#{label_namespace}/name": name }.merge(additional_pod_labels)
39
41
  }
40
- }.merge(pod_template)
41
- }.merge(volume_claim_templates)
42
+ }.merge(pod_template).merge(volume_claim_templates).compact
43
+ }
42
44
  end
43
45
  end
44
46
  end
@@ -4,6 +4,6 @@ module Metatron
4
4
  VERSION = [
5
5
  0, # major
6
6
  2, # minor
7
- 3 # patch
7
+ 4 # patch
8
8
  ].join(".")
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metatron
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Gnagy
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-07-29 00:00:00.000000000 Z
11
+ date: 2023-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json