-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for query RBAC to tempomonolithic #1131
base: main
Are you sure you want to change the base?
Conversation
582f44c
to
21a6a1d
Compare
// | ||
// +kubebuilder:validation:Optional | ||
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Query Configuration",xDescriptors="urn:alm:descriptor:com.tectonic.ui:advanced" | ||
Query MonolithicQuerySpec `json:"query,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Query MonolithicQuerySpec `json:"query,omitempty"` | |
Query *MonolithicQuerySpec `json:"query,omitempty"` |
In the monolithic CR we use pointers for all structs, because otherwise, writing an empty spec to the cluster and reading it back gives two different YAML objects, like this:
spec:
query:
rbac: {}
In the tempomonolithic_defaults.go
we fill in the possibly-nil pointers to avoid panics when reading from nil pointers:
tempo-operator/api/tempo/v1alpha1/tempomonolithic_defaults.go
Lines 48 to 53 in 7846041
if r.Spec.Ingestion == nil { | |
r.Spec.Ingestion = &MonolithicIngestionSpec{} | |
} | |
if r.Spec.Ingestion.OTLP == nil { | |
r.Spec.Ingestion.OTLP = &MonolithicIngestionOTLPSpec{} | |
} |
// +optional | ||
// +kubebuilder:validation:Optional | ||
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Query RBAC Settings" | ||
RBAC RBACSpec `json:"rbac,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RBAC RBACSpec `json:"rbac,omitempty"` | |
RBAC *RBACSpec `json:"rbac,omitempty"` |
same as above
Signed-off-by: Pavol Loffay <[email protected]>
21a6a1d
to
5a89394
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1131 +/- ##
==========================================
- Coverage 58.58% 58.56% -0.02%
==========================================
Files 113 113
Lines 10213 10246 +33
==========================================
+ Hits 5983 6001 +18
- Misses 3922 3937 +15
Partials 308 308
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Pavol Loffay <[email protected]>
https://issues.redhat.com/browse/TRACING-5134