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

feat: database env set storageName #3491

Merged
merged 1 commit into from
Jul 12, 2023
Merged

feat: database env set storageName #3491

merged 1 commit into from
Jul 12, 2023

Conversation

c121914yu
Copy link
Collaborator

@c121914yu c121914yu commented Jul 12, 2023

🤖 Generated by Copilot at 8ec926c

Summary

🆕🐛🚀

This pull request adds a new feature to the frontend app that allows the user to configure the storage class name for the backup volumes of the database provider. It also fixes a bug in the backup status logic and updates the dev host IP address in the README file. The main changes are in the files _app.tsx, static.ts, json2Yaml.ts, and .env.template.

We are the masters of the backup volumes
We set the storage class name with our own hands
We face the doom of undefined phases
We update the global variables in the static lands

Walkthrough

  • Add a new environment variable STORAGE_CLASSNAME to the frontend app to specify the storage class name for the backup volumes (link)
  • Import and call the function updateStorageClassName from the static store module to update the global variable StorageClassName with the value from the environment variable in the App component (link, link)
  • Add a new parameter env_storage_className to the App component props and pass the value of the environment variable STORAGE_CLASSNAME from the initial props (link, link)
  • Declare a new global variable StorageClassName and a new function updateStorageClassName in the static store module to hold and update the value of the storage class name for the backup volumes (link, link)
  • Import the global variable StorageClassName from the static store module and use it to generate the YAML files for creating clusters with backup volumes in the json2Yaml module (link)
  • Declare a constant storageClassName in the json2CreateCluster function that holds an object with the key storageClassName and the value from the global variable StorageClassName, or an empty object if the global variable is undefined (link)
  • Spread the constant storageClassName into the backup volume spec for each node type (master, worker, tidb, tikv, pd) in the json2CreateCluster function to add the storage class name to the YAML file if it is defined, or leave it unchanged if it is not (link, link, link, link, link)
  • Modify the logic for determining the status of a backup to handle the case when the backup status phase is undefined and set the status to UnKnow instead of throwing an error (link)
  • Update the IP address of the dev host in the README.md file to match the current cluster configuration (link)

@pull-request-size
Copy link

Whoa! Easy there, Partner!

This PR is too big. Please break it up into smaller PRs.

@sealos-ci-robot
Copy link
Member

🤖 Generated by lychee action

Summary

Status Count
🔍 Total 848
✅ Successful 324
⏳ Timeouts 0
🔀 Redirected 0
👻 Excluded 522
❓ Unknown 0
🚫 Errors 1

Errors per input

Errors in deploy/cloud-deprecated/manifests/interfaces/postgres/README.md

Full action output

Full Github Actions output

@zzjin zzjin added this to the v5.0 milestone Jul 12, 2023
@codecov
Copy link

codecov bot commented Jul 12, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (288c4f8) 72.97% compared to head (8ec926c) 72.97%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3491   +/-   ##
=======================================
  Coverage   72.97%   72.97%           
=======================================
  Files           8        8           
  Lines         618      618           
=======================================
  Hits          451      451           
  Misses        132      132           
  Partials       35       35           

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@lingdie lingdie merged commit 20072ad into labring:main Jul 12, 2023
27 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants