Sha256: 5801fa7ac344b09612bee1c6ebb025d0d49360e0e330e2c50369555c93862d0c

Contents?: true

Size: 516 Bytes

Versions: 2

Compression:

Stored size: 516 Bytes

Contents

module KubesGoogle
  class Config
    include Singleton

    def defaults
      c = ActiveSupport::OrderedOptions.new
      c.gke = ActiveSupport::OrderedOptions.new
      c.gke.cluster_name = nil
      c.gke.enable_hooks = nil # nil since need cluster_name also. setting to false will explicitly disable hooks
      c.gke.whitelist_ip = nil # default will auto-detect IP
      c
    end

    @@config = nil
    def config
      @@config ||= defaults
    end

    def configure
      yield(config)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
kubes_google-0.3.1 lib/kubes_google/config.rb
kubes_google-0.3.0 lib/kubes_google/config.rb