Class: KubeDeployTools::ImageRegistry::Driver::Login

Inherits:
Base
  • Object
show all
Defined in:
lib/kube_deploy_tools/image_registry/driver/login.rb

Instance Method Summary collapse

Methods inherited from Base

#authorize, #delete_images, #initialize, #push_image, #unauthorize_command

Constructor Details

This class inherits a constructor from KubeDeployTools::ImageRegistry::Driver::Base

Instance Method Details

#authorize_commandObject

This driver expects the following to be set in the @registry hash: username_var: set to a string which is the env var containing the docker registry username password_var: set to a string which is the env var containing the docker registry password prefix: passed directly to docker login



12
13
14
15
16
17
# File 'lib/kube_deploy_tools/image_registry/driver/login.rb', line 12

def authorize_command
  ['docker', 'login',
   '--username', ENV.fetch(@registry.config.fetch('username_var')),
   '--password', ENV.fetch(@registry.config.fetch('password_var')),
   @registry.prefix]
end

#delete_image(image, dryrun) ⇒ Object



19
20
21
# File 'lib/kube_deploy_tools/image_registry/driver/login.rb', line 19

def delete_image(image, dryrun)
  raise 'not implemented'
end

#unauthorizeObject



23
24
# File 'lib/kube_deploy_tools/image_registry/driver/login.rb', line 23

def unauthorize
end