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

Add chart Debug method #138

Merged
merged 5 commits into from
Dec 20, 2024
Merged

Add chart Debug method #138

merged 5 commits into from
Dec 20, 2024

Conversation

mallardduck
Copy link
Member

Per title, this PR adds method to debug the embedded chart inside of PromFed.
It's a lot easier to exec into the pod and run:

cd /tmp
prometheus-federator debug-chart

Which will save the chart to the ${CWD}/.debug folder.

@mallardduck mallardduck requested a review from a team as a code owner December 17, 2024 19:14
Copy link

Images built for PR #138:

  • Helm Locker - Tags:
    • ghcr.io/rancher/prometheus-federator/helm-locker:pr-138-36b409d ghcr.io/rancher/prometheus-federator/helm-locker:pr-138
  • Helm Project Operator - Tags:
    • ghcr.io/rancher/prometheus-federator/helm-project-operator:pr-138-36b409d ghcr.io/rancher/prometheus-federator/helm-project-operator:pr-138
  • Prometheus Federator - Tags:
    • ghcr.io/rancher/prometheus-federator:pr-138-36b409d ghcr.io/rancher/prometheus-federator:pr-138

Helm Debug Values:

  image:
    pullPolicy: Always
    registry: ghcr.io
    repository: rancher/prometheus-federator
    tag: pr-138-36b409d

Copy link
Contributor

@alexandreLamarre alexandreLamarre left a comment

Choose a reason for hiding this comment

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

LGTM, just some stylistic things to consider

pkg/debug/chart.go Outdated Show resolved Hide resolved
pkg/debug/chart.go Show resolved Hide resolved
pkg/debug/chart.go Outdated Show resolved Hide resolved
pkg/debug/chart.go Outdated Show resolved Hide resolved
Comment on lines 18 to 20
var (
chartOnly bool
)
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a tip, not really review feedback, but you can actually define this variable in the ChartDebugCommand function too and have it work the same while making sure no one down the line wants to depend on or modify this variable

@mallardduck mallardduck merged commit 7d2134f into rancher:main Dec 20, 2024
17 checks passed
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.

2 participants