helm_upgrade_logs 0.4.1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d5c8b4b1ea48503ac3cd3a5b2225a547cca4d9de3d2a6f498ab3275c048f4b2c
4
- data.tar.gz: 50fa108a1ffc101bebf06f4a3ab561b0be87eebcb0a8f86f5ba9f1cf4e934049
3
+ metadata.gz: e83ed81ed69c016d8741598e3fa4554491dc5ae21a2fa4bff28f2d80790f0013
4
+ data.tar.gz: 3cc4897e8d30f893253e3c441132051327fcb51602f5917e7c5c3d12f85a8ec6
5
5
  SHA512:
6
- metadata.gz: d75d44836364ea6365cfd970b217927aa4c0e0c3268cfaabebf6ada95827a3bdcce402e1160ae469e536589bc10f0bb867a1c44ce91e4fad924e11aff4b25fd9
7
- data.tar.gz: 488607e1fcee239ae77b11949c083dbe21e1ed7af0d0a13c95191b060bd8091e7580c49463f796e5ff2e330bde3c05b6b0ef9f8b8ac0b721257ff6d9685b822c
6
+ metadata.gz: 606dfbf69cb7e4266adccc812097688580c70f4aa90d7b60768772eb150f8e3ffb573e2469982f6c4e1f70f2887d79e4af27f36982c311f785e37c70e7b17495
7
+ data.tar.gz: 30880fb250c53714ed704c81db74ffceff11992612ac44b3c3cf897c70d3f40b021e8c52ed951a38f62b6216c1a755c03752d5c7d65b5d6797340ae61fe6e03f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## [0.5.0]
2
+
3
+ - Wait for any pod log only for a second (old behaviour can be reverted if `helm_upgrade_logs_log_start` ENV var is set) then use
4
+ specific pod logs filtered by non failed status to filter. Fixing #4 and perhaps #2
5
+
1
6
  ## [0.4.1]
2
7
 
3
8
  - Ignore error if new environment variable `helm_upgrade_logs_ignore_child_error` is passed
@@ -2,5 +2,5 @@
2
2
 
3
3
  module HelmUpgradeLogs
4
4
  # @return [String] Version of helm upgrade logs
5
- VERSION = "0.4.1"
5
+ VERSION = "0.5.0"
6
6
  end
@@ -4,7 +4,7 @@ require "open3"
4
4
  require 'English'
5
5
  require_relative "helm_upgrade_logs/version"
6
6
 
7
- ENV["helm_upgrade_logs_log_start"] ||= "90"
7
+ ENV["helm_upgrade_logs_log_start"] ||= "1"
8
8
  ENV["helm_upgrade_logs_pod_start"] ||= "35"
9
9
 
10
10
  # Approach not ideal as it will for all containers to be ready and want to stream logs before that
@@ -46,7 +46,7 @@ end
46
46
 
47
47
  # Get pods
48
48
  def read_pods
49
- stdout, stderr, = Open3.capture3(add_ns("kubectl get pods -lapp.kubernetes.io/instance=#{@release_name} -o name"))
49
+ stdout, stderr, = Open3.capture3(add_ns("kubectl get pods -lapp.kubernetes.io/instance=#{@release_name} --field-selector 'status.phase!=Failed' -o name"))
50
50
  if stderr.empty?
51
51
  stdout.lines.collect(&:strip)
52
52
  else
@@ -67,12 +67,12 @@ def options_with_args
67
67
  --repo --set --set-file --set-string --timeout --username --values --version --kube-apiserver --kube-as-group
68
68
  --kube-as-user --kube-as-file --kube-context --kube-token --kubeconfig --namespace --registry-config
69
69
  --repository-cache --repository-config -n -f -o]
70
- end
70
+ end
71
71
 
72
72
  # @return Release name from command line arguments
73
73
  def release_name_from_args(args)
74
74
  arg_list = args.clone
75
-
75
+
76
76
  loop do
77
77
  option_with_val = false
78
78
  arg_list.each_with_index do |arg, index|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: helm_upgrade_logs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Garratt
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-10-06 00:00:00.000000000 Z
11
+ date: 2023-11-15 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Basic wrapper around helm and kubectl to allow easy debugging of a helm
14
14
  release. All arguments after a usual helm upgrade are used as normal