helm_upgrade_logs 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +3 -2
- data/CHANGELOG.md +9 -0
- data/exe/helm_upgrade_logs +1 -1
- data/lib/helm_upgrade_logs/version.rb +1 -1
- data/lib/helm_upgrade_logs.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e83ed81ed69c016d8741598e3fa4554491dc5ae21a2fa4bff28f2d80790f0013
|
4
|
+
data.tar.gz: 3cc4897e8d30f893253e3c441132051327fcb51602f5917e7c5c3d12f85a8ec6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 606dfbf69cb7e4266adccc812097688580c70f4aa90d7b60768772eb150f8e3ffb573e2469982f6c4e1f70f2887d79e4af27f36982c311f785e37c70e7b17495
|
7
|
+
data.tar.gz: 30880fb250c53714ed704c81db74ffceff11992612ac44b3c3cf897c70d3f40b021e8c52ed951a38f62b6216c1a755c03752d5c7d65b5d6797340ae61fe6e03f
|
data/.github/workflows/test.yml
CHANGED
@@ -70,5 +70,6 @@ jobs:
|
|
70
70
|
run: ./exe/helm_upgrade_logs --install nginx bitnami/nginx --wait --debug --set service.type=ClusterIP --set replicaCount=2
|
71
71
|
- name: Test bitnami
|
72
72
|
run: ./exe/helm_test_logs nginx
|
73
|
-
|
74
|
-
|
73
|
+
# Older version of redis chart - need to update to work with new syntax
|
74
|
+
# - name: Install Redis
|
75
|
+
# run: ./exe/helm_upgrade_logs --install redis bitnami/redis --set auth.enabled=false --version 15.7.2 --set replica.replicaCount=1 --wait
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
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
|
+
|
6
|
+
## [0.4.1]
|
7
|
+
|
8
|
+
- Ignore error if new environment variable `helm_upgrade_logs_ignore_child_error` is passed
|
9
|
+
|
1
10
|
## [0.4.0]
|
2
11
|
|
3
12
|
- Change to handle params before release name fixing #1
|
data/exe/helm_upgrade_logs
CHANGED
@@ -28,7 +28,7 @@ begin
|
|
28
28
|
rescue Errno::ECHILD
|
29
29
|
Process.kill("KILL", event_pid)
|
30
30
|
Process.kill("KILL", service_pid)
|
31
|
-
raise HelmUpgradeLogs::Error, "Failed to find logs before helm finished"
|
31
|
+
raise HelmUpgradeLogs::Error, "Failed to find logs before helm finished" unless ENV["helm_upgrade_logs_ignore_child_error"]
|
32
32
|
end
|
33
33
|
|
34
34
|
FileUtils.mkdir_p(UPGRADE_LOG_FOLDER) if ENV["helm_upgrade_logs_error_msg"]
|
data/lib/helm_upgrade_logs.rb
CHANGED
@@ -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"] ||= "
|
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
|
+
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:
|
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
|