Sha256: b923335846bf986f8334be2d780ee87932c22c6473e74e490458717dbc676bb2
Contents?: true
Size: 1020 Bytes
Versions: 17
Compression:
Stored size: 1020 Bytes
Contents
class KuberKit::ShellLauncher::Strategies::Kubernetes < KuberKit::ShellLauncher::Strategies::Abstract include KuberKit::Import[ "core.artifact_path_resolver", "shell.kubectl_commands", "configs", ] Contract KuberKit::Shell::AbstractShell => Any def call(shell) kubeconfig_path = KuberKit.current_configuration.kubeconfig_path if kubeconfig_path.is_a?(KuberKit::Core::ArtifactPath) kubeconfig_path = artifact_path_resolver.call(kubeconfig_path) end deployer_namespace = KuberKit.current_configuration.deployer_namespace if deployer_namespace kubectl_commands.set_namespace(shell, deployer_namespace, kubeconfig_path: kubeconfig_path) end env_vars = [ "KUBECONFIG=#{kubeconfig_path}", "KUBER_KIT_SHELL_CONFIGURATION=#{KuberKit.current_configuration.name}" ] if configs.shell_launcher_sets_configration env_vars << "KUBER_KIT_CONFIGURATION=#{KuberKit.current_configuration.name}" end shell.replace!(env: env_vars) end end
Version data entries
17 entries across 17 versions & 1 rubygems