Exemption and Package Updates
Exemptions and Package Updates in the Cluster
This guide provides steps to debug issues with Exemptions
and Packages
not being applied or updated in your Kubernetes cluster. Common symptoms include:
- Changes to Exemptions or Packages are not reflected in the cluster.
- Expected behavior in workloads remains unaffected.
- Logs indicate potential Kubernetes Watch failures.
Follow this guide to identify and resolve these issues.
Initial Checklist
Before diving into detailed debugging, ensure the following:
-
Verify Configuration:
- Ensure that Exemptions and Packages are defined correctly in your manifests.
- Refer to the specification documents for correct schema and examples:
-
Namespace for Exemptions:
- Ensure Exemptions are applied in the
uds-policy-exemptions
namespace, unless you are using an override.
- Ensure Exemptions are applied in the
-
Cluster and Deployment Status:
- Confirm the cluster and relevant controller deployments are running without errors:
Troubleshooting Kubernetes Watch
Kubernetes Watch is a mechanism used to monitor resource changes in real-time. Failures in Watch can cause Exemptions and Package updates to not propagate.
Steps to Check Watch Logs
-
Identify the Controller Pod:
-
Check the logs of the controller managing Exemptions using the following command:
-
If the logs do not show entries similar to the following, it may indicate that the Watch missed the event:
-
-
Verify Package Processing:
-
Use the following command to check logs for Package processing:
-
If the logs do not show entries similar to the following, it may indicate an issue with the Watch:
-
Reporting Watch Issues
If you are experiencing issues with the watch functionality, please provide the necessary logs and metrics to help us investigate. Follow these steps:
- Open an Issue
Visit the Pepr GitHub Issues page and create a new issue using the Watch Failure template and attach the logs and metrics. - Collect Metrics from the Watcher
Use the following command to retrieve metrics from the watcher service, store them inmetrics.txt
: - Provide Watch Logs
Include the logs from the controller and watch pod in the issue, store them inwatcher.log
. - Provide Controller Logs
Include the logs from the controller pods in the issue, store them inadmission.log
.