kuby-kube-db 0.6.2 → 0.7.0

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: 0eb811de37c1d31869e60816db656816532bfac247b19abcf9d0036ab5ddc95c
4
- data.tar.gz: 73467e22e8d5be095fffb4f7d9ab0dbecb88560bfdcf710a56c7c6c241f19e3c
3
+ metadata.gz: f9bc44f5af670d509ac4334e4f249ebef97023d1669cc3619739fc7f0dc3e942
4
+ data.tar.gz: 26f4e0e3f30038e49e321a78bbbb6fc57256f4bd175bf59e56586eee369c21c0
5
5
  SHA512:
6
- metadata.gz: 87499ebb4c0e6a713b0955c86def01cb4c7520b7a113a0763017aae1a294bb6efe5706a6d60e32030ff60106aabf4d0a6c6085a7304013f93eab6f188931d0d6
7
- data.tar.gz: 45a5c060121248003e0084a645a5abc3904e8199c56a78c9efccd1a593f3dd2c94b9363e0f14f59f8d1b886336598ed893b6f12621178cc5242c6d6336fc2244
6
+ metadata.gz: bd5ce930b3d5eca591e5e29429410401999d75b1774bd0e14a37bc2e26124a2b0f10d1d4ec57d49c5970cbad8fd93ae11d846eecf4175265b26a9248e7920075
7
+ data.tar.gz: cb41b9ae28bb08e256ee2f4dc08e7b48cea147f4916cda75a8325c53373dfdb1274491f5cdd7891f5ca430dbb8ac187362992c0f56bb9a5b5488f49f4ed9c92d
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.7.0
2
+ * Upgrade to Helm 3.6 via helm-rb.
3
+ * Check operator replica set more effectively by using match labels during lookup.
4
+
1
5
  ## 0.6.2
2
6
  * Fix bad constant references
3
7
 
data/kuby-kube-db.gemspec CHANGED
@@ -13,6 +13,7 @@ Gem::Specification.new do |s|
13
13
  s.platform = Gem::Platform::RUBY
14
14
 
15
15
  s.add_dependency 'helm-cli', '~> 0.3'
16
+ s.add_dependency 'helm-rb', '~> 0.2'
16
17
  s.add_dependency 'kube-dsl', '~> 0.3'
17
18
 
18
19
  s.require_path = 'lib'
@@ -27,18 +27,25 @@ module Kuby
27
27
 
28
28
  OPERATOR_PARAMS.freeze
29
29
 
30
+ REPLICA_SET_MATCH_LABELS = {
31
+ 'release' => OPERATOR_RELEASE_NAME,
32
+ 'app' => 'kubedb'
33
+ }
34
+
35
+ REPLICA_SET_MATCH_LABELS.freeze
36
+
30
37
  def setup
31
- Kuby.logger.info('Setting up kubedb')
38
+ Kuby.logger.info('Setting up KubeDB')
32
39
 
33
- Kuby.logger.info('Fetching Helm chart')
40
+ Kuby.logger.info('Fetching KubeDB Helm chart')
34
41
  helm_cli.add_repo(REPO_NAME, REPO_URL)
35
42
  helm_cli.update_repos
36
43
 
37
- Kuby.logger.info('Deploying kubedb operator')
44
+ Kuby.logger.info('Deploying KubeDB operator')
38
45
  operator_deployed? ? upgrade_operator : install_operator
39
46
 
40
47
  wait_for_operator do
41
- Kuby.logger.info('Waiting for kubedb operator deployment')
48
+ Kuby.logger.info('Waiting for KubeDB operator deployment')
42
49
  end
43
50
 
44
51
  wait_for_api_resources do
@@ -48,7 +55,7 @@ module Kuby
48
55
  Kuby.logger.info('Deploying kubedb catalog')
49
56
  catalog_deployed? ? upgrade_catalog : install_catalog
50
57
 
51
- Kuby.logger.info('Kubedb setup finished')
58
+ Kuby.logger.info('KubeDB setup finished')
52
59
  end
53
60
 
54
61
  private
@@ -172,8 +179,7 @@ module Kuby
172
179
  end
173
180
 
174
181
  def find_operator_rs(depl)
175
- match_labels = depl.dig('metadata', 'labels')
176
- all_rs_data = kubernetes_cli.get_objects('ReplicaSet', NAMESPACE, match_labels)
182
+ all_rs_data = kubernetes_cli.get_objects('ReplicaSet', NAMESPACE, REPLICA_SET_MATCH_LABELS)
177
183
  current_revision = depl.dig('metadata', 'annotations', 'deployment.kubernetes.io/revision')
178
184
 
179
185
  all_rs_data.find do |rs|
@@ -1,6 +1,6 @@
1
1
  module Kuby
2
2
  module KubeDB
3
- VERSION = '0.6.2'.freeze
3
+ VERSION = '0.7.0'.freeze
4
4
  KUBEDB_VERSION = '0.12.0'.freeze
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kuby-kube-db
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cameron Dutro
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-06 00:00:00.000000000 Z
11
+ date: 2021-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: helm-cli
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: helm-rb
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '0.2'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '0.2'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: kube-dsl
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -235,7 +249,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
235
249
  - !ruby/object:Gem::Version
236
250
  version: '0'
237
251
  requirements: []
238
- rubygems_version: 3.1.4
252
+ rubygems_version: 3.2.3
239
253
  signing_key:
240
254
  specification_version: 4
241
255
  summary: KubeDB plugin for Kuby.