Sha256: 0ca4ab27fdf777ee5e7ec630468d1dd3d2d687eb0e8dfcb4fe8f910a654ecc56

Contents?: true

Size: 1.89 KB

Versions: 2

Compression:

Stored size: 1.89 KB

Contents

class KuberKit::Defaults
  class << self
    def init
      return if @_initialized
      @_initialized = true
      init!
    end

    def init!
      container["artifacts_sync.artifact_updater"].use_resolver(
        container["artifacts_sync.git_artifact_resolver"], 
        artifact_class: KuberKit::Core::Artifacts::Git
      )
      container["artifacts_sync.artifact_updater"].use_resolver(
        container["artifacts_sync.null_artifact_resolver"], 
        artifact_class: KuberKit::Core::Artifacts::Local
      )
      container["env_file_reader.reader"].use_reader(
        container["env_file_reader.strategies.artifact_file"], 
        env_file_class: KuberKit::Core::EnvFiles::ArtifactFile
      )
      container["env_file_reader.reader"].use_reader(
        container["env_file_reader.strategies.env_group"], 
        env_file_class: KuberKit::Core::EnvFiles::EnvGroup
      )
      container["template_reader.reader"].use_reader(
        container["template_reader.strategies.artifact_file"], 
        template_class: KuberKit::Core::Templates::ArtifactFile
      )
      container["service_deployer.deployer"].register_strategy(
        :kubernetes,
        KuberKit::ServiceDeployer::Strategies::Kubernetes.new
      )
      container["service_deployer.deployer"].register_strategy(
        :docker,
        KuberKit::ServiceDeployer::Strategies::Docker.new
      )
      container["service_deployer.deployer"].register_strategy(
        :docker_compose,
        KuberKit::ServiceDeployer::Strategies::DockerCompose.new
      )
      container["service_deployer.deployer"].register_strategy(
        :helm,
        KuberKit::ServiceDeployer::Strategies::Helm.new
      )

      container["shell_launcher.launcher"].register_strategy(
        :kubernetes,
        KuberKit::ShellLauncher::Strategies::Kubernetes.new
      )
    end

    private
      def container
        KuberKit::Container
      end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
kuber_kit-1.1.5 lib/kuber_kit/defaults.rb
kuber_kit-1.3.1 lib/kuber_kit/defaults.rb