Skip to content

Commit

Permalink
Merge pull request #37 from lmilleri/fix-secrets
Browse files Browse the repository at this point in the history
Fix adding new secret to trustee
  • Loading branch information
bpradipt authored Jul 10, 2024
2 parents 185be60 + 51cfee7 commit c18937f
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 c18937f

Please sign in to comment.