Skip to content

Commit

Permalink
Merge pull request #404 from planetscale/frances/update-vtadmin-vite
Browse files Browse the repository at this point in the history
[VTAdmin] Change vars from REACT_APP to VITE
  • Loading branch information
notfelineit authored Apr 10, 2023
2 parents 224327f + ba42ca9 commit ddec3bd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/controller/vitesscluster/reconcile_vtadmin.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,13 +341,19 @@ 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 = {
'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,
'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))
};`, apiAddress, convertReadOnlyFieldToString(vt.Spec.VtAdmin.ReadOnly), apiAddress, convertReadOnlyFieldToString(vt.Spec.VtAdmin.ReadOnly))
secretName := vtadmin.WebConfigSecretName(vt.Name, cell.Name)

// Create or update the secret
Expand Down

0 comments on commit ddec3bd

Please sign in to comment.