-
Couldn't load subscription status.
- Fork 22
Simple script to recreate TLS certificates #1379
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
base: main
Are you sure you want to change the base?
Conversation
Reviewer's GuideAdds a new bash script to delete existing TLS secrets in a given namespace, trigger their recreation by the operator, and sequentially restart affected deployments to ensure fresh certificates are generated. Flow diagram for TLS certificate recreation scriptflowchart TD
A["Start script"] --> B["Delete TLS secrets"]
B --> C["Restart Trillian components"]
C --> D["Restart Redis"]
D --> E["Restart CTlog"]
E --> F["List new TLS secrets"]
F --> G["End"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there - I've reviewed your changes and they look great!
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `hack/restoreTls.sh:25` </location>
<code_context>
+oc rollout restart deployment ctlog
+
+echo "All deployments restarted. New TLS secrets:"
+oc get secrets | grep tls
</code_context>
<issue_to_address>
**suggestion:** Using 'grep tls' may match unintended secrets.
Consider using label selectors or a more specific pattern to ensure only TLS secrets are listed.
</issue_to_address>
### Comment 2
<location> `hack/restoreTls.sh:1-3` </location>
<code_context>
+#!/bin/bash
+
+# Delete TLS secrets (will be recreated by operator) and restart deployments in correct order.
</code_context>
<issue_to_address>
**suggestion:** Consider adding 'set -e' for safer script execution.
Placing 'set -e' after the shebang ensures the script stops on command failure, preventing unintended side effects.
```suggestion
#!/bin/bash
set -e
# Delete TLS secrets (will be recreated by operator) and restart deployments in correct order.
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||||||||
PR Type
Other
Description
Script to delete and recreate TLS certificates
Restarts deployments in proper dependency order
Automates TLS certificate restoration process
Diagram Walkthrough
File Walkthrough
restoreTls.sh
TLS certificate restoration automation scripthack/restoreTls.sh