pingcap / pingcap/tidb-operator

cannot apply patch when spec.initContainers is null

Open
#6,423 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

v2
Dominant language
Go
Stars
1.3k
Forks
540
Avg merge
3d 2h
Merged PRs (30d)
18

Description

Updater: cannot update instances: %!w(*fmt.wrapError=&{cannot apply patch: [TiKV.core.pingcap.com](http://tikv.core.pingcap.com/) \"db-fd7a08d4-w5wp36\" is invalid: [spec.overlay.pod.spec.initContainers: Invalid value: \"null\": spec.overlay.pod.spec.initContainers in body must be of type array: \"null\", <nil>: Invalid value: \"null\": some validation rules were not checked because the object was invalid; correct the existing errors to complete validation] 0xc0047283c0})\n"}

We deleted spec.initContainers, but it's not normal.

Contributor guide

Open the contributing guide

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.

Research direction

Start by reproducing the Updater failure involving a deleted spec.initContainers field and inspect the patch-generation path that produces spec.overlay.pod.spec.initContainers as null. The work is done when updating the TiKV resource succeeds without the Kubernetes validation error; the issue does not name source files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.