Skip to content

Commit

Permalink
test: rtes (#2120)
Browse files Browse the repository at this point in the history
Signed-off-by: 张启航 <[email protected]>
  • Loading branch information
ZhangSetSail authored Jan 9, 2025
1 parent 19d035f commit 5ad6765
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion db/mysql/dao/over_score.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (t *OverScoreDaoImpl) GetOverScoreRate() (*model.EnterpriseOverScore, error
if err == gorm.ErrRecordNotFound {
// Create default record with rate 1
overScore = model.EnterpriseOverScore{
OverScoreRate: "1",
OverScoreRate: "{\"CPU\":1,\"MEMORY\":1}",
}
if err := t.DB.Create(&overScore).Error; err != nil {
return nil, err
Expand Down
12 changes: 12 additions & 0 deletions worker/appm/volume/volcengine.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,21 @@ type VolcengineVolume struct {
func (v *VolcengineVolume) CreateVolume(define *Define) error {
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
<<<<<<< HEAD
sc, err := k8s.Default().Clientset.StorageV1().StorageClasses().Get(ctx, v.as.K8sComponentName, metav1.GetOptions{})
=======
sc, err := k8s.Default().Clientset.StorageV1().StorageClasses().Get(ctx, define.as.K8sComponentName, metav1.GetOptions{})
>>>>>>> 19d035f8c6ea4bbbb88571c8e156db6f2a9ab732
if err != nil {
if k8serror.IsNotFound(err) {
fileDomain, err := filepersistence.Default().FilePersistenceCli.CreateFileSystem(
ctx,
&filepersistence.CreateFileSystemOptions{
<<<<<<< HEAD
Name: v.as.K8sComponentName,
=======
Name: define.as.K8sComponentName,
>>>>>>> 19d035f8c6ea4bbbb88571c8e156db6f2a9ab732
ProtocolType: "NFS",
StorageType: "Standard",
Size: 100 * 1024 * 1024 * 1024,
Expand All @@ -47,7 +55,11 @@ func (v *VolcengineVolume) CreateVolume(define *Define) error {
volumeBindingMode := storagev1.VolumeBindingImmediate
sc = &storagev1.StorageClass{
ObjectMeta: metav1.ObjectMeta{
<<<<<<< HEAD
Name: v.as.K8sComponentName,
=======
Name: define.as.K8sComponentName,
>>>>>>> 19d035f8c6ea4bbbb88571c8e156db6f2a9ab732
},
Provisioner: "nas.csi.volcengine.com",
Parameters: map[string]string{
Expand Down

0 comments on commit 5ad6765

Please sign in to comment.