kubernetes-sigs / kubernetes-sigs/controller-tools

Generating manifest with backtick in pattern

Open
#1,084 8 comments 0 reactions 0 assignees View on GitHub
kind/bug lifecycle/frozen
Dominant language
Go
Stars
868
Forks
482
Avg merge
1d 11h
Merged PRs (30d)
8

Description

I have a struct with this annotation. Note the backtick in the pattern

```
// +kubebuilder:validation:items:Pattern=^[`a-zA-Z]+$
```

When generating the manifests I get this error `literal not terminated (at :1:3)`

Contributor guide

Open the contributing guide

Research direction

Reproduce manifest generation with the shown kubebuilder Pattern annotation containing a backtick, then trace the annotation or pattern parsing that reports the unterminated literal. Done means generation succeeds and the resulting manifest preserves the intended pattern; add a regression test if the existing test layout provides one.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.