Skip to content

Commit

Permalink
fix: fix secret reconciliation (#138)
Browse files Browse the repository at this point in the history
* fix secret reconciliation

Only secret Data and Type should be compared during reconciliation otherwise projected and existing secrets will never match due to metadata that contains timestamps.

* fixtypo
  • Loading branch information
riuvshyn authored Jun 10, 2020
1 parent 9fea754 commit 1f73422
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/controller/credstashsecret/credstashsecret_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ func (r *ReconcileCredstashSecret) Reconcile(request reconcile.Request) (reconci
return reconcile.Result{}, err
}

// Secret is out of date with credstash data
if !reflect.DeepEqual(secret, found) {
// Secret data or type is out of date with credstashsecret
if !reflect.DeepEqual(secret.Data, found.Data) || !reflect.DeepEqual(secret.Type, found.Type) {
reqLogger.Info(
"Updating Secret because contents have changed",
"Secret.Namespace",
Expand Down

0 comments on commit 1f73422

Please sign in to comment.