File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ #!/bin/bash
2+ 
3+ # Delete TLS secrets (will be recreated by operator) and restart deployments in correct order.
4+ # Switch to the namespace you want to delete the TLS secrets from.
5+ 
6+ # Discover the Securesign instance name
7+ INSTANCE_NAME=$(oc get Securesign -o jsonpath='{.items[0].metadata.name}')
8+ 
9+ if [[ -z "$INSTANCE_NAME" ]]; then
10+     echo "No Securesign instance found in current namespace"
11+     exit 1
12+ fi
13+ 
14+ echo "Deleting TLS secrets..."
15+ oc delete secret ${INSTANCE_NAME}-rekor-redis-tls --ignore-not-found=true
16+ oc delete secret ${INSTANCE_NAME}-ctlog-tls --ignore-not-found=true
17+ oc delete secret ${INSTANCE_NAME}-trillian-logserver-tls --ignore-not-found=true
18+ oc delete secret ${INSTANCE_NAME}-trillian-logsigner-tls --ignore-not-found=true
19+ oc delete secret ${INSTANCE_NAME}-trillian-db-tls --ignore-not-found=true
20+ 
21+ echo "Restarting Trillian components ..."
22+ oc rollout restart deployment trillian-db
23+ oc rollout restart deployment trillian-logserver
24+ oc rollout restart deployment trillian-logsigner
25+ 
26+ echo "Restarting Redis ..."
27+ oc rollout restart deployment rekor-redis
28+ 
29+ echo "Restarting CTlog ..."
30+ oc rollout restart deployment ctlog
31+ 
32+ echo "All deployments restarted. New TLS secrets:"
33+ oc get secrets | grep tls
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments