Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VTAdmin] Change vars from REACT_APP to VITE #404

Merged
merged 4 commits into from
Apr 10, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions pkg/controller/vitesscluster/reconcile_vtadmin.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Copy link
Collaborator

@GuptaManan100 GuptaManan100 Apr 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably keep the old env variables for one release to ensure backward compatibility.
We can drop these after 2.10 release

'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,
notfelineit marked this conversation as resolved.
Show resolved Hide resolved
};`, apiAddress, convertReadOnlyFieldToString(vt.Spec.VtAdmin.ReadOnly))
secretName := vtadmin.WebConfigSecretName(vt.Name, cell.Name)

Expand Down