Sha256: ca0fd38320efe86043b56668a6854eeeddacaaa96174e6ddea4547daa9c1e36c
Contents?: true
Size: 891 Bytes
Versions: 15
Compression:
Stored size: 891 Bytes
Contents
require 'sct/command_interface' require 'sct/command_option' require "sct/config" require "sct/setup/helpers" module Sct class Mysql_proxyCommand DEFAULT_SECRET_NAME = "gcloud-credentials" IS_PUBLIC_COMMAND = true SYNTAX = 'sct mysql_proxy' SUMMARY = 'adds a secret for the mysql proxy' DESCRIPTION = "" EXAMPLE = "" EXAMPLE_DESCRIPTION = "" OPTIONS = [] def execute(args, options) return puts "SCT has not been initialized. Run 'sct init' first.".red unless Sct::Config.exists path = Sct::Config.get('cloud-proxy-path') system("kubectl delete secret gcloud-credentials") system("kubectl create secret generic gcloud-credentials --from-file=#{path}") puts "Authenticated with secret-name: '#{DEFAULT_SECRET_NAME}'".green return true end implements CommandInterface end end
Version data entries
15 entries across 15 versions & 1 rubygems