From 5383d2e858443d5e0ffff1616b9afe6c83c1fa26 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 25 Apr 2023 10:21:45 +0200 Subject: [PATCH 1/3] chore(main): release 0.2.5 (#302) --- .release-please-manifest.json | 2 +- CHANGELOG.md | 30 +++++++++++++++++++++++++++++ README.md | 12 ++++++------ container/manifests/deployment.yaml | 2 +- 4 files changed, 38 insertions(+), 8 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 5b839e3..f66cefa 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1 +1 @@ -{".":"0.2.4"} \ No newline at end of file +{".":"0.2.5"} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 212f85f..8674b62 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,35 @@ # Changelog +## [0.2.5](https://github.com/k8sgpt-ai/k8sgpt/compare/v0.2.4...v0.2.5) (2023-04-25) + + +### Features + +* add configuration interface to support customer providers ([84a3cc0](https://github.com/k8sgpt-ai/k8sgpt/commit/84a3cc05fb6e21b732ef777351b42db8045e1093)) +* add k8sgpt grafana dashboard ([#316](https://github.com/k8sgpt-ai/k8sgpt/issues/316)) ([ff79982](https://github.com/k8sgpt-ai/k8sgpt/commit/ff799825cfe5856bb97c8f38d939ec36b19fa30a)) +* add serve & integration to README ([a65ee7f](https://github.com/k8sgpt-ai/k8sgpt/commit/a65ee7fc0957c7ba9369bdbe12e648818ca3f841)) +* add subproject group to CODEOWNERS ([#322](https://github.com/k8sgpt-ai/k8sgpt/issues/322)) ([2391603](https://github.com/k8sgpt-ai/k8sgpt/commit/2391603075e73b91d9988d40eecddfc3e0593405)) +* allow to set a baseurl ([#310](https://github.com/k8sgpt-ai/k8sgpt/issues/310)) ([cf797a6](https://github.com/k8sgpt-ai/k8sgpt/commit/cf797a6eb67efba957704077b4b04ed3ee166c24)) +* async calls ([#311](https://github.com/k8sgpt-ai/k8sgpt/issues/311)) ([c3cc413](https://github.com/k8sgpt-ai/k8sgpt/commit/c3cc413e7fc3b06b310779dfa3cb4863ea9f3ed2)) +* modify error handling to return a list of errors to display to the user at the end of analysis without blocking it if an error is detected (e.g., version of an object is not available on user's cluster) ([fa087ff](https://github.com/k8sgpt-ai/k8sgpt/commit/fa087ff5593871d2a07d68f203dd91e66c57e40b)) +* the overall optimization and architecture design of the makefile are made ([#317](https://github.com/k8sgpt-ai/k8sgpt/issues/317)) ([754bf91](https://github.com/k8sgpt-ai/k8sgpt/commit/754bf917e1ac524699d38fb2dc59bc5d858f6d80)) +* update readme ([#314](https://github.com/k8sgpt-ai/k8sgpt/issues/314)) ([ddd830c](https://github.com/k8sgpt-ai/k8sgpt/commit/ddd830cc569278c157480c44a671c9be20c95b24)) +* use OS conform path for storing cached results ([7eddb8f](https://github.com/k8sgpt-ai/k8sgpt/commit/7eddb8f4a6dc61d5f66fc1bf56c0e8cbf9370229)), closes [#323](https://github.com/k8sgpt-ai/k8sgpt/issues/323) + + +### Bug Fixes + +* **deps:** update module github.com/aquasecurity/trivy-operator to v0.13.1 ([#321](https://github.com/k8sgpt-ai/k8sgpt/issues/321)) ([e7f74db](https://github.com/k8sgpt-ai/k8sgpt/commit/e7f74db6e556146b898437bb777c2b803d1bec4f)) +* **deps:** update module github.com/prometheus/client_golang to v1.15.0 ([#303](https://github.com/k8sgpt-ai/k8sgpt/issues/303)) ([df2ed41](https://github.com/k8sgpt-ai/k8sgpt/commit/df2ed4185b5a33a18e6b144c85bec3902c14d209)) +* **deps:** update module github.com/sashabaranov/go-openai to v1.9.0 ([#298](https://github.com/k8sgpt-ai/k8sgpt/issues/298)) ([0472c36](https://github.com/k8sgpt-ai/k8sgpt/commit/0472c363a4d8a90556bc744fbf513ad63281e38b)) + + +### Other + +* add serviceMonitor in sample yaml ([#304](https://github.com/k8sgpt-ai/k8sgpt/issues/304)) ([0a4ed0d](https://github.com/k8sgpt-ai/k8sgpt/commit/0a4ed0d907c22a924dd79e8945eb9d6d10cd9ce7)) +* analyze Pod ReadinessProbe faliure ([3c7e0bb](https://github.com/k8sgpt-ai/k8sgpt/commit/3c7e0bba1d4cc8247d248756dcfef884bc406992)) +* change license to Apache-2 ([#313](https://github.com/k8sgpt-ai/k8sgpt/issues/313)) ([d0f7a11](https://github.com/k8sgpt-ai/k8sgpt/commit/d0f7a1105fe7ed317785782d3af45c83766b7d80)) + ## [0.2.4](https://github.com/k8sgpt-ai/k8sgpt/compare/v0.2.3...v0.2.4) (2023-04-18) diff --git a/README.md b/README.md index e2ec26b..dc33b03 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ brew install k8sgpt **32 bit:** ``` - curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.2.4/k8sgpt_386.rpm + curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.2.5/k8sgpt_386.rpm sudo rpm -ivh k8sgpt_386.rpm ``` @@ -39,7 +39,7 @@ brew install k8sgpt ``` - curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.2.4/k8sgpt_amd64.rpm + curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.2.5/k8sgpt_amd64.rpm sudo rpm -ivh -i k8sgpt_amd64.rpm ``` @@ -51,7 +51,7 @@ brew install k8sgpt **32 bit:** ``` - curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.2.4/k8sgpt_386.deb + curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.2.5/k8sgpt_386.deb sudo dpkg -i k8sgpt_386.deb ``` @@ -59,7 +59,7 @@ brew install k8sgpt ``` - curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.2.4/k8sgpt_amd64.deb + curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.2.5/k8sgpt_amd64.deb sudo dpkg -i k8sgpt_amd64.deb ``` @@ -72,14 +72,14 @@ brew install k8sgpt **32 bit:** ``` - curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.2.4/k8sgpt_386.apk + curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.2.5/k8sgpt_386.apk apk add k8sgpt_386.apk ``` **64 bit:** ``` - curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.2.4/k8sgpt_amd64.apk + curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.2.5/k8sgpt_amd64.apk apk add k8sgpt_amd64.apk ``` x diff --git a/container/manifests/deployment.yaml b/container/manifests/deployment.yaml index 9aa7efa..506b40d 100644 --- a/container/manifests/deployment.yaml +++ b/container/manifests/deployment.yaml @@ -19,7 +19,7 @@ spec: containers: - name: k8sgpt-container imagePullPolicy: Always - image: ghcr.io/k8sgpt-ai/k8sgpt:v0.2.4 #x-release-please-version + image: ghcr.io/k8sgpt-ai/k8sgpt:v0.2.5 #x-release-please-version ports: - containerPort: 8080 args: ["serve"] From 692cd06c385c1c6f458994f6e975a9fce2bc1c57 Mon Sep 17 00:00:00 2001 From: Patrick Pichler Date: Tue, 25 Apr 2023 10:35:39 +0200 Subject: [PATCH 2/3] fix: explicitly pass in filter to async analysis go routine (#326) Before the filter inside the func literal was capturing the value from the outer loop. This is a subtle mistake, since in combination with running the function literal as go routine, the value of filter could have already changed at invocation time. To fix this, the filter is now passed in as an argument to the func literal. Signed-off-by: Patrick Pichler Co-authored-by: Patrick Pichler --- pkg/analysis/analysis.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/analysis/analysis.go b/pkg/analysis/analysis.go index 465d10a..075cfea 100644 --- a/pkg/analysis/analysis.go +++ b/pkg/analysis/analysis.go @@ -161,7 +161,7 @@ func (a *Analysis) RunAnalysis() []error { if analyzer, ok := analyzerMap[filter]; ok { semaphore <- struct{}{} wg.Add(1) - go func(analyzer common.IAnalyzer) { + go func(analyzer common.IAnalyzer, filter string) { defer wg.Done() results, err := analyzer.Analyze(analyzerConfig) if err != nil { @@ -173,7 +173,7 @@ func (a *Analysis) RunAnalysis() []error { a.Results = append(a.Results, results...) mutex.Unlock() <-semaphore - }(analyzer) + }(analyzer, filter) } else { errorList = append(errorList, fmt.Errorf(fmt.Sprintf("\"%s\" filter does not exist. Please run k8sgpt filters list.", filter))) } @@ -190,7 +190,7 @@ func (a *Analysis) RunAnalysis() []error { if analyzer, ok := analyzerMap[filter]; ok { semaphore <- struct{}{} wg.Add(1) - go func(analyzer common.IAnalyzer) { + go func(analyzer common.IAnalyzer, filter string) { defer wg.Done() results, err := analyzer.Analyze(analyzerConfig) if err != nil { @@ -202,7 +202,7 @@ func (a *Analysis) RunAnalysis() []error { a.Results = append(a.Results, results...) mutex.Unlock() <-semaphore - }(analyzer) + }(analyzer, filter) } } wg.Wait() From 3d11e12963e510a38d3beb75dbaac69ec711cfbf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 25 Apr 2023 10:44:08 +0200 Subject: [PATCH 3/3] chore(main): release 0.2.6 (#327) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ README.md | 12 ++++++------ container/manifests/deployment.yaml | 2 +- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f66cefa..0e2fa8d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1 +1 @@ -{".":"0.2.5"} \ No newline at end of file +{".":"0.2.6"} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 8674b62..bda2ca6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.2.6](https://github.com/k8sgpt-ai/k8sgpt/compare/v0.2.5...v0.2.6) (2023-04-25) + + +### Bug Fixes + +* explicitly pass in filter to async analysis go routine ([#326](https://github.com/k8sgpt-ai/k8sgpt/issues/326)) ([692cd06](https://github.com/k8sgpt-ai/k8sgpt/commit/692cd06c385c1c6f458994f6e975a9fce2bc1c57)) + ## [0.2.5](https://github.com/k8sgpt-ai/k8sgpt/compare/v0.2.4...v0.2.5) (2023-04-25) diff --git a/README.md b/README.md index dc33b03..b0b2ec6 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ brew install k8sgpt **32 bit:** ``` - curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.2.5/k8sgpt_386.rpm + curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.2.6/k8sgpt_386.rpm sudo rpm -ivh k8sgpt_386.rpm ``` @@ -39,7 +39,7 @@ brew install k8sgpt ``` - curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.2.5/k8sgpt_amd64.rpm + curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.2.6/k8sgpt_amd64.rpm sudo rpm -ivh -i k8sgpt_amd64.rpm ``` @@ -51,7 +51,7 @@ brew install k8sgpt **32 bit:** ``` - curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.2.5/k8sgpt_386.deb + curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.2.6/k8sgpt_386.deb sudo dpkg -i k8sgpt_386.deb ``` @@ -59,7 +59,7 @@ brew install k8sgpt ``` - curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.2.5/k8sgpt_amd64.deb + curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.2.6/k8sgpt_amd64.deb sudo dpkg -i k8sgpt_amd64.deb ``` @@ -72,14 +72,14 @@ brew install k8sgpt **32 bit:** ``` - curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.2.5/k8sgpt_386.apk + curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.2.6/k8sgpt_386.apk apk add k8sgpt_386.apk ``` **64 bit:** ``` - curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.2.5/k8sgpt_amd64.apk + curl -LO https://github.com/k8sgpt-ai/k8sgpt/releases/download/v0.2.6/k8sgpt_amd64.apk apk add k8sgpt_amd64.apk ``` x diff --git a/container/manifests/deployment.yaml b/container/manifests/deployment.yaml index 506b40d..951784b 100644 --- a/container/manifests/deployment.yaml +++ b/container/manifests/deployment.yaml @@ -19,7 +19,7 @@ spec: containers: - name: k8sgpt-container imagePullPolicy: Always - image: ghcr.io/k8sgpt-ai/k8sgpt:v0.2.5 #x-release-please-version + image: ghcr.io/k8sgpt-ai/k8sgpt:v0.2.6 #x-release-please-version ports: - containerPort: 8080 args: ["serve"]