[PR #411] [MERGED] feat: enhance apply logic #944

Closed
opened 2026-03-03 01:06:57 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/certimate-go/certimate/pull/411
Author: @fudiwei
Created: 1/11/2025
Status: Merged
Merged: 1/12/2025
Merged by: @usual2970

Base: nextHead: feat/new-workflow-ui


📝 Commits (6)

  • f99dd4f test: improve example
  • e4e0a24 Merge branch 'next' into feat/new-workflow-ui
  • 8ed2b24 refactor: clean code
  • a0c08e8 feat: separate access providers and dns providers
  • 598d070 feat: extract some configs from access to apply logic
  • d9f38c3 feat(ui): add prompt message during workflow running

📊 Changes

66 files changed (+1013 additions, -522 deletions)

View changed files

📝 go.mod (+1 -0)
📝 go.sum (+2 -0)
📝 internal/applicant/applicant.go (+41 -32)
📝 internal/applicant/providers.go (+62 -62)
📝 internal/deployer/deployer.go (+16 -3)
📝 internal/deployer/providers.go (+107 -108)
📝 internal/domain/access.go (+13 -4)
📝 internal/domain/provider.go (+31 -3)
📝 internal/pkg/core/deployer/providers/aliyun-alb/aliyun_alb_test.go (+1 -1)
📝 internal/pkg/core/deployer/providers/aliyun-cdn/aliyun_cdn_test.go (+1 -1)
📝 internal/pkg/core/deployer/providers/aliyun-clb/aliyun_clb_test.go (+1 -1)
📝 internal/pkg/core/deployer/providers/aliyun-dcdn/aliyun_dcdn_test.go (+1 -1)
📝 internal/pkg/core/deployer/providers/aliyun-nlb/aliyun_nlb_test.go (+1 -1)
📝 internal/pkg/core/deployer/providers/aliyun-oss/aliyun_oss_test.go (+1 -1)
📝 internal/pkg/core/deployer/providers/baiducloud-cdn/baiducloud_cdn_test.go (+1 -1)
📝 internal/pkg/core/deployer/providers/byteplus-cdn/byteplus_cdn_test.go (+1 -1)
📝 internal/pkg/core/deployer/providers/dogecloud-cdn/dogecloud_cdn_test.go (+1 -1)
📝 internal/pkg/core/deployer/providers/huaweicloud-cdn/huaweicloud_cdn_test.go (+1 -1)
📝 internal/pkg/core/deployer/providers/huaweicloud-elb/huaweicloud_elb_test.go (+1 -1)
📝 internal/pkg/core/deployer/providers/k8s-secret/k8s_secret.go (+3 -0)

...and 46 more files

📄 Description

该 PR 包含以下内容变更:

  • feat: 拆分将申请证书时所需的提供商为 ApplyDNSProvider。详见备注 ①
  • feat: 提取原授权信息中部分申请证书时所需的参数到工作流节点配置中。详见备注 ②

【备注】

现有的申请证书时的提供商类型判定直接依赖于 AccessProvider。但实际上部分云服务商旗下会有多个域名管理的云服务(如 AWS 下既有 Route53 又有 Lightsail;火山引擎下既有 DNS 又有 PrivateZone;等等),它们实际共享相同的 Access 授权信息。

虽然目前 certimate 仅实现了这些云服务商的其中一个云服务,并将其视为默认的 DNSProvider。但出于日后扩展考虑,有必要将 Provider 进一步细化,细化的结果为:

  • AccessProvider:(已有)授权提供商。
  • DeployProvider:(已有)部署证书时的主机提供商,其授权信息依赖于 AccessProvider
  • ApplyDNSProvider: (新增)申请证书时的 DNS 提供商,其授权信息依赖于 AccessProvider

现有的授权管理中某些提供商的授权参数,实际是其申请证书阶段所需的业务参数(如 AWS 的 regionhostedZoneId;华为云的 region;等等),这些参数与授权本身无关,放在授权管理页面中容易产生误解或困惑。

因此,有必要将它们从授权管理中独立出来,放到工作流的申请阶段单独填写。


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/certimate-go/certimate/pull/411 **Author:** [@fudiwei](https://github.com/fudiwei) **Created:** 1/11/2025 **Status:** ✅ Merged **Merged:** 1/12/2025 **Merged by:** [@usual2970](https://github.com/usual2970) **Base:** `next` ← **Head:** `feat/new-workflow-ui` --- ### 📝 Commits (6) - [`f99dd4f`](https://github.com/certimate-go/certimate/commit/f99dd4f89a79565b1ed86b7b2b5db583125e4b2a) test: improve example - [`e4e0a24`](https://github.com/certimate-go/certimate/commit/e4e0a24a0629a41ffcd57b4f20a0b51805ec6a0b) Merge branch 'next' into feat/new-workflow-ui - [`8ed2b24`](https://github.com/certimate-go/certimate/commit/8ed2b2475c8923550b1ce41a53d7b266bca90e44) refactor: clean code - [`a0c08e8`](https://github.com/certimate-go/certimate/commit/a0c08e841d299a43b8a34aeedc6c22785cfcbf25) feat: separate access providers and dns providers - [`598d070`](https://github.com/certimate-go/certimate/commit/598d0705fb33d174557cd8ef6914432a3c21b735) feat: extract some configs from access to apply logic - [`d9f38c3`](https://github.com/certimate-go/certimate/commit/d9f38c38a6cc510b580a9e40d3e2a09d98c56b7f) feat(ui): add prompt message during workflow running ### 📊 Changes **66 files changed** (+1013 additions, -522 deletions) <details> <summary>View changed files</summary> 📝 `go.mod` (+1 -0) 📝 `go.sum` (+2 -0) 📝 `internal/applicant/applicant.go` (+41 -32) 📝 `internal/applicant/providers.go` (+62 -62) 📝 `internal/deployer/deployer.go` (+16 -3) 📝 `internal/deployer/providers.go` (+107 -108) 📝 `internal/domain/access.go` (+13 -4) 📝 `internal/domain/provider.go` (+31 -3) 📝 `internal/pkg/core/deployer/providers/aliyun-alb/aliyun_alb_test.go` (+1 -1) 📝 `internal/pkg/core/deployer/providers/aliyun-cdn/aliyun_cdn_test.go` (+1 -1) 📝 `internal/pkg/core/deployer/providers/aliyun-clb/aliyun_clb_test.go` (+1 -1) 📝 `internal/pkg/core/deployer/providers/aliyun-dcdn/aliyun_dcdn_test.go` (+1 -1) 📝 `internal/pkg/core/deployer/providers/aliyun-nlb/aliyun_nlb_test.go` (+1 -1) 📝 `internal/pkg/core/deployer/providers/aliyun-oss/aliyun_oss_test.go` (+1 -1) 📝 `internal/pkg/core/deployer/providers/baiducloud-cdn/baiducloud_cdn_test.go` (+1 -1) 📝 `internal/pkg/core/deployer/providers/byteplus-cdn/byteplus_cdn_test.go` (+1 -1) 📝 `internal/pkg/core/deployer/providers/dogecloud-cdn/dogecloud_cdn_test.go` (+1 -1) 📝 `internal/pkg/core/deployer/providers/huaweicloud-cdn/huaweicloud_cdn_test.go` (+1 -1) 📝 `internal/pkg/core/deployer/providers/huaweicloud-elb/huaweicloud_elb_test.go` (+1 -1) 📝 `internal/pkg/core/deployer/providers/k8s-secret/k8s_secret.go` (+3 -0) _...and 46 more files_ </details> ### 📄 Description 该 PR 包含以下内容变更: - **feat**: 拆分将申请证书时所需的提供商为 `ApplyDNSProvider`。详见备注 ① - **feat**: 提取原授权信息中部分申请证书时所需的参数到工作流节点配置中。详见备注 ② --- ### 【备注】 #### ① 现有的申请证书时的提供商类型判定直接依赖于 `AccessProvider`。但实际上部分云服务商旗下会有多个域名管理的云服务(如 AWS 下既有 Route53 又有 Lightsail;火山引擎下既有 DNS 又有 PrivateZone;等等),它们实际共享相同的 `Access` 授权信息。 虽然目前 certimate 仅实现了这些云服务商的其中一个云服务,并将其视为默认的 DNSProvider。但出于日后扩展考虑,有必要将 Provider 进一步细化,细化的结果为: - `AccessProvider`:(已有)授权提供商。 - `DeployProvider`:(已有)部署证书时的主机提供商,其授权信息依赖于 `AccessProvider`。 - `ApplyDNSProvider`: (新增)申请证书时的 DNS 提供商,其授权信息依赖于 `AccessProvider`。 #### ② 现有的授权管理中某些提供商的授权参数,实际是其申请证书阶段所需的业务参数(如 AWS 的 `region`、`hostedZoneId`;华为云的 `region`;等等),这些参数与授权本身无关,放在授权管理页面中容易产生误解或困惑。 因此,有必要将它们从授权管理中独立出来,放到工作流的申请阶段单独填写。 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 01:06:57 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/certimate#944
No description provided.