Pod isn't restarted when configMaps or secrets change

オープン 初心者向け
#202 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
helm, kubernetes
領域
devops

調査の方向性

ペイロードは ConfigMap と Secret のテンプレート(configmap.yaml、secret.yaml)と、チャートの Deployment 内の Pod テンプレートを指定しており、アノテーションはそこに追加することになります。Deployment の Pod テンプレートのメタデータがどのように描画されるか、また configMaps と secrets が subPath でどのようにマウントされるかを確認してください。configMaps または secrets の値を変更してチャートを描画したときに、Pod テンプレートのアノテーションが異なる値になり、アップグレード時に Pod がロールされれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Changing only a configMaps (or secrets) entry in values doesn't restart the pod. The deployment's pod template doesn't change, so helm upgrade updates the ConfigMap but leaves the old pod running. Since the chart mounts these with subPath, the running pod never sees the new content either: it keeps the old file until something else restarts it.

For example, changing an Rspamd override in configMaps and upgrading leaves Rspamd on the old config until a manual kubectl rollout restart.

The usual fix is a checksum annotation on the pod template, so any config change rolls the pod:

template:
  metadata:
    annotations:
      checksum/configmaps: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
      checksum/secrets: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
主要言語
Mustache
スター
157
フォーク
82
平均マージ
22分
マージ済み PR(30日)
3

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

docker-mailserver/docker-mailserver-helm のほかの issue

docker-mailserver/docker-mailserver-helm の issue をすべて見る

似ている issue

DevOps の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。