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: add azure-director #5974

Merged
merged 30 commits into from
Jul 18, 2023
Merged

feat: add azure-director #5974

merged 30 commits into from
Jul 18, 2023

Conversation

dspo
Copy link
Contributor

@dspo dspo commented Jul 6, 2023

What this PR does / why we need it:

feat: add azure-director

  • 增加插件 azure-director
  • 增加 credentials: api-key 分发功能, 及其 admin 接口, 以及基于 api-key 的认证
  • 根据 api-key 和 request header 决定 direct 的实例, 而不仅仅是 route.Router 配置 (route.Router 支持暂时下掉了, 毕竟我们不是要做一个完备的反向代理中间件或网关)

Which issue(s) this PR fixes:

  • Fixes #your-issue_number
  • [Erda Cloud Issue Link](paste your link here)

Specified Reviewers:

/assign @your-reviewer

ChangeLog

Language Changelog
🇺🇸 English feat: add azure-director
🇨🇳 中文 增加 azure-director 插件

Need cherry-pick to release versions?

Add comment like /cherry-pick release/1.0 when this PR is merged.

For details on the cherry pick process, see the cherry pick requests section under CONTRIBUTING.md.

@dspo dspo requested a review from sfwn July 6, 2023 07:38
api/proto/proto_fetcher.sh Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jul 6, 2023

Codecov Report

Merging #5974 (ba325cf) into master (3dc8924) will increase coverage by 0.03%.
The diff coverage is 59.79%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5974      +/-   ##
==========================================
+ Coverage   22.18%   22.21%   +0.03%     
==========================================
  Files        1880     1880              
  Lines      208425   208490      +65     
==========================================
+ Hits        46231    46322      +91     
+ Misses     156903   156875      -28     
- Partials     5291     5293       +2     
Impacted Files Coverage Δ
pkg/reverseproxy/director.go 0.00% <0.00%> (ø)
internal/pkg/ai-proxy/route/route.go 50.87% <65.90%> (+24.40%) ⬆️

... and 18 files with indirect coverage changes

@dspo dspo changed the title feat: add key-auth feat: add azure-director Jul 13, 2023
`enabled` BOOLEAN NOT NULL DEFAULT true COMMENT '是否启用该凭证',
`expired_at` DATETIME NOT NULL DEFAULT '2099-01-01 00:00:00' COMMENT '凭证过期时间',

`provider_name` VARCHAR(64) NOT NULL DEFAULT '' COMMENT 'AI 服务 Provider 名称',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enlarge field size

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add examples in comment


rpc DeleteProvider(Provider) returns (common.VoidResponse) {
option(google.api.http) = {
delete: "/api/ai-proxy/providers/{name}/{instanceId}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/api/ai-proxy/providers/{name}/instances/{instanceId}

api/proto/proto_fetcher.sh Outdated Show resolved Hide resolved
cmd/ai-proxy/conf/providers.yml Show resolved Hide resolved
metadata:
RESOURCE_NAME: "terminus3"
DEVELOPMENT_NAME: "gpt-35-turbo-0301"

- name: azure
instanceId: terminus2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instanceId should be composed with resource_name & deployment_name

cmd/ai-proxy/conf/providers.yml Outdated Show resolved Hide resolved
@dspo dspo requested a review from sfwn July 17, 2023 01:36
Copy link
Contributor

@sixther-dc sixther-dc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

Copy link
Contributor

@sixther-dc sixther-dc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@dspo dspo requested review from sfwn and removed request for sfwn July 17, 2023 03:21
@sfwn
Copy link
Member

sfwn commented Jul 18, 2023

/approve

@erda-bot erda-bot merged commit 896cf97 into erda-project:master Jul 18, 2023
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants