Skip to content

Commit

Permalink
Merge branch 'labring:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Wishrem authored Jan 10, 2024
2 parents 043b067 + e45e3b7 commit aa6aa0a
Show file tree
Hide file tree
Showing 211 changed files with 4,290 additions and 2,652 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
strategy:
matrix:
## TODO: add more modules
module: [ database, pay, account ]
module: [database, pay, account, minio]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -181,7 +181,7 @@ jobs:
strategy:
matrix:
## TODO: add more modules
module: [ database, pay, account ]
module: [database, pay, account, minio]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
144 changes: 144 additions & 0 deletions CHANGELOG/CHANGELOG-5.0.0-beta4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
Welcome to the v5.0.0-beta4 release of Sealos!🎉🎉!



## Changelog
### New Features
* dc998b5b2d4d7c8046bfc88fee543e077078aff7: feat(costcenter): pinning table (#4343) (@xudaotutou)
* 7c08451b7461ab4e39f4a42ef4fe846d3acbc56b: feat(desktop): signup api (#4314) (@xudaotutou)
* e84a782111563c803ad07e386245dd47a8373cc9: feat: Replaced mobx with zustand (#4358) (@Wishrem)
* 5330a703060ddfa4211da56b0b56384724cd3f66: feat: accomplished create, update and delete function in Kube Panel (#4300) (@Wishrem)
* 80c948a10bbcc846c42e0f2aa81b9e567762a7bc: feat: add heartbeat for sealos self-host cluster. (#4389) (@lingdie)
* 3eb68232381e705167e7ccdf273eb99db237b9bb: feat: message notification (#4350) (@bxy4543)
* a04ca534543a48f29c9978cc7fb24622472c5de5: feat: release KubePanel v1.0.0 (#4401) (@Wishrem)
* 5c5903031299a2cda106ba800c2c4c68450f872f: feat:app launchpad && template supports api calls (#4322) (@zjy365)
* 33c7084e6d5e6b998700c01969d6c3d01f3a8291: feat:control file migration and template sharing link (#4421) (@zjy365)
* f9f2d61dc114545939457d56ee63859482bc120d: feat:db add database type for migration and external network access (#4317) (@zjy365)
* 552dac8a5ce53df4dd36a4743e4fce9224a1e11a: feat:db add kafka monitor (#4359) (@zjy365)
* d518f580cc6f1a25b8fcbbfad8a057b57aea38dc: feat:db automatic database backup (#4377) (@zjy365)
* b6654c4010a00ddff88a8ed5f8061ecb6405ea56: feat:db delete some databases (#4379) (@zjy365)
* 9bb66ebdfc6fab741cc6eff833df145f37c5eb62: feat:db modify deployment env (#4345) (@zjy365)
* 174f08fb9372c622eaae47870dec1c33134f1599: feat:desktop & applaunchpad novice guide (#4392) (@zjy365)
* bf5379f6d98047eb7b915a6c56c0acc33eb0f3c5: feat:desktop notification (#4371) (@zjy365)
* fc0c3f6f9173614deaa0593f32c5101d0782da65: feat:docs add blog (#4298) (@zjy365)
* 98dbeb49890673e878914c055d3ff1b27945fb17: feat:docs add head meta (#4260) (@zjy365)
* fdbccd6d46c136b1a83cde4b36eddf760ab3c06b: feat:docs add link proxy (#4266) (@zjy365)
* 27b000c83103a2d7d835c8cc5b97ef4a04151a01: feat:docs banner (#4415) (@zjy365)
* ad77db0e9218ec9517334820b853af658edbabb1: feat:docs robots.txt (#4406) (@zjy365)
* 7a8fffa42983334936ff9aa8aa67c13b22da2449: feat:frontend new api call && database file migration (#4332) (@zjy365)
* 94ac016d8bdff38559ed75d4d158791643fcb4c2: feat:implement license id scheme (#4413) (@zjy365)
* 8069caa36bab6b6dcbeced52f73d2895cfc3612c: feat:launchpad jsonpatch & template add filename (#4436) (@zjy365)
* 2255850717bf5b202c490f6d4ccd63cadc0b3520: feat:launchpad support multiple containers (#4380) (@zjy365)
* 675700b3593f667f96b020f9e5f49685b2cb2399: feat:license deploy tutorial & monorepo dependencies (#4274) (@zjy365)
* 7fd40c2480abf8200ca243c44d7da8191efa3a99: feat:license deployment command (#4316) (@zjy365)
### Bug fixes
* 48f9c4b83a05579e9f5e1fadcf4441ff7c165577: bugfix: fix sudo -E '' with an helm cmd has single quotation (#4427) (@daymade)
* f52b1743797c5ce76d97c9efaa2bdfb77ac74903: feat & fix: Event, Ingress and Secret Overview & Errors in using next build (#4374) (@Wishrem)
* 56772da875f21b408d7edcf043daef8a75c97698: fix(objectstorage): regex (#4296) (@xudaotutou)
* 19340f5378b28bf31ed70bd0667a9587abbc7e07: fix(template): laf template (#4351) (@xudaotutou)
* cf3041dc0c1a804bb4b39777910edc19149a6254: fix(template):fix deps, fix styles (#4378) (@xudaotutou)
* fd55bac31490d6f0e87404607a223a51d8da676f: fix: Display of UI and functional integration in Kube Panel (#4365) (@Wishrem)
* a5be5cb7909d0728e18d3d2faf3feaf0c3e7aea4: fix: activator logic. (#4430) (@lingdie)
* 333f05d2aaf2953391fa47a95765065da70e00c8: fix: admission for ingress delete (#4327) (@lingdie)
* 10ec57654023336dc98145e8a5ba07faf114fc80: fix: cloud release ci (#4336) (@lingdie)
* 9c9c9d74f75c371c9a3b2491a9c2c68c4a39261c: fix: desktop rbac for delete request of user. (#4308) (@lingdie)
* cb35d788bdcff0b3558c5ebbc9a8c55b442b85dd: fix: document seo optimization (#4372) (@zjy365)
* c39bd8931dc9414e0221bb14acd8b9a970b55e8a: fix: launchpad rollingupdate (#4285) (@c121914yu)
* 6fc583a87dbc91e54cd23712c4be5383c36001bd: fix: return cors anno as nil if port is 443. (#4356) (@lingdie)
* 2a418813d2fa3bcb644cc209f6315424708feca2: fix: skip vingress when delete ingress. (#4318) (@lingdie)
* 56123b852c7f87b4e7bf54df81f031029d12b594: fix:adapt to desktop open template (#4398) (@zjy365)
* 9466c122041b4c5d6a65bde2a806fcdd53202508: fix:app statefulset & template develop (#4363) (@zjy365)
* d2e6d78b4fcad85a8952237c73249236219f0e96: fix:db service labels (#4344) (@zjy365)
* 18aff5d84a6679b5ecba5a2bbc358e633b9869b2: fix:deploy menuData helpDocs (#4437) (@zjy365)
* 258e565628c27099430df5f4c55424c4b53b7039: fix:desktop usedriver & tempalte yml (#4432) (@zjy365)
* 3c8db86965ca9ee43d504027291b6999190fc52c: fix:docs & delete db role & baidu (#4272) (@zjy365)
* fa3f041cdb7bc92e7ad0fdfcb00f9dc8974ad7ba: fix:docs banner path (#4303) (@zjy365)
* ce5966d7a06d59e21c6d4ef30c75c795e7ec7e8e: fix:docs head meta (#4262) (@zjy365)
* c0492a1e98b8dbb6faa23e3d252892c20ef5d830: fix:docs router path (#4292) (@zjy365)
* 17fe9c2648dd2c9227e3d411434c8a532f7903ca: fix:frontend upload convertdata (#4382) (@zjy365)
* 4c166d3140f00eff8ecc3044768b24088d5c81bc: fix:launchpad issuer and certificates (#4405) (@zjy365)
* b9a7ed74a4b0672139abec44f81f8e39684d84eb: fix:tempalte detail api add cdn (#4428) (@zjy365)
### Other work
* 520c69ded6fb6aacc2423f58fd6bb03be3180942: Add Object Storage (#4333) (@nowinkeyy)
* 72852aa836f3a02003e96f15403e46c97757be65: Add database config docs (#4414) (@wallyxjh)
* 67dd44e0c971df567418db5eeebe7dcaf63898ed: Add post "k8s-multi-tenancy" (#4364) (@yangchuansheng)
* e6a9868cd04b9bb5dd2ab81fe0e6402218a86237: Bump: add sub go works to support bump kubernetes api from v0.25.6 to v0.27.4 or higher. (#4281) (@lingdie)
* e8610d68842c9c9799f9ccac4af519139af4da46: CI: add cloud release ci and use ossutil to upload offline tar package. (#4265) (@lingdie)
* a3efc3a93d1223f0f4083db37c5b201624165d65: Chore: upgrade and fix cloud build logic (#4408) (@lingdie)
* 4efa9d802e426ff282fd2b063860ac9f50ea3d4e: Delete useless code (#4340) (@bxy4543)
* bd68a735b4af26839bc98636a8da166ac8812998: Depre Bytebase and imagehub. (#4273) (@zzjin)
* 30fa9e2e7316946d5b7c96f705f83a5ce5f5b2f7: Depre copilot4prs. (#4418) (@zzjin)
* 60cf98e4049b198e0e73c10e4d09fbf42c828316: Docs: add blog "To run or not to run a database on Kubernetes" (#4385) (@yangchuansheng)
* c3f5bf6bacdbf1987943888f0e09c5823e410002: Docs: add docs for app launchpad (#4411) (@yangchuansheng)
* f1a78a5a2bd48137bb5c5981b4309a234689d3e9: Docs: add environment for building website (#4267) (@yangchuansheng)
* 78543a30dca9bebde3c055946a66f6d4d455c37e: Docs: add post "what is sealos" (#4313) (@yangchuansheng)
* 195165fc7e17f395dfa9e454ad054542dd143229: Docs: add post (#4309) (@yangchuansheng)
* a3412cd822beee24c80b484b11b154f7c4e46fa3: Docs: fix bug for building documentation site (#4310) (@yangchuansheng)
* 999816eea84021cf1167f0f36d5895657ca34d8e: Docs: update Q&A document (#4305) (@yangchuansheng)
* e405276f6ed2a462899e671d9240e0642090cb43: Docs: update README (#4321) (@yangchuansheng)
* 2fed810be6ad4aa9927dcb9ee5677773170f1b56: Docs: update documentation for deploying k8s & sealos (#4367) (@yangchuansheng)
* 88ef18f0124f52add5d86c5393835b087a097239: Docs: update installation (#4261) (@yangchuansheng)
* 4bea4eaf3654e40e68101c4646b3a05d89367592: Feat/cost service (#4391) (@bxy4543)
* 5312580d3f73660accc4121cae93c81330dd5c2a: Feat/gift balance (#4390) (@bxy4543)
* 05e8baf8ab8a40432c7e6c3b75ef3011eb67b81c: Feat/minio cost (#4339) (@bxy4543)
* c9527a7f77ddba8966865838ee5dca000ea6c89c: Fix acme service type. (#4403) (@zzjin)
* 5d8e6706de305db006dbdea2e14ddc6da9a7024a: Fix desktop and use icons from packages instead of public (#4307) (@xudaotutou)
* 2113d17e5ae2f5fec74b2d114495767aefdfcb2e: Fix env for BD_TOKEN (#4268) (@yangchuansheng)
* bfe029c1c22a330835138ef704580954462c58c9: Fix higress annotation. (#4326) (@zzjin)
* 55b4807999e2e03fbc58203a7672635d0dd51666: Fix template deploy ingress temp. (#4234) (@zzjin)
* e82b92f3635edf2584837c8912ead3052f76b61d: Fix vingress (#4319) (@lingdie)
* c4e8187ec073c2c256a2ced74ce03a488bdf5d36: Fix/cloud port (#4271) (@bxy4543)
* 3677c36299d7418fc9c8fff065fc39cfbaf5e1d4: Optimize/remote cmd return error (#4407) (@bxy4543)
* e94d709e718d0651a8c7313a88cfbf784cad9a73: Pref: sealos self-hosting docs. (#4299) (@lingdie)
* edde8600eefc0a23db1a39b9407a13cbe48da797: Update Quick installation of Vue Apps.md (#4434) (@alili)
* 3963a1abf9da541aa5ee2f57137b62cccec3eb22: Update db docs (#4381) (@wallyxjh)
* 9095a2eda2ae8fa87e6e4bd31869f9624230e26f: Update gateway usage (#4264) (@zzjin)
* 881e165d8418d43f57317c0494d56067c961e46b: Update git clone command for template provider. (#4315) (@zzjin)
* 86c2f8fb922eadc7bfedb344015571435b9a817f: Update private cloud link (#4257) (@fanux)
* 40e33e0d956ffed2f4024babbf82bd47061dbe32: add cluster id for license controller. (#4237) (@lingdie)
* ba71f1ded49aab6ff6aaa1f2b0dd8bdaffcffa16: add kafka monitor (#4349) (@wallyxjh)
* b15d62fae53ab392857d661897881872f1a799fc: add suspend os and resume os (#4354) (@nowinkeyy)
* 38ec5da3b7b1b2bbd4f0f4018f1d34f5ab2753e2: change nodeport default price (#4429) (@bxy4543)
* e84c9e39a6a50fb804a0c3d7c510b404f75a0020: chroe: add template cluster image for sealos cloud upgrad. (#4388) (@lingdie)
* 4ef6bb6b934d16f197eea4b795338c9a5140c601: ci: fix sealos cli in cloud release ci. (#4338) (@lingdie)
* bd52c56fe40d045939728faf740523bd7507f059: ci: skip objectstorage ci. (#4329) (@lingdie)
* ac9bd5ec0b2846e0e9ec5c71d1a06a08cf204da8: debt skip license cr. (#4275) (@bxy4543)
* b56174b827cb23b967a492e30380c99aeb0fef68: docs: Automated Changelog Update for v4.4.0-beta3 (#4290) (@sealos-release-robot)
* 94c702ecc3dd7722fe8c0a2f38bda6408d8ead22: docs: add workspace usage doc. (#4368) (@lingdie)
* f21b7c91a46eaee509438fea13662cebf14398eb: docs: upgrade sreg gomod (#4263) (@LZiHaN)
* 0429b0dbdbecb4868952e1cde5b4ab03a5b0396f: docs:support lang env (#4288) (@zjy365)
* 46127eca157b4ae851ce60a500e7a8e6be884c24: feat(frontend/minio): minio provider (#4295) (@xudaotutou)
* a2f3ca09f90f23a9aff5985a208d37a2f8a80bc9: feat. ingress mutate webhook support annotations flags. (#4293) (@lingdie)
* 37709ce8db4ac9db65a241d12d66faee84e54cbe: fix & style: tailwind css conflict and UI problem & clean some codes (#4416) (@Wishrem)
* 6d71ab2e842915ccd0e520f8b75e92270223c724: fix get monitoring result (#4242) (@bxy4543)
* edc5ccb66e8911096a0105874239a500cc413cc0: fix go work (#4289) (@nowinkeyy)
* 7a312773a4a8710abeed3b70a4841cfd1c3873cc: fix license (#4412) (@lingdie)
* 4a67761a440078b762a70e78f888656dd35195d9: fix monitor bug (#4352) (@nowinkeyy)
* e649c51b550a88b81035d06f40b2cf1edc6e81d8: fix monitor object storage (#4362) (@bxy4543)
* 4dedc10ee1f26ca55ff817edc3bc5b398a18335a: fix notification read status (#4369) (@bxy4543)
* 30b47a8bc121a97f358bad18c6c7c1640cf75e4c: fix os endpoint error (#4357) (@nowinkeyy)
* 77fdddcb53abfa1a2c40fa62824a9b3e7c49292f: fix sync error (#4342) (@nowinkeyy)
* 0af9b054f151b6977f71694d8bbc49386a7a4112: fix template readme img src (#4426) (@zjy365)
* d705eb523ca9745db8bd6d8556771299ffce4bfa: fix tmpl cloud port (#4335) (@bxy4543)
* ea37dc9e037ac6b5821ad532ba99fce1b9703819: fix(costcenter: invoice) (#4294) (@xudaotutou)
* 6405d93ee32df974725d969cfefad61301aa1f46: fix(object-storage): switch kc (#4355) (@xudaotutou)
* b6643a466499eaf98c90715876dd1657b98cde60: pref: offline tar support arm64. (#4306) (@lingdie)
* 87a14ea1ab44a21d5fd7a9c2b727d3f31560a1fa: pref: sealos self-hosting qa docs. (#4302) (@lingdie)
* c6c1b58b0f2eef2ad95c5a52a415a99a535130c4: refactor(costcenter): refactor bonus (#4384) (@xudaotutou)
* 5893b55b11a8cf71851e0fcdab9ef150a64d5664: refactor(main): upgrade api v1.27.4 support v1.28+ (#4394) (@cuisongliu)
* f2fef17fce042f3f8c34bd004c5f05c197538ab5: remove switch language annotation (#4393) (@zjy365)
* d82232340fc333ce22a4864834a9aac24fd78c7b: style: rename the plugin from Monitor to Kube Panel and update UI style (#4269) (@Wishrem)
* 160b7a2567a13e333f78789f9aa5aba6b840c9a6: styles(desktop): update desktop worksapce (#4328) (@xudaotutou)
* f72c2954629e395e3fb6277b0066bfedb0addb6a: typo: fix secret name in qa. (#4353) (@lingdie)
* 5718956efc3bc615c7156af9df4ddbe2bf6ef024: update dbprovider docs (#4325) (@wallyxjh)
* 9b2fc94952680adc1f2b8c21406f50d48129485b: update kafka monitor (#4361) (@wallyxjh)
* ce57c323eb675379ea1f7008e187cfb27b6bfe55: update rbac and fix minio user not exist error (#4366) (@nowinkeyy)
* 6d8e1f5128b5e3c20fbda78a0e8f9d5a169571dc: 🤖 add release changelog using rebot. (#4256) (@sealos-release-robot)

**Full Changelog**: https://github.com/labring/sealos/compare/v5.0.0-beta3...v5.0.0-beta4

See [the CHANGELOG](https://github.com/labring/sealos/blob/main/CHANGELOG/CHANGELOG.md) for more details.

Your patronage towards Sealos is greatly appreciated 🎉🎉.

If you encounter any problems during its usage, please create an issue in the [GitHub repository](https://github.com/labring/sealos), we're committed to resolving your problem as soon as possible.
1 change: 1 addition & 0 deletions CHANGELOG/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

All notable changes to this project will be documented in this file.

- [CHANGELOG-5.0.0-beta4.md](./CHANGELOG-5.0.0-beta4.md)
- [CHANGELOG-5.0.0-beta3.md](./CHANGELOG-5.0.0-beta3.md)
- [CHANGELOG-5.0.0-beta2.md](./CHANGELOG-5.0.0-beta2.md)
- [CHANGELOG-5.0.0-beta1.md](./CHANGELOG-5.0.0-beta1.md)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ A Cloud Operating System designed for managing cloud-native applications
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Flabring%2Fsealos.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Flabring%2Fsealos?ref=badge_shield)
[![codecov](https://codecov.io/gh/labring/sealos/branch/main/graph/badge.svg?token=e41ZDcj06N)](https://codecov.io/gh/labring/sealos)
[![Website](https://img.shields.io/website?url=https%3A%2F%2Fpostwoman.io&logo=Postwoman)](https://sealos.io)
[![OSCS Status](https://www.oscs1024.com/platform/badge/labring/sealos.svg?size=small)](https://www.oscs1024.com/project/labring/sealos?ref=badge_small)
[![OSCS Status](https://www.oscs1024.com/platform/badge/labring/sealos.svg?size=small)](https://www.oscs1024.com/repo/labring/sealos?ref=badge_small)

<br />

Expand Down
2 changes: 1 addition & 1 deletion README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Flabring%2Fsealos.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Flabring%2Fsealos?ref=badge_shield)
[![codecov](https://codecov.io/gh/labring/sealos/branch/main/graph/badge.svg?token=e41ZDcj06N)](https://codecov.io/gh/labring/sealos)
[![Website](https://img.shields.io/website?url=https%3A%2F%2Fpostwoman.io&logo=Postwoman)](https://sealos.run)
[![OSCS Status](https://www.oscs1024.com/platform/badge/labring/sealos.svg?size=small)](https://www.oscs1024.com/project/labring/sealos?ref=badge_small)
[![OSCS Status](https://www.oscs1024.com/platform/badge/labring/sealos.svg?size=small)](https://www.oscs1024.com/repo/labring/sealos?ref=badge_small)

<br />

Expand Down
34 changes: 21 additions & 13 deletions controllers/account/controllers/account_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
"strings"
"time"

corev1 "k8s.io/api/core/v1"
"k8s.io/client-go/rest"

"k8s.io/client-go/kubernetes"
Expand Down Expand Up @@ -214,6 +215,9 @@ func (r *AccountReconciler) syncAccount(ctx context.Context, owner, accountNames
if err := r.syncResourceQuotaAndLimitRange(ctx, userNamespace); err != nil {
r.Logger.Error(err, "sync resource resourceQuota and limitRange failed")
}
if err := r.adaptEphemeralStorageLimitRange(ctx, userNamespace); err != nil {
r.Logger.Error(err, "adapt ephemeral storage limitRange failed")
}
account := accountv1.Account{
ObjectMeta: metav1.ObjectMeta{
Name: owner,
Expand Down Expand Up @@ -298,18 +302,22 @@ func (r *AccountReconciler) syncResourceQuotaAndLimitRange(ctx context.Context,
return nil
}

//func (r *AccountReconciler) adaptNodePortCountQuota(ctx context.Context, nsName string) error {
// quota := resources.GetDefaultResourceQuota(nsName, ResourceQuotaPrefix+nsName)
// return retry.Retry(10, 1*time.Second, func() error {
// _, err := controllerutil.CreateOrUpdate(ctx, r.Client, quota, func() error {
// if _, ok := quota.Spec.Hard[corev1.ResourceServicesNodePorts]; !ok {
// quota.Spec.Hard[corev1.ResourceServicesNodePorts] = resource.MustParse(env.GetEnvWithDefault(resources.QuotaLimitsNodePorts, resources.DefaultQuotaLimitsNodePorts))
// }
// return nil
// })
// return err
// })
//}
func (r *AccountReconciler) adaptEphemeralStorageLimitRange(ctx context.Context, nsName string) error {
limit := resources.GetDefaultLimitRange(nsName, nsName)
return retry.Retry(10, 1*time.Second, func() error {
_, err := controllerutil.CreateOrUpdate(ctx, r.Client, limit, func() error {
if len(limit.Spec.Limits) == 0 {
limit = resources.GetDefaultLimitRange(nsName, nsName)
}
limit.Spec.Limits[0].DefaultRequest[corev1.ResourceEphemeralStorage] = resources.LimitRangeDefault[corev1.ResourceEphemeralStorage]
limit.Spec.Limits[0].Default[corev1.ResourceEphemeralStorage] = resources.LimitRangeDefault[corev1.ResourceEphemeralStorage]
//if _, ok := limit.Spec.Limits[0].Default[corev1.ResourceEphemeralStorage]; !ok {
//}
return nil
})
return err
})
}

func (r *AccountReconciler) syncRoleAndRoleBinding(ctx context.Context, name, namespace string) error {
role := rbacv1.Role{
Expand Down Expand Up @@ -568,5 +576,5 @@ func getAmountWithDiscount(amount int64, discount pkgtypes.RechargeDiscount) int
break
}
}
return int64(math.Ceil(float64(amount)*r)) + amount
return int64(math.Ceil(float64(amount)*r/100)) + amount
}
18 changes: 11 additions & 7 deletions controllers/pkg/resources/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,8 @@ var DefaultPropertyTypeList = []PropertyType{
Name: "services.nodeports",
Enum: 4,
PriceType: AVG,
UnitPrice: 10,
ViewPrice: 10000,
UnitPrice: 2.083,
ViewPrice: 2083,
UnitString: "1",
},
}
Expand Down Expand Up @@ -487,15 +487,19 @@ func DefaultResourceQuotaHard() corev1.ResourceList {
func DefaultLimitRangeLimits() []corev1.LimitRangeItem {
return []corev1.LimitRangeItem{
{
Type: corev1.LimitTypeContainer,
Default: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse("50m"),
corev1.ResourceMemory: resource.MustParse("64Mi"),
},
Type: corev1.LimitTypeContainer,
Default: LimitRangeDefault,
DefaultRequest: LimitRangeDefault,
},
}
}

var LimitRangeDefault = corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse("50m"),
corev1.ResourceMemory: resource.MustParse("64Mi"),
corev1.ResourceEphemeralStorage: resource.MustParse("100Mi"),
}

//
//// MiB
//func GetInfraCPUQuantity(flavor string, count int) *resource.Quantity {
Expand Down
5 changes: 0 additions & 5 deletions deploy/cloud/manifests/tls-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ data:
<tls-key-placeholder>
kind: Secret
metadata:
annotations:
reflector.v1.k8s.emberstack.com/reflection-allowed: "true"
reflector.v1.k8s.emberstack.com/reflection-allowed-namespaces: sealos,\w+-system,\w+-frontend,ns-[\-a-z0-9]*
reflector.v1.k8s.emberstack.com/reflection-auto-enabled: "true"
reflector.v1.k8s.emberstack.com/reflection-auto-namespaces: sealos,\w+-system,\w+-frontend,ns-[\-a-z0-9]*
name: wildcard-cert
namespace: sealos-system
type: kubernetes.io/tls
Loading

0 comments on commit aa6aa0a

Please sign in to comment.