Sha256: f3b13d2ee4912060a1ef5c9af35774bdbb6ec0fb7ff2145f5c2757880db143e6
Contents?: true
Size: 826 Bytes
Versions: 119
Compression:
Stored size: 826 Bytes
Contents
require_relative '../services_helper' module Kontena::Cli::Services::Secrets class LinkCommand < Kontena::Command include Kontena::Cli::Common include Kontena::Cli::GridOptions include Kontena::Cli::Services::ServicesHelper parameter "NAME", "Service name" parameter "SECRET", "Secret to be added from Vault (format: secret:name:type)" def execute require_api_url token = require_token spinner "Linking #{secret.colorize(:cyan)} from Vault to #{name.colorize(:cyan)} " do result = client(token).get("services/#{parse_service_id(name)}") secrets = result['secrets'] secrets << parse_secrets([secret])[0] data = { secrets: secrets } client(token).put("services/#{parse_service_id(name)}", data) end end end end
Version data entries
119 entries across 119 versions & 1 rubygems