Function CR sync should keep the spec fields func does not set

Open
#4,156 1 comment 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 2 days

@gauron99 is already working on this.

Since Nov 11, 2026.

Assessment

This issue has not been assessed yet.

Description

Function CR sync replaces the whole spec, so it drops settings func does not set: repository.authSecretRef and an explicit autoUpdateMiddleware: false. After each deploy the operator can no longer clone a private repository, and middleware auto-updates turn back on for functions that opted out.

This already happens on local deploys. #4105 extends sync to func deploy --remote.

Proposal: on update, write only the fields func owns (repository URL, revision, dir, and registry auth when func has a login). Keep the rest of the existing spec. Add a regression test that an existing authSecretRef and autoUpdateMiddleware: false survive a sync.

From the review on #4105: https://github.com/knative/func/pull/4105#discussion_r4374559779

Dominant language
Go
Stars
366
Forks
231
Avg merge
2d 23h
Merged PRs (30d)
50

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from knative/func

All issues in knative/func

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.