kubes_google 0.3.4 → 0.3.5

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: d5ef849665496ae62a2621fe4d7732913c358a357334811413b109df5913d34c
4
- data.tar.gz: 26fe10736966f7c027a88395206605c1bc1928b6f23b139680e21c5a325e0b26
3
+ metadata.gz: c4940b31e1e64807b1036d0980ab6c1ebe81aa6f05581b1e2d00b3bf915d12c0
4
+ data.tar.gz: 6761294987f6c33fef1d9764712bab015b7b264fa8e5b84c166a633f03bc44aa
5
5
  SHA512:
6
- metadata.gz: 3cd2ceaa682f677ec6d660a0fd6accceb2380e6ad5c50c9a946c78d24cafee5a563e8932d1c1bf27191a029088b35463717d9bf03dabd377faa4432601bd0b90
7
- data.tar.gz: 697904843b0e1c5ca6185732a126a966151288896c9192725348d6a5fdd560b29d7cf08ed198f4f90c7bf9d9c1b7773e398de4d44ec02608fcb822da48cb09b1
6
+ metadata.gz: 4c09463d4a76e82240502a5779e90a9874b9c91d4f195f91af128fa48a134b44a9485a5c327fad74826834edd57e0137ebd9375558f4253ec0ca5242610061a7
7
+ data.tar.gz: a7ecffa4255c71544b92fd5df88bac16a5a06eb4e2c8e48eed9d9b1f61a12c98f18c3c6edd8f92aef51ffeb595605a9cccb578a42dbc810b89fc9eeb9a97fe02
@@ -3,6 +3,10 @@
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.5] - 2020-11-12
7
+ - add KubesGoogle.cloudbuild? check
8
+ - fetcher sdk friendly suggestion to use gcloud when vpn errors
9
+
6
10
  ## [0.3.4] - 2020-11-12
7
11
  - fix KubesGoogle.config.secrets.fetcher check
8
12
 
@@ -35,6 +35,10 @@ module KubesGoogle
35
35
  Config.instance.config
36
36
  end
37
37
 
38
+ def cloudbuild?
39
+ !!ENV['BUILDER_OUTPUT'] # cloudbuild env vars: https://gist.github.com/tongueroo/7ae26abd60d30da3972e86b4e7ca315e
40
+ end
41
+
38
42
  extend self
39
43
  end
40
44
 
@@ -29,6 +29,19 @@ class KubesGoogle::Secrets::Fetcher
29
29
  resp = secret_manager_service.list_secrets(parent: parent) # note: page_size doesnt seem to get respected
30
30
  name = resp.first.name # IE: projects/686010496118/secrets/demo-dev-db_host
31
31
  @@project_number = name.split('/')[1]
32
+ rescue Google::Cloud::UnavailableError => e
33
+ logger.error "ERROR: #{e.message}"
34
+ if e.message.include?("failed to connect")
35
+ logger.info <<~EOL
36
+ SSL Handshake failed. This error seems to happen with some VPN setups.
37
+ Please try the gcloud fetcher instead. To set up see:
38
+
39
+ https://kubes.guru/docs/helpers/google/secrets/#fetcher-strategy
40
+ EOL
41
+ exit 1
42
+ else
43
+ raise
44
+ end
32
45
  end
33
46
  end
34
47
  end
@@ -1,3 +1,3 @@
1
1
  module KubesGoogle
2
- VERSION = "0.3.4"
2
+ VERSION = "0.3.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kubes_google
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen