Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

in the event that the secret for a CR is missing, re-reconcile #131

Merged
merged 1 commit into from Oct 28, 2019

Conversation

joelddiaz
Copy link
Contributor

fix the case where the credRequest has previously been provisioned, but then the secret holding the creds (cr.Spec.SecretRef) has been deleted.

detect this case, and cause a re-reconcile even if the credRequest has recently been synced

add/update test cases

fix the case where the credRequest has previously been provisioned, but then the secret holding the creds (cr.Spec.SecretRef) has been deleted.

detect this case, and cause a re-reconcile even if the credRequest has recently been synced

add/update test cases
@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 24, 2019
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 24, 2019
}

isStale := cr.Generation != cr.Status.LastSyncGeneration
hasRecentlySynced := cr.Status.LastSyncTimestamp != nil && cr.Status.LastSyncTimestamp.Add(time.Hour*1).After(time.Now())

if !isStale && hasRecentlySynced {
if !isStale && hasRecentlySynced && crSecretExists {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aha so we were watching secret deletions and this probably worked at one point, but the logic changed and it was getting skipped if recently synced.

@dgoodwin
Copy link
Collaborator

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 28, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dgoodwin, joelddiaz

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 0119560 into openshift:master Oct 28, 2019
@joelddiaz joelddiaz deleted the watchsecrets branch June 16, 2020 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants