Class: Rubernetes::Auth::Source
- Inherits:
-
Object
- Object
- Rubernetes::Auth::Source
- Extended by:
- Forwardable
- Defined in:
- lib/rubernetes/auth/source.rb
Overview
This class is used to decide on which auth mechanism to use (service_account? vs. kube_config?). It helps to run Rubernetes in development/local enviornments where a serviceaccount is missing.
Instance Attribute Summary collapse
-
#authenticator ⇒ Object
Returns the value of attribute authenticator.
Instance Method Summary collapse
-
#initialize ⇒ Source
constructor
A new instance of Source.
Constructor Details
#initialize ⇒ Source
Returns a new instance of Source.
16 17 18 19 20 21 22 23 24 |
# File 'lib/rubernetes/auth/source.rb', line 16 def initialize @authenticator = if service_account? ServiceAccount.new elsif kube_config? KubeConfig.new else raise Rubernetes::MissingAuthSource, 'Could not recognize authentication source' end end |
Instance Attribute Details
#authenticator ⇒ Object
Returns the value of attribute authenticator.
14 15 16 |
# File 'lib/rubernetes/auth/source.rb', line 14 def authenticator @authenticator end |