Skip to content

Commit

Permalink
Fix add new secret to trustee
Browse files Browse the repository at this point in the history
This operation is now possible after trustee deployment

Signed-off-by: Leonardo Milleri <[email protected]>
  • Loading branch information
lmilleri committed Jul 4, 2024
1 parent 185be60 commit 51cfee7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion internal/controller/kbsconfig_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -622,8 +622,16 @@ func (r *KbsConfigReconciler) isHttpsConfigPresent() bool {
// updateKbsDeployment updates an existing deployment for the KBS instance
// Errors are logged by the callee and hence no error is logged in this method
func (r *KbsConfigReconciler) updateKbsDeployment(ctx context.Context, deployment *appsv1.Deployment) error {
// re-generates the deployment
newDeployment, err := r.newKbsDeployment(ctx)
if err != nil {
return err
}

// overwrites the template spec, if any changes
deployment.Spec.Template.Spec = *newDeployment.Spec.Template.Spec.DeepCopy()

err := r.Client.Update(ctx, deployment)
err = r.Client.Update(ctx, deployment)
if err != nil {
return err
} else {
Expand Down

0 comments on commit 51cfee7

Please sign in to comment.