stakater / Reloader

A Kubernetes controller to watch changes in ConfigMap and Secrets and do rolling upgrades on Pods with their associated Deployment, StatefulSet, DaemonSet and DeploymentConfig – [✩Star] if you're using it!
https://docs.stakater.com/reloader/
Apache License 2.0
7.52k stars 503 forks source link

[ENHANCE] Re-evaluate using hashes to store secrets for comparisons during upgrade #608

Open MuneebAijaz opened 8 months ago

MuneebAijaz commented 8 months ago

Is your feature request related to a problem? Please describe. As of now, reloader converts secrets into a hash, and stores it in a deployment as an env variable, which then triggers an upgrade in underlying pods.

This causes two concerns

  1. for normal usecases of upgrades, we dont need to compare the hashes, informers can directly watch the secrets and do the comparison for us
  2. currently, sha1 is used, which becomes a security concern
  3. upgrading to a safer encryption might bring reloader under more computational load

Describe the solution you'd like For the solution, We can use informers for simple comparison usecases when both old and new instances of secrets are available.

For edge cases,

Describe alternatives you've considered Not yet, open for discussion

Additional context Add any other context or screenshots about the feature request here.

fdberlking commented 8 months ago

Related issues regarding SHA1: https://github.com/stakater/Reloader/issues/594

Related PR: #527