Class: Dctl::Kubernetes::Cli
- Inherits:
-
Thor
- Object
- Thor
- Dctl::Kubernetes::Cli
- Defined in:
- lib/dctl/cli/kubernetes.rb
Instance Method Summary collapse
Instance Method Details
#is_outdated(service) ⇒ Object
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/dctl/cli/kubernetes.rb', line 40 def is_outdated(service) verbose = [:verbose] dctl = Dctl::Main.new dctl_opts compose_tag = dctl.image_tag service puts "Tag in compose file is #{compose_tag}" if verbose live_tag = Dctl::Kubernetes.live_image(service, k8s_opts) puts "Deployed tag is #{live_tag}" if verbose is_outdated = compose_tag != live_tag if is_outdated puts "yes" exit 0 else puts "no" exit 1 end end |
#live_image(service) ⇒ Object
11 12 13 |
# File 'lib/dctl/cli/kubernetes.rb', line 11 def live_image(service) puts Dctl::Kubernetes.live_image(service, k8s_opts) end |