Skip to content

Commit

Permalink
Change forces control to Kuadrant.
Browse files Browse the repository at this point in the history
If the use sets any value for authorino in the Kuadrant CR all fields that can be managed are managed. This still does allow the user to set fields in the authorino CR that are out of scope of the Kuadrant CR.
  • Loading branch information
Boomatang committed Jun 5, 2024
1 parent 92299e4 commit e540b07
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions controllers/kuadrant_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -499,24 +499,36 @@ func (r *KuadrantReconciler) reconcileAuthorino(ctx context.Context, kObj *kuadr
}

if kObj.Spec.Authorino != nil {
authorino.Spec.EvaluatorCacheSize = nil
if kObj.Spec.Authorino.EvaluatorCacheSize != nil {
authorino.Spec.EvaluatorCacheSize = kObj.Spec.Authorino.EvaluatorCacheSize
}
authorino.Spec.Metrics = authorinov1beta1.Metrics{}
if kObj.Spec.Authorino.Metrics != nil {
authorino.Spec.Metrics = *kObj.Spec.Authorino.Metrics
}

authorino.Spec.Replicas = nil
if kObj.Spec.Authorino.Replicas != nil {
authorino.Spec.Replicas = kObj.Spec.Authorino.Replicas
}

authorino.Spec.Tracing = authorinov1beta1.Tracing{}
if kObj.Spec.Authorino.Tracing != nil {
authorino.Spec.Tracing = *kObj.Spec.Authorino.Tracing
}

authorino.Spec.OIDCServer = authorinov1beta1.OIDCServer{}
if kObj.Spec.Authorino.OIDCServer != nil {
authorino.Spec.OIDCServer = *kObj.Spec.Authorino.OIDCServer
}

authorino.Spec.Listener = authorinov1beta1.Listener{}
if kObj.Spec.Authorino.Listener != nil {
authorino.Spec.Listener = kuadranttools.MapListenerSpec(&authorino.Spec.Listener, *kObj.Spec.Authorino.Listener)
}

authorino.Spec.Volumes = authorinov1beta1.VolumesSpec{}
if kObj.Spec.Authorino.Volumes != nil {
authorino.Spec.Volumes = *kObj.Spec.Authorino.Volumes
}
Expand Down

0 comments on commit e540b07

Please sign in to comment.