Module: SamsonSecretPuller
- Extended by:
- Forwardable
- Defined in:
- lib/samson_secret_puller.rb
Defined Under Namespace
Classes: TimeoutError
Constant Summary collapse
- FOLDER =
'/secrets'.freeze
- TIMEOUT =
60
- ENV =
store a copy since we might replace ENV on Object
ENV
Class Method Summary collapse
- .[]=(key, value) ⇒ Object
-
.replace_ENV! ⇒ Object
When we run in kubernetes we need to read secrets from ENV and secret storage but other parts of the apps or gems do not need to know about this.
- .to_h ⇒ Object
Class Method Details
.[]=(key, value) ⇒ Object
21 22 23 |
# File 'lib/samson_secret_puller.rb', line 21 def []=(key, value) ENV[key] = secrets[key] = value end |
.replace_ENV! ⇒ Object
When we run in kubernetes we need to read secrets from ENV and secret storage but other parts of the apps or gems do not need to know about this
31 32 33 34 35 36 37 |
# File 'lib/samson_secret_puller.rb', line 31 def replace_ENV! # rubocop:disable Style/MethodName old = $VERBOSE $VERBOSE = nil Object.const_set(:ENV, self) ensure $VERBOSE = old end |
.to_h ⇒ Object
25 26 27 |
# File 'lib/samson_secret_puller.rb', line 25 def to_h secrets end |