Skip to content

Commit

Permalink
Assign correct resources to oauth proxy, empty as default
Browse files Browse the repository at this point in the history
Signed-off-by: Ruben Vargas <[email protected]>
  • Loading branch information
rubenvp8510 committed Feb 11, 2025
1 parent 1adba61 commit 890382d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions api/tempo/v1alpha1/tempomonolithic_defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"strings"
"time"

corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/utils/ptr"
Expand Down Expand Up @@ -84,6 +85,10 @@ func (r *TempoMonolithic) Default(ctrlConfig configv1alpha1.ProjectConfig) {
defaultSAR := fmt.Sprintf("{\"namespace\": \"%s\", \"resource\": \"pods\", \"verb\": \"get\"}", r.Namespace)
r.Spec.JaegerUI.Authentication.SAR = defaultSAR
}

if r.Spec.JaegerUI.Authentication.Resources != nil {
r.Spec.JaegerUI.Authentication.Resources = &corev1.ResourceRequirements{}
}
}

if r.Spec.JaegerUI.ServicesQueryDuration == nil {
Expand Down
3 changes: 2 additions & 1 deletion internal/manifests/monolithic/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,14 @@ func BuildAll(opts Options) ([]client.Object, error) {
}
manifests = append(manifests, route)
if tempo.Spec.JaegerUI.Authentication.Enabled && !tempo.Spec.Multitenancy.IsGatewayEnabled() {

oauthproxy.PatchStatefulSetForOauthProxy(
tempo.ObjectMeta,
tempo.Spec.JaegerUI.Authentication,
tempo.Spec.Timeout.Duration,
opts.CtrlConfig,
statefulSet,
tempo.Spec.Resources,
tempo.Spec.JaegerUI.Authentication.Resources,
)
oauthproxy.PatchQueryFrontEndService(getJaegerUIService(services, tempo), tempo.Name)
if serviceAccount != nil {
Expand Down

0 comments on commit 890382d

Please sign in to comment.