Commit 89038aca authored by Krasimir Angelov's avatar Krasimir Angelov
parent 3a355bb3
......@@ -31,8 +31,8 @@ module Gitlab
engine: {
name: 'kv-v2', path: secret[:engine_path]
},
path: secret[:path],
field: secret[:field]
path: secret[:secret_path],
field: secret[:secret_field]
}
end
......@@ -40,21 +40,27 @@ module Gitlab
def secret
@secret ||= begin
path_and_field, _, engine_path = config.rpartition('@')
if path_and_field == ""
path_and_field = config
engine_path = 'kv-v2'
end
path, _, field = path_and_field.rpartition('/')
secret, engine_path = secret_and_engine
secret_path, _, secret_field = secret.rpartition('/')
{
engine_path: engine_path,
path: path,
field: field
secret_path: secret_path,
secret_field: secret_field
}
end
end
def secret_and_engine
secret, _, engine = config.rpartition('@')
if secret == ""
secret = config
engine = 'kv-v2'
end
[secret, engine]
end
end
class HashStrategy < ::Gitlab::Config::Entry::Node
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment