Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

[elasticsearch] do not regenerate certs during upgrade #1677

Merged
merged 1 commit into from
Aug 29, 2022

Conversation

jmlrt
Copy link
Member

@jmlrt jmlrt commented Aug 2, 2022

This commit remove the pre-upgrade hook for the certificate secret to
ensure that the certificate isn't regenerate each time we run the
helm upgrade command.

This commit remove the `pre-upgrade` hook for the certificate secret to
ensure that the certificate isn't regenerate each time we run the
`helm upgrade` command.
@jmlrt jmlrt requested review from framsouza and a team August 2, 2022 10:06
@jmlrt
Copy link
Member Author

jmlrt commented Aug 2, 2022

👋🏻 @framsouza, I discovered this issue while working on #1676. Each time I ran helm upgrade, the certificate was regenerated and the secret updated without updating the Elasticsearch pods, then running helm test was failing because it was using the new wrong certificate.

I'm afraid we could also have issues in prod environnements when an Elasticsearch pod is recreated (for example because of a K8S node failure) in a chart release that has already been upgraded, because the new pod could be using a new certificate while the other ones would still be using the old certificate from the first deployment.

Do you see some use case where regenerating certs during upgrade is required?

@jmlrt
Copy link
Member Author

jmlrt commented Aug 2, 2022

ok to test

1 similar comment
@jmlrt
Copy link
Member Author

jmlrt commented Aug 3, 2022

ok to test

Copy link
Member

@mgreau mgreau left a comment

Choose a reason for hiding this comment

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

LGTM

@framsouza
Copy link
Contributor

LGTM

@jmlrt jmlrt merged commit 579f51e into elastic:main Aug 29, 2022
@jmlrt jmlrt deleted the es-fix-certs-upgrade branch August 29, 2022 14:50
@jmlrt jmlrt added the v8.5.1 label Nov 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants