func()

in appconfigmgrv2/controllers/istio_instances.go [36:55]


func (r *AppEnvConfigTemplateV2Reconciler) reconcileIstioInstances(
	ctx context.Context,
	in *appconfig.AppEnvConfigTemplateV2,
) error {
	appLabelInst, err := istioAppLabelInstance(in)
	if err != nil {
		return fmt.Errorf("building: %v", err)
	}
	if err := controllerutil.SetControllerReference(in, appLabelInst, r.Scheme); err != nil {
		return err
	}

	gvr := istioInstanceGVR()

	if err := r.upsertUnstructured(ctx, appLabelInst, gvr, true); err != nil {
		return fmt.Errorf("reconciling app label instance: %v", err)
	}

	return nil
}