Add tooling around secrets-management in openshift. #88
+1,296
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces a toolset designed to simplify and automate the entire lifecycle of managing external secrets in OpenShift. It provides a guided workflow that addresses the most common challenges developers face when integrating with providers like AWS, GCP, and Vault.
In summary, the PR provides the following key capabilities:
Recommendation (recommend_secrets_management): Helps users choose the right tool for their needs, differentiating between native Kubernetes Secrets for internal use and recommending either the External Secrets Operator (ESO) or the Secrets Store CSI Driver (SSCSI) for external secrets based on the desired integration pattern (syncing vs. mounting).
Guided Setup (generate_prerequisites_plan, secrets_management_configure):
Generates clear, provider-specific instructions for configuring the necessary cloud-side prerequisites (like IAM roles for Workload Identity).
Provides the correct manifests (SecretStore, SecretProviderClass) and instructions for installing the necessary operators from the OpenShift Software Catalog.
Usage Examples (generate_example_*):
Offers ready-to-use YAML examples for an ExternalSecret and an application Pod with a CSI volume, demonstrating how to consume secrets with either ESO or SSCSI.
Automated Auditing & Debugging (secrets_management_debug):
This is the core feature, acting as a "Secret Management Auditor." It performs a comprehensive, automated health check of a user's entire secrets configuration.
It systematically inspects everything from the application pod, ServiceAccount annotations, custom resources (ExternalSecret, SecretProviderClass), operator health, and RBAC permissions.
It generates a structured report with clear PASS/FAIL statuses and provides actionable, precise instructions to fix any identified misconfigurations, transforming a complex debugging process into a simple, deterministic audit.