From 1e9744260a5328d73c576001996cc74c49694edd Mon Sep 17 00:00:00 2001 From: notfelineit Date: Wed, 5 Apr 2023 10:22:39 -0700 Subject: [PATCH 1/3] Change vars from REACT_APP to VITE" --- pkg/controller/vitesscluster/reconcile_vtadmin.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/controller/vitesscluster/reconcile_vtadmin.go b/pkg/controller/vitesscluster/reconcile_vtadmin.go index 29c14aac..98132861 100644 --- a/pkg/controller/vitesscluster/reconcile_vtadmin.go +++ b/pkg/controller/vitesscluster/reconcile_vtadmin.go @@ -341,12 +341,12 @@ func (r *ReconcileVitessCluster) createWebConfigSecret(ctx context.Context, vt * // Variables to hold the key, value and secret name to use configKey := vtadmin.WebConfigFileName configVal := fmt.Sprintf(`window.env = { - 'REACT_APP_VTADMIN_API_ADDRESS': "%s", - 'REACT_APP_FETCH_CREDENTIALS': "omit", - 'REACT_APP_ENABLE_EXPERIMENTAL_TABLET_DEBUG_VARS': false, - 'REACT_APP_BUGSNAG_API_KEY': "", - 'REACT_APP_DOCUMENT_TITLE': "", - 'REACT_APP_READONLY_MODE': %s, + 'VITE_VTADMIN_API_ADDRESS': "%s", + 'VITE_FETCH_CREDENTIALS': "omit", + 'VITE_ENABLE_EXPERIMENTAL_TABLET_DEBUG_VARS': false, + 'VITE_BUGSNAG_API_KEY': "", + 'VITE_DOCUMENT_TITLE': "", + 'VITE_READONLY_MODE': %s, };`, apiAddress, convertReadOnlyFieldToString(vt.Spec.VtAdmin.ReadOnly)) secretName := vtadmin.WebConfigSecretName(vt.Name, cell.Name) From e888bcf99f7ff466468a2fe983da827d19ddd8c7 Mon Sep 17 00:00:00 2001 From: notfelineit Date: Wed, 5 Apr 2023 10:22:39 -0700 Subject: [PATCH 2/3] Change vars from REACT_APP to VITE" Signed-off-by: Florent Poinsard --- pkg/controller/vitesscluster/reconcile_vtadmin.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/controller/vitesscluster/reconcile_vtadmin.go b/pkg/controller/vitesscluster/reconcile_vtadmin.go index 29c14aac..98132861 100644 --- a/pkg/controller/vitesscluster/reconcile_vtadmin.go +++ b/pkg/controller/vitesscluster/reconcile_vtadmin.go @@ -341,12 +341,12 @@ func (r *ReconcileVitessCluster) createWebConfigSecret(ctx context.Context, vt * // Variables to hold the key, value and secret name to use configKey := vtadmin.WebConfigFileName configVal := fmt.Sprintf(`window.env = { - 'REACT_APP_VTADMIN_API_ADDRESS': "%s", - 'REACT_APP_FETCH_CREDENTIALS': "omit", - 'REACT_APP_ENABLE_EXPERIMENTAL_TABLET_DEBUG_VARS': false, - 'REACT_APP_BUGSNAG_API_KEY': "", - 'REACT_APP_DOCUMENT_TITLE': "", - 'REACT_APP_READONLY_MODE': %s, + 'VITE_VTADMIN_API_ADDRESS': "%s", + 'VITE_FETCH_CREDENTIALS': "omit", + 'VITE_ENABLE_EXPERIMENTAL_TABLET_DEBUG_VARS': false, + 'VITE_BUGSNAG_API_KEY': "", + 'VITE_DOCUMENT_TITLE': "", + 'VITE_READONLY_MODE': %s, };`, apiAddress, convertReadOnlyFieldToString(vt.Spec.VtAdmin.ReadOnly)) secretName := vtadmin.WebConfigSecretName(vt.Name, cell.Name) From 85ae3ba1caeba627789741b2827447efa7356497 Mon Sep 17 00:00:00 2001 From: Frances Thai <31225471+notfelineit@users.noreply.github.com> Date: Thu, 6 Apr 2023 10:29:28 -0700 Subject: [PATCH 3/3] Update pkg/controller/vitesscluster/reconcile_vtadmin.go --- pkg/controller/vitesscluster/reconcile_vtadmin.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/controller/vitesscluster/reconcile_vtadmin.go b/pkg/controller/vitesscluster/reconcile_vtadmin.go index 98132861..a44509ce 100644 --- a/pkg/controller/vitesscluster/reconcile_vtadmin.go +++ b/pkg/controller/vitesscluster/reconcile_vtadmin.go @@ -347,6 +347,12 @@ func (r *ReconcileVitessCluster) createWebConfigSecret(ctx context.Context, vt * 'VITE_BUGSNAG_API_KEY': "", 'VITE_DOCUMENT_TITLE': "", 'VITE_READONLY_MODE': %s, + 'REACT_APP_VTADMIN_API_ADDRESS': "%s", + 'REACT_APP_FETCH_CREDENTIALS': "omit", + 'REACT_APP_ENABLE_EXPERIMENTAL_TABLET_DEBUG_VARS': false, + 'REACT_APP_BUGSNAG_API_KEY': "", + 'REACT_APP_DOCUMENT_TITLE': "", + 'REACT_APP_READONLY_MODE': %s, };`, apiAddress, convertReadOnlyFieldToString(vt.Spec.VtAdmin.ReadOnly)) secretName := vtadmin.WebConfigSecretName(vt.Name, cell.Name)