Sha256: 6995523fb41993531bfec416791784dc79c16b9b2ee3122e7a196be5c59d048e
Contents?: true
Size: 1.09 KB
Versions: 4
Compression:
Stored size: 1.09 KB
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: ["KUBECONFIG=#{kubeconfig_path}", "KUBER_KIT_SHELL_CONFIGURATION=#{KuberKit.current_configuration.name}"]) end end
Version data entries
4 entries across 4 versions & 1 rubygems