Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(collector): add helm collector #1309

Merged
merged 5 commits into from
Aug 27, 2023
Merged

feat(collector): add helm collector #1309

merged 5 commits into from
Aug 27, 2023

Conversation

DexterYan
Copy link
Member

@DexterYan DexterYan commented Aug 25, 2023

Description, Motivation and Context

  • add helm collector to collector helm release by release name or namespace
  • add helm collector e2e test with nginx chart

#1285
#1292

Docs: replicatedhq/troubleshoot.sh#523

Checklist

  • New and existing tests pass locally with introduced changes.
  • Tests for the changes have been added (for bug fixes / features)
  • The commit message(s) are informative and highlight any breaking changes
  • Any documentation required has been added/updated. For changes to https://troubleshoot.sh/ create a PR here

Does this PR introduce a breaking change?

  • Yes
  • No

@DexterYan DexterYan requested a review from a team as a code owner August 25, 2023 02:44
@DexterYan DexterYan marked this pull request as draft August 25, 2023 02:44
@DexterYan
Copy link
Member Author

DexterYan commented Aug 25, 2023

case 1 only release name

apiVersion: troubleshoot.sh/v1beta2
kind: SupportBundle
metadata:
  name: default
spec:
  collectors:
    - helm:
        releaseName: mysql-1692919203

case 2 only namespace

apiVersion: troubleshoot.sh/v1beta2
kind: SupportBundle
metadata:
  name: default
spec:
  collectors:
    - helm:
        namespace: "default"

case 3 release name and namespace

apiVersion: troubleshoot.sh/v1beta2
kind: SupportBundle
metadata:
  name: default
spec:
  collectors:
    - helm:
        releaseName: mysql-1692919203
        namespace: "default"

case 4 all

apiVersion: troubleshoot.sh/v1beta2
kind: SupportBundle
metadata:
  name: default
spec:
  collectors:
    - helm: {}

Results

helm/default.json

[
	{
		"releaseName": "mysql-1692919203",
		"chart": "mysql",
		"chartVersion": "9.10.9",
		"appVersion": "8.0.34",
		"namespace": "default",
		"releaseHistory": [
			{
				"revision": "1",
				"date": "2023-08-25 11:20:05.153483 +1200 NZST",
				"status": "deployed"
			}
		]
	}
]

helm/test.json

[
	{
		"releaseName": "niginx",
		"chart": "nginx",
		"chartVersion": "15.2.0",
		"appVersion": "1.25.2",
		"namespace": "test",
		"releaseHistory": [
			{
				"revision": "1",
				"date": "2023-08-25 12:15:28.083534 +1200 NZST",
				"status": "deployed"
			}
		]
	}
]

Copy link
Contributor

@CpuID CpuID left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking good so far 👍

@DexterYan DexterYan marked this pull request as ready for review August 25, 2023 05:46
@DexterYan DexterYan merged commit b7d5a98 into main Aug 27, 2023
44 of 45 checks passed
@DexterYan DexterYan deleted the dx/helm-release-history branch August 27, 2023 23:51
@xavpaice xavpaice linked an issue Aug 31, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Helm Install History
2 participants