Skip to content

Commit

Permalink
custom name for the sail operator's istio CR
Browse files Browse the repository at this point in the history
  • Loading branch information
eguzki committed Dec 20, 2023
1 parent efa5627 commit 1e67517
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions controllers/kuadrant_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ func (r *KuadrantReconciler) getIstioConfigObjects(ctx context.Context, logger l
} else {
// Error is NoMatchError so check for Istio CR instead
ist := &istiov1alpha1.Istio{}
istKey := client.ObjectKey{Name: istioCRName()}

Check warning on line 335 in controllers/kuadrant_controller.go

View check run for this annotation

Codecov / codecov/patch

controllers/kuadrant_controller.go#L335

Added line #L335 was not covered by tests
if err := r.GetResource(ctx, istKey, ist); err != nil {
logger.V(1).Info("failed to get istio object", "key", istKey, "err", err)
if apimeta.IsNoMatchError(err) {
Expand Down Expand Up @@ -380,6 +381,10 @@ func controlPlaneProviderName() string {
return env.GetString("ISTIOOPERATOR_NAME", "istiocontrolplane")
}

func istioCRName() string {
return env.GetString("ISTIO_NAME", "default")

Check warning on line 385 in controllers/kuadrant_controller.go

View check run for this annotation

Codecov / codecov/patch

controllers/kuadrant_controller.go#L384-L385

Added lines #L384 - L385 were not covered by tests
}

func controlPlaneConfigMapName() string {
return env.GetString("ISTIOCONFIGMAP_NAME", "istio")
}
Expand Down

0 comments on commit 1e67517

Please sign in to comment.