Sha256: d02c430ae9d5ee2863ebb398b6fdf8ce48c3c0740dd9eaab3ff4ea2810257139
Contents?: true
Size: 1.09 KB
Versions: 11
Compression:
Stored size: 1.09 KB
Contents
class KuberKit::ServiceDeployer::Strategies::Kubernetes < KuberKit::ServiceDeployer::Strategies::Abstract include KuberKit::Import[ "service_reader.reader", "shell.kubectl_commands", "configs", ] Contract KuberKit::Shell::AbstractShell, KuberKit::Core::Service => Any def deploy(shell, service) service_config = reader.read(shell, service) config_path = "#{configs.service_config_dir}/#{service.name}.yml" shell.write(config_path, service_config) kubeconfig_path = KuberKit.current_configuration.kubeconfig_path deploy_namespace = KuberKit.current_configuration.deploy_namespace kubectl_commands.apply_file(shell, config_path, kubeconfig_path: kubeconfig_path, namespace: deploy_namespace) deployment_restart_enabled = service.attribute(:deployment_restart_enabled, default: true) deployment_restart_name = service.attribute(:deployment_restart_name, default: service.uri) if deployment_restart_enabled kubectl_commands.rolling_restart(shell, deployment_restart_name, kubeconfig_path: kubeconfig_path, namespace: deploy_namespace) end end end
Version data entries
11 entries across 11 versions & 1 rubygems