Class: Rubernetes::Auth::ServiceAccount
- Inherits:
-
Object
- Object
- Rubernetes::Auth::ServiceAccount
- Defined in:
- lib/rubernetes/auth/service_account.rb
Overview
This class is used as a serviceaccount’s crt/token options wrapper. It assumes that the serviceaccount crt/token is mounted at ‘/var/run/secrets/kubernetes.io/serviceaccount`.
Constant Summary collapse
- CRT_PATH =
'/var/run/secrets/kubernetes.io/serviceaccount/ca.crt'
- TOKEN_PATH =
'/var/run/secrets/kubernetes.io/serviceaccount/token'
Instance Method Summary collapse
- #api_endpoint ⇒ Object
- #auth_options ⇒ Object
-
#initialize ⇒ ServiceAccount
constructor
A new instance of ServiceAccount.
- #ssl_options ⇒ Object
Constructor Details
#initialize ⇒ ServiceAccount
Returns a new instance of ServiceAccount.
12 |
# File 'lib/rubernetes/auth/service_account.rb', line 12 def initialize; end |
Instance Method Details
#api_endpoint ⇒ Object
14 15 16 |
# File 'lib/rubernetes/auth/service_account.rb', line 14 def api_endpoint @api_endpoint ||= "#{.empty? ? 'http' : 'https'}://kubernetes.default.svc" end |
#auth_options ⇒ Object
26 27 28 29 30 |
# File 'lib/rubernetes/auth/service_account.rb', line 26 def @auth_options ||= { bearer_token_file: TOKEN_PATH } end |