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

update uds-core debugging docs when Pepr v0.43.0 is merged into UDS Core #1209

Open
cmwylie19 opened this issue Jan 17, 2025 · 0 comments
Open
Labels
documentation Improvements or additions to documentation

Comments

@cmwylie19
Copy link
Contributor

cmwylie19 commented Jan 17, 2025

Affected Documentation Section

This issue relates to PR1205 depending on when it is merged.

Section Name or URL:

PR1205 introduces a Debugging section in the left menu and has a section around debugging Exemptions and Packages. The end of that section details what a watch failure looks like and gives a call to action for the user to create an issue in Pepr's watch_failure issue template.

While the information in PR 1205 is accurate today, the next release of Pepr has switched to distroless image.

This means, the way that metrics are obtained in that document will need to change after UDS Core brings in Pepr v0.43.0 which will be released on Tuesday Jan 21.

Update Details

The section that shows how to get the metrics in the airgap environment:

   # in an airgap environment
   kubectl exec -it -n pepr-system deploy/pepr-uds-core-watcher -- /bin/sh -c 'node -e "process.env.NODE_TLS_REJECT_UNAUTHORIZED = \"0\"; fetch(\"https://pepr-uds-core-watcher/metrics\").then(res => res.text()).then(body => console.log(body)).catch(err => console.error(err))"'
   # in a connected environment
   kubectl run curler --image=nginx:alpine --rm -it --restart=Never -n pepr-system --labels=zarf.dev/agent=ignore -- curl -k https://pepr-uds-core-watcher/metrics

will change to:

   # in an airgap environment
    WATCH_POD=$(kubectl get po -n pepr-system -l pepr.dev/controller=watcher -ojsonpath='{.items[0].metadata.name}')
    kubectl debug $WATCH_POD -n pepr-system -it --copy-to=metrics --container=watcher -- /nodejs/bin/node -e "process.env.NODE_TLS_REJECT_UNAUTHORIZED = \"0\"; fetch(\"https://pepr-uds-core-watcher/metrics\").then(res => res.text()).then(body => console.log(body)).catch(err => console.error(JSON.stringify(err)))" && kubectl delete pod metrics -n pepr-system

   # in a connected environment
   kubectl run curler --image=nginx:alpine --rm -it --restart=Never -n pepr-system --labels=zarf.dev/agent=ignore -- curl -k https://pepr-uds-core-watcher/metrics

Why Is This Update Needed?

This is important because node is not available in the same location in the container path.


Additional Context (Optional)

I am happy to take on this change should you like. Ping me if you have any questions.

@cmwylie19 cmwylie19 added the documentation Improvements or additions to documentation label Jan 17, 2025
@cmwylie19 cmwylie19 changed the title update uds-core debugging docs for update uds-core debugging docs when Pepr v0.43.0 is merged into UDS Core Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant