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

workspace quota for project #2283

Merged
merged 55 commits into from
Oct 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
7cf9991
feature: add workspace quota for project model
dspo Oct 9, 2021
7736c66
feature: add model ps_group_projects_quota
dspo Oct 12, 2021
1cc68eb
feature: add orm s_pod_info
dspo Oct 12, 2021
c183e3a
feature: add fetch resource proto
dspo Oct 12, 2021
d04a3ec
feature: fetch resource
dspo Oct 12, 2021
c0bf08d
feature: Preliminary completion of the interface for querying cluster…
dspo Oct 13, 2021
1987100
feature: create project api on core-service side
dspo Oct 13, 2021
e005738
feature: update the api for updating project
dspo Oct 13, 2021
cfef01d
feature: update the api for updating project
dspo Oct 13, 2021
6ef35a9
feature: project details
dspo Oct 14, 2021
bfd3152
feature: delete project
dspo Oct 14, 2021
e92593e
feature: project detail tips
dspo Oct 14, 2021
aa67ffa
feature: add PrepareCheckProjectResource todo comment
dspo Oct 14, 2021
8da7d63
feature: config cmp grpc client
dspo Oct 14, 2021
48572df
feature: add quota migration
dspo Oct 15, 2021
8735183
feature:fix client addredd
dspo Oct 15, 2021
e726777
feature: fix client address config yaml
dspo Oct 15, 2021
b72692c
fix:core-service config
dspo Oct 15, 2021
0617f25
feature: fix core-service config yaml
dspo Oct 15, 2021
c8ec1f3
feature: fix grpc-client config
dspo Oct 15, 2021
ef16e60
feature: block false
dspo Oct 15, 2021
0d7e6d2
feature: rename resourceConfig
dspo Oct 15, 2021
886f4ff
feature: block false
dspo Oct 15, 2021
1d14308
feature: update proto
dspo Oct 15, 2021
06c83b7
feature: update proto
dspo Oct 15, 2021
a1f8e9d
feature: udpate with proto
dspo Oct 15, 2021
af870ab
fix: modify cluster resource and namespace resource response
CraigMChen Oct 15, 2021
16984c0
fix: typo
dspo Oct 15, 2021
81fa791
fix: typo
dspo Oct 15, 2021
a0bdc13
feature: add log
dspo Oct 15, 2021
0935893
fix: typo
dspo Oct 18, 2021
5c0286c
feature: unit transfered
dspo Oct 18, 2021
69c1b86
fix: json tag
dspo Oct 18, 2021
da6c7bc
feature: add logs
dspo Oct 18, 2021
90836f3
fix: license
dspo Oct 18, 2021
07391be
fix: NaN in json
dspo Oct 18, 2021
549898e
fature: fmt
dspo Oct 18, 2021
6d315c0
fix: query condition
dspo Oct 18, 2021
585ede2
feature: add log
dspo Oct 18, 2021
55b3056
rm .erda/migrations/core-services/20211014-project-quota.py
dspo Oct 18, 2021
17d5972
feature: add ut
dspo Oct 18, 2021
45886b1
feat: check quota
CraigMChen Oct 15, 2021
738fbca
add get all namespaces
CraigMChen Oct 15, 2021
a174553
add get workspace quota
CraigMChen Oct 18, 2021
a1f0c24
modify quota unit
CraigMChen Oct 18, 2021
a6b7704
remove resource precheck in orchestrator
CraigMChen Oct 18, 2021
1146c93
feature: dedup cluster names
dspo Oct 18, 2021
9e92aa8
fix: license
dspo Oct 18, 2021
4c2a4a5
feature: change quota algorithm
dspo Oct 18, 2021
b32e962
feature: add ut
dspo Oct 18, 2021
4ff9e5b
add log
CraigMChen Oct 18, 2021
d3fad48
fix: GetWorkspaceQuota url path
CraigMChen Oct 18, 2021
857472b
modify apistruct
CraigMChen Oct 18, 2021
5d177ef
get runtimeID by instanceID for addon
CraigMChen Oct 18, 2021
023452a
fix: chinese in error info
dspo Oct 18, 2021
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
34 changes: 34 additions & 0 deletions .erda/migrations/core-services/20211009-project-quota.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
CREATE TABLE `ps_group_projects_quota`
(
`id` BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY COMMENT 'Primary Key',
`created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'created time',
`updated_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
ON UPDATE CURRENT_TIMESTAMP COMMENT 'updated time',

`project_id` BIGINT(20) NOT NULL DEFAULT 0 COMMENT 'ps_group_projects 主键',
`project_name` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '项目名称',

`prod_cluster_name` VARCHAR(191) NOT NULL DEFAULT '' COMMENT '生产环境对应的集群标识',
`staging_cluster_name` VARCHAR(191) NOT NULL DEFAULT '' COMMENT '预发环境对应的集群标识',
`test_cluster_name` VARCHAR(191) NOT NULL DEFAULT '' COMMENT '测试环境对应的集群标识',
`dev_cluster_name` VARCHAR(191) NOT NULL DEFAULT '' COMMENT '开发环境对应的集群标识',

`prod_cpu_quota` BIGINT NOT NULL DEFAULT 0.0 COMMENT '生产环境 CPU 配额',
`prod_mem_quota` BIGINT NOT NULL DEFAULT 0.0 COMMENT '生产环境 Mem 配额',
`staging_cpu_quota` BIGINT NOT NULL DEFAULT 0.0 COMMENT '预发环境 CPU 配额',
`staging_mem_quota` BIGINT NOT NULL DEFAULT 0.0 COMMENT '预发环境 Mem 配额',
`test_cpu_quota` BIGINT NOT NULL DEFAULT 0.0 COMMENT '测试环境 CPU 配额',
`test_mem_quota` BIGINT NOT NULL DEFAULT 0.0 COMMENT '测试环境 Mem 配额',
`dev_cpu_quota` BIGINT NOT NULL DEFAULT 0.0 COMMENT '开发环境 CPU 配额',
`dev_mem_quota` BIGINT NOT NULL DEFAULT 0.0 COMMENT '开发环境 Mem 配额',

`creator_id` BIGINT NOT NULL DEFAULT 0 COMMENT '',
`updater_id` BIGINT NOT NULL DEFAULT 0 COMMENT '',

INDEX idx_project_id (`project_id`),
INDEX idx_prod_cluster_name (`prod_cluster_name`),
INDEX idx_staging_cluster_name (`staging_cluster_name`),
INDEX idx_test_cluster_name (`test_cluster_name`),
INDEX idx_dev_cluster_name (`dev_cluster_name`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 COMMENT ='项目各环境 quota 表';
4 changes: 4 additions & 0 deletions .erda/migrations/core-services/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Django==3.2.4
mysqlclient==2.0.3
pytz==2021.1
sqlparse==0.4.1
46 changes: 46 additions & 0 deletions api/proto-go/cmp/dashboard/client/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

93 changes: 93 additions & 0 deletions api/proto-go/cmp/dashboard/client/provider.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

208 changes: 208 additions & 0 deletions api/proto-go/cmp/dashboard/pb/dashboard.form.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading