Skip to content

Commit

Permalink
Merge pull request #40 from Oats87/check-probes-regardless-of-rv
Browse files Browse the repository at this point in the history
Check probes regardless of resource version
  • Loading branch information
Oats87 authored Jun 18, 2021
2 parents 466d85e + 81ca4e2 commit c757841
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/k8splan/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ func (w *watcher) start(ctx context.Context) {
}
}
logrus.Debugf("[K8s] Processing secret %s in namespace %s at generation %d with resource version %s", secret.Name, secret.Namespace, secret.Generation, secret.ResourceVersion)
needsApplied := true
if w.lastAppliedResourceVersion == secret.ResourceVersion {
logrus.Debugf("last applied resource version (%s) did not change. skipping apply.", w.lastAppliedResourceVersion)
core.Secret().EnqueueAfter(w.connInfo.Namespace, w.connInfo.SecretName, probePeriod)
return secret, nil
needsApplied = false
}
if planData, ok := secret.Data[planKey]; ok {
logrus.Tracef("[K8s] Byte data: %v", planData)
Expand All @@ -116,7 +116,6 @@ func (w *watcher) start(ctx context.Context) {
}
logrus.Debugf("[K8s] Calculated checksum to be %s", cp.Checksum)

needsApplied := true
if secretChecksumData, ok := secret.Data[appliedChecksumKey]; ok {
secretChecksum := string(secretChecksumData)
logrus.Debugf("[K8s] Remote plan had an applied checksum value of %s", secretChecksum)
Expand Down

0 comments on commit c757841

Please sign in to comment.