Skip to content

Commit

Permalink
Get telemetry CR before trying to read from it
Browse files Browse the repository at this point in the history
  • Loading branch information
vyzigold committed Mar 15, 2024
1 parent 06580bd commit 592a8ae
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/openstack/telemetry.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ func ReconcileTelemetry(ctx context.Context, instance *corev1beta1.OpenStackCont
return ctrl.Result{}, nil
}

if err := helper.GetClient().Get(ctx, types.NamespacedName{Name: "telemetry", Namespace: instance.Namespace}, telemetry); err != nil {
if !k8s_errors.IsNotFound(err) {
return ctrl.Result{}, err
}
}

// add selector to service overrides
for _, endpointType := range []service.Endpoint{service.EndpointPublic, service.EndpointInternal} {
if instance.Spec.Telemetry.Template.Autoscaling.Aodh.Override.Service == nil {
Expand Down

0 comments on commit 592a8ae

Please sign in to comment.