kubes_google 0.3.6 → 0.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '088f3403efb08082a1aafe32aa0790dd3f3066c2fa49097963d952150171ec03'
4
- data.tar.gz: 6865c3cbf32056aea2615ae9022c1763ec8449dea2fc5242f3ddb01750bb2cd2
3
+ metadata.gz: 82665e26689438f751a461e77057cfbe2f442a097c80f788e965b2c69af16468
4
+ data.tar.gz: adc9c449688f97bbdc5117f3238bf005029ca674abca41ce54a0c6cd019d1313
5
5
  SHA512:
6
- metadata.gz: a760e087e9cd8eb9636fd1540aa020e2ed74da3038aeec039e562e83123dd70a9bfec6fc594b31fb1e1911d1664553398cd051548949b4c55f9eff7bcf844956
7
- data.tar.gz: fc8d14d3cdbc386ebc53d815e8e854affa8bfe1eef97c6e578aa6a519704901131e4f9e5be8734a18b512cebd00df36c12ab665f7ff63bc769613911803dd922
6
+ metadata.gz: 27dea1991e538398e8d9be728887bd9b553645a8bd6437ca13bbd94721cc09b88d3956d224c98420362933309203844d964397516f496797fa4373ad0d09cec1
7
+ data.tar.gz: df11c671e4b70beac80e55a2c6fae56fe156ae2b9e892b018fe63da418577a14edb4f4550e27c10b682946b6ddc92e1f368e19edc4e04c94eb6055346da86f90
data/CHANGELOG.md CHANGED
@@ -3,6 +3,9 @@
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.3.7] - 2022-02-07
7
+ - [#9](https://github.com/boltops-tools/kubes_google/pull/9) performance improvement: cache secrets
8
+
6
9
  ## [0.3.6] - 2022-02-04
7
10
  - [#7](https://github.com/boltops-tools/kubes_google/pull/7) Secret auto retry with gcloud strategy
8
11
  - [#8](https://github.com/boltops-tools/kubes_google/pull/8) add condition none
@@ -1,13 +1,17 @@
1
1
  class KubesGoogle::Secrets
2
2
  class Fetcher
3
+ include KubesGoogle::Logging
3
4
  extend Memoist
4
5
 
5
6
  def initialize(options={})
6
7
  @options = options
7
8
  end
8
9
 
10
+ @@cache = {}
9
11
  def fetch(short_name)
10
- fetcher.fetch(short_name)
12
+ return @@cache[short_name] if @@cache[short_name]
13
+ logger.debug "Fetching secret: #{short_name}"
14
+ @@cache[short_name] = fetcher.fetch(short_name)
11
15
  rescue KubesGoogle::VpnSslError
12
16
  logger.info "Retry fetching secret with the gcloud strategy"
13
17
  fetcher = Gcloud.new(@options)
@@ -1,3 +1,3 @@
1
1
  module KubesGoogle
2
- VERSION = "0.3.6"
2
+ VERSION = "0.3.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kubes_google
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-02-04 00:00:00.000000000 Z
11
+ date: 2022-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport