Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

operator sync creates registry auth Secret as Opaque/config.json, incompatible with func-operator (expects dockerconfigjson)

オープン
#4,081 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

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

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

2026年10月14日 から。

  • #4082 @gauron99 による — オープン

評価

この issue はまだ評価されていません。

説明

Summary

When func deploy runs in operator mode (auto-creating/updating a Function CR), it creates the registry auth Secret as type: Opaque with data key config.json, and points the CR's spec.registry.authSecretRef at it. However func-operator reads that authSecretRef and requires type: kubernetes.io/dockerconfigjson with key .dockerconfigjson. The types don't match, so when the operator later needs that secret (e.g. on a redeploy/rebuild), it fails with:

failed to persist registry auth secret temporarily: invalid registry auth secret type, must be of type kubernetes.io/dockerconfigjson

The operator can never consume the very secret func created for it.

Where

func side (creates the secret + wires the CR):

  • pkg/operator/sync.go:41 — ensureRegistrySecret = k8s.EnsureDockerRegistrySecretExist
  • pkg/operator/sync.go:86-102 — creates <functionName>-registry-auth and sets desiredSpec.Registry.AuthSecretRef
  • pkg/k8s/secrets.go:99-102 — EnsureDockerRegistrySecretExist creates the Secret as:
    Type: corev1.SecretTypeOpaque,
    secret.Data["config.json"] = dockerConfigJSONContent
    

func-operator side (rejects it):

  • internal/controller/function_deploy.go (persistRegistryAuthSecret) requires authSecret.Type == corev1.SecretTypeDockerConfigJson and data key corev1.DockerConfigJsonKey (.dockerconfigjson).

Reproduce

  1. On a cluster with func-operator installed, with registry credentials available (e.g. you've docker login'd), func deploy a function so operator sync creates a Function CR with registry.authSecretRef pointing at the func-created -registry-auth Opaque secret.
  2. Trigger an operator redeploy of that function (e.g. the deployed image's middleware is outdated, so the operator rebuilds).
  3. The operator reconcile fails: invalid registry auth secret type, must be of type kubernetes.io/dockerconfigjson.

Expected

The Secret func creates for spec.registry.authSecretRef should be in the format func-operator consumes — type: kubernetes.io/dockerconfigjson with key .dockerconfigjson — so the operator can use the credentials func provisioned. (Alternatively the two projects agree on a single format; today they disagree.)

Notes

  • Found while building e2e coverage for func-operator's middleware-rebuild path on OpenShift. The func-operator detection worked correctly (Middleware outdated, redeploying current=v0.21.3 available=v0.22.0); the rebuild then failed on the secret type.
  • EnsureDockerRegistrySecretExist producing an Opaque/config.json secret (rather than a dockerconfigjson-typed one) is itself a little surprising given the name.
主要言語
Go
スター
366
フォーク
226
平均マージ
1日 9時間
マージ済み PR(30日)
24

環境構築

はじめの一歩

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

knative/func のほかの issue

knative/func の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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