changed file handling
This commit is contained in:
parent
cad56c813e
commit
8d957f22af
|
@ -109,7 +109,8 @@ class VaultSourcePlugin(SourcePlugin):
|
|||
client.token = token
|
||||
|
||||
if auth_method == 'kubernetes':
|
||||
f = open('/var/run/secrets/kubernetes.io/serviceaccount/token')
|
||||
token_path = '/var/run/secrets/kubernetes.io/serviceaccount/token'
|
||||
with open(token_path, 'r') as f:
|
||||
jwt = f.read()
|
||||
client.auth_kubernetes(auth_key, jwt)
|
||||
|
||||
|
@ -277,7 +278,8 @@ class VaultDestinationPlugin(DestinationPlugin):
|
|||
client.token = token
|
||||
|
||||
if auth_method == 'kubernetes':
|
||||
f = open('/var/run/secrets/kubernetes.io/serviceaccount/token')
|
||||
token_path = '/var/run/secrets/kubernetes.io/serviceaccount/token'
|
||||
with open(token_path, 'r') as f:
|
||||
jwt = f.read()
|
||||
client.auth_kubernetes(auth_key, jwt)
|
||||
|
||||
|
|
Loading…
Reference in New Issue