Sha256: dc093695480e01bce26daab9a6e6d8f6f80df0d3f221f3dbb37bda42deae51bd

Contents?: true

Size: 732 Bytes

Versions: 12

Compression:

Stored size: 732 Bytes

Contents

# typed: false
require 'kube-dsl'

module Kuby
  module Kubernetes
    class DockerDesktopProvider < Provider
      STORAGE_CLASS_NAME = 'hostpath'.freeze

      class Config
        extend ::KubeDSL::ValueFields

        value_fields :kubeconfig
      end

      attr_reader :config

      def configure(&block)
        config.instance_eval(&block) if block
      end

      def kubeconfig_path
        config.kubeconfig
      end

      def storage_class_name
        STORAGE_CLASS_NAME
      end

      private

      def after_initialize
        @config = Config.new

        configure do
          # default kubeconfig path
          kubeconfig File.join(ENV['HOME'], '.kube', 'config')
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
kuby-core-0.20.2 lib/kuby/kubernetes/docker_desktop_provider.rb
kuby-core-0.20.1 lib/kuby/kubernetes/docker_desktop_provider.rb
kuby-core-0.20.0 lib/kuby/kubernetes/docker_desktop_provider.rb
kuby-core-0.19.0 lib/kuby/kubernetes/docker_desktop_provider.rb
kuby-core-0.18.0 lib/kuby/kubernetes/docker_desktop_provider.rb
kuby-core-0.17.0 lib/kuby/kubernetes/docker_desktop_provider.rb
kuby-core-0.16.1 lib/kuby/kubernetes/docker_desktop_provider.rb
kuby-core-0.16.0 lib/kuby/kubernetes/docker_desktop_provider.rb
kuby-core-0.15.0 lib/kuby/kubernetes/docker_desktop_provider.rb
kuby-core-0.14.0 lib/kuby/kubernetes/docker_desktop_provider.rb
kuby-core-0.13.0 lib/kuby/kubernetes/docker_desktop_provider.rb
kuby-core-0.12.0 lib/kuby/kubernetes/docker_desktop_provider.rb