FindReferencingConfigMaps and FindReferencingSecrets miss CronJob references

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

メンテナーはふだん 2 日以内に返信

@Ankitdotraider がすでに取り組んでいます。

2026年7月15日 から。

  • #6762 @Ram04102007 による — マージされずにクローズ
  • #7030 @Ankitdotraider による — マージされずにクローズ

評価

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

調査の方向性

provider パッケージ kubernetes と kubernetes_multicluster で FindReferencingConfigMaps と FindReferencingSecrets を検索し、pod template 用に既存する nestedStringSlice probes を比較します。issue に記載された CronJob の jobTemplate パスに対応する probes を追加し、volume、container、init container からの ConfigMap と Secret の参照が見つかることを確認します。

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

説明

What's the problem

While looking at the code after #6528 was fixed, I noticed that
FindReferencingConfigMaps and FindReferencingSecrets have the same
gap — they don't handle CronJobs.

Both functions only look through spec.template.spec.*, which works
for Deployments, StatefulSets, and DaemonSets. But CronJobs put their
pod template under spec.jobTemplate.spec.template.spec.*, so any
ConfigMap or Secret referenced inside a CronJob is completely invisible
to these functions.

What breaks

If a CronJob mounts a ConfigMap as a volume or pulls credentials from a
Secret via env, PipeCD won't know about it. That means drift detection
won't catch config changes, and re-deploys won't be triggered when those
configs change.

Paths that are currently missed

FindReferencingConfigMaps:

  • spec.jobTemplate.spec.template.spec.volumes.configMap.name
  • spec.jobTemplate.spec.template.spec.containers.env.valueFrom.configMapKeyRef.name
  • spec.jobTemplate.spec.template.spec.containers.envFrom.configMapRef.name
  • spec.jobTemplate.spec.template.spec.initContainers.env.valueFrom.configMapKeyRef.name
  • spec.jobTemplate.spec.template.spec.initContainers.envFrom.configMapRef.name

FindReferencingSecrets:

  • spec.jobTemplate.spec.template.spec.volumes.secret.secretName
  • spec.jobTemplate.spec.template.spec.containers.env.valueFrom.secretKeyRef.name
  • spec.jobTemplate.spec.template.spec.containers.envFrom.secretRef.name
  • spec.jobTemplate.spec.template.spec.initContainers.env.valueFrom.secretKeyRef.name
  • spec.jobTemplate.spec.template.spec.initContainers.envFrom.secretRef.name

The fix is straightforward — add the missing nestedStringSlice probes
for the jobTemplate paths, same pattern already used for the existing paths.

Affects both kubernetes and kubernetes_multicluster provider packages.

主要言語
Go
スター
1.4k
フォーク
391
平均マージ
4日 1時間
マージ済み PR(30日)
58

環境構築

はじめの一歩

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

pipe-cd/pipecd のほかの issue

pipe-cd/pipecd の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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