Sha256: 06212801e7c20872a4a88d20a4c45b090a937c2c59aed0ef07d0ddb85e3d405b

Contents?: true

Size: 568 Bytes

Versions: 23

Compression:

Stored size: 568 Bytes

Contents

# typed: true
require 'base64'
require 'kube-dsl'

module Kuby
  module Kubernetes
    class DockerConfig
      extend ::KubeDSL::ValueFields

      value_fields :registry_host, :username, :password, :email

      def initialize(&block)
        instance_eval(&block) if block
      end

      def serialize
        {
          registry_host.to_sym => {
            username: username,
            password: password,
            email:    email,
            auth:     Base64.strict_encode64("#{username}:#{password}")
          }
        }
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
kuby-core-0.17.0 lib/kuby/kubernetes/docker_config.rb
kuby-core-0.16.1 lib/kuby/kubernetes/docker_config.rb
kuby-core-0.16.0 lib/kuby/kubernetes/docker_config.rb
kuby-core-0.15.0 lib/kuby/kubernetes/docker_config.rb
kuby-core-0.14.0 lib/kuby/kubernetes/docker_config.rb
kuby-core-0.13.0 lib/kuby/kubernetes/docker_config.rb
kuby-core-0.12.0 lib/kuby/kubernetes/docker_config.rb
kuby-core-0.11.16 lib/kuby/kubernetes/docker_config.rb
kuby-core-0.11.15 lib/kuby/kubernetes/docker_config.rb
kuby-core-0.11.14 lib/kuby/kubernetes/docker_config.rb
kuby-core-0.11.13 lib/kuby/kubernetes/docker_config.rb
kuby-core-0.11.12 lib/kuby/kubernetes/docker_config.rb
kuby-core-0.11.11 lib/kuby/kubernetes/docker_config.rb
kuby-core-0.11.10 lib/kuby/kubernetes/docker_config.rb
kuby-core-0.11.9 lib/kuby/kubernetes/docker_config.rb
kuby-core-0.11.8 lib/kuby/kubernetes/docker_config.rb
kuby-core-0.11.7 lib/kuby/kubernetes/docker_config.rb
kuby-core-0.11.6 lib/kuby/kubernetes/docker_config.rb
kuby-core-0.11.4 lib/kuby/kubernetes/docker_config.rb
kuby-core-0.11.3 lib/kuby/kubernetes/docker_config.rb