Sha256: 105d63c7c51fa3a8dc4c53f2536dfc75c57a32e02a3c916782c316db7afa20bb

Contents?: true

Size: 537 Bytes

Versions: 16

Compression:

Stored size: 537 Bytes

Contents

module Sct
  class MysqlproxyCommand
    
    DEFAULT_SECRET_NAME = "gcloud-credentials"

    def execute(args, options)

      return UI.error("SCT has not been initialized. Run 'sct init' first.") unless SctCore::Config.exists
      
      path = SctCore::Config.get('cloud-proxy-path')

      system("kubectl delete secret gcloud-credentials")
      system("kubectl create secret generic gcloud-credentials --from-file=#{path}")
      
      UI.success("Authenticated with secret-name: '#{DEFAULT_SECRET_NAME}'")
    end
  
  end

end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
sct-0.1.35 sct/lib/sct/commands/mysqlproxy.rb
sct-0.1.34 sct/lib/sct/commands/mysqlproxy.rb
sct-0.1.33 sct/lib/sct/commands/mysqlproxy.rb
sct-0.1.31 sct/lib/sct/commands/mysqlproxy.rb
sct-0.1.30 sct/lib/sct/commands/mysqlproxy.rb
sct-0.1.29 sct/lib/sct/commands/mysqlproxy.rb
sct-0.1.28 sct/lib/sct/commands/mysqlproxy.rb
sct-0.1.27 sct/lib/sct/commands/mysqlproxy.rb
sct-0.1.26 sct/lib/sct/commands/mysqlproxy.rb
sct-0.1.25 sct/lib/sct/commands/mysqlproxy.rb
sct-0.1.24 sct/lib/sct/commands/mysqlproxy.rb
sct-0.1.23 sct/lib/sct/commands/mysqlproxy.rb
sct-0.1.22 sct/lib/sct/commands/mysqlproxy.rb
sct-0.1.21 sct/lib/sct/commands/mysqlproxy.rb
sct-0.1.20 sct/lib/sct/commands/mysqlproxy.rb
sct-0.1.19 sct/lib/sct/commands/mysqlproxy.rb