Skip to content

Commit bb80c4c

Browse files
author
Harrison Katz
committed
Compare binding name too
1 parent fe9e5bf commit bb80c4c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

internal/controller/ngrok/kubernetesoperator_controller.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,13 @@ func (r *KubernetesOperatorReconciler) findExisting(ctx context.Context, ko *ngr
305305
continue
306306
}
307307

308+
// bindings are enabled, check that the binding name matches
309+
if slices.Contains(item.EnabledFeatures, featureMap[ngrokv1alpha1.KubernetesOperatorFeatureBindings]) {
310+
if item.Binding.Name != ko.Spec.Binding.Name {
311+
continue // possibly the same k8sop, but not the same binding
312+
}
313+
}
314+
308315
// In case the KubernetesOperator already exists in the ngrok API, check if it's the namespace
309316
// UID is the same as the one we are trying to create. If it is, use the existing one since we
310317
// get conflicts if we try to create a new one.

0 commit comments

Comments
 (0)