elastic / elastic/crd-ref-docs

Allow custom markers with values

Open
#124 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
173
Forks
81
PR merge metrics
No merged PRs in 30d

Description

Allow custom markers to have a value like kubebuilder markers.

```go
type Config struct {
// +kubebuilder:default=25
MaxOpenConns int `json:"maxOpenConns,omitempty"`
}
```

Motivation is to define an `env` custom marker to generate an extra column with the equivalent environment variable name.

```go
type Config struct {
// +env="MAX_OPEN_CONNS"
MaxOpenConns int `json:"maxOpenConns,omitempty"`
}
```

I tried implementing this using the existing `processor.customMarkers` config and modified templates like the examples, but it seems like the markers are not matched if they are followed by an equals sign.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.