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

Add better handling for secrets #56

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

anbaig
Copy link
Collaborator

@anbaig anbaig commented Jun 28, 2024

Issue #, if available:

Description of changes:

  1. Before you would get validation exceptions if the secrets were empty in the activation resource, it was slightly confusing to see so I replaced it with a message that informs the user the requeuing is happening because the secret contains no data
  2. The certificate resource could fail to delete if the secret it was referring to was deleted first. The manager would try to reconcile the certificate and find the secret is gone and it would get stuck in a terminal loop. Fixed this by allowing a requeue if the secret no longer exists. Eventually the delete will go through instead of hanging.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ack-prow ack-prow bot requested review from a-hilaly and ndbhat June 28, 2024 19:51
Copy link

ack-prow bot commented Jun 28, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: anbaig

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

@ack-prow ack-prow bot added the approved label Jun 28, 2024
Copy link
Contributor

Choose a reason for hiding this comment

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

looks good! We should have tests for the empty secrets case

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe need to requeue if the Secret cannot be written, after writeCertificateChainToSecret()

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good call, will add that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants