Skip to content

Conversation

@brandond
Copy link
Member

@brandond brandond commented May 11, 2022

Updates to the secret that occurred before the controller was done syncing were not being written to Kubernetes. Subsequent updates to the secret would eventually get it written, but Rancher requires that the cert be written immediately. This was probably an unnecessary optimization anyway, so back it out in favor of just checking to see if the secrets controller is available.

Other fixes:

  • Fix improper handling of multiple goroutines attempting to create the Kubernetes secret at the same time; this was also handled eventually but caused an unnecessary round of extra writes to the secret.
  • Add warning when no cert is available on startup.
  • Add warning when signing operation may change the certificate's issuer - this may indicate a problem with inconsistent CAs between nodes.
  • Fix not adding IP SANs for IPv6 addresses.

Related to:

Updates to the secret that occurred before the controller was done
syncing were not being written to Kubernetes. Subsequent updates to the
secret would eventually get it written, but Rancher requires that the
cert be written immediately. This was probably an unnecessary
optimization anyway, so back it out in favor of just checking to see if
the secrets controller is available.

Also fixed improper handling of multiple goroutines attempting to create
the Kubernetes secret at the same time; this was also handled eventually
but caused an unnecessary round of extra writes to the secret.

Signed-off-by: Brad Davidson <[email protected]>
brandond added 2 commits May 11, 2022 13:41
Also, print a warning when signing may change the issuer.

Signed-off-by: Brad Davidson <[email protected]>
@brandond brandond requested a review from rmweir May 20, 2022 00:36
Copy link
Contributor

@rmweir rmweir left a comment

Choose a reason for hiding this comment

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

LGTM

@brandond brandond merged commit d2b7e2a into rancher:master May 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants