feat: Website SSL DNS Type support WestCN#8305
Conversation
|
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
| p, err = westcn.NewDNSProviderConfig(westcnConfig) | ||
| } | ||
| if err != nil { | ||
| return err |
There was a problem hiding this comment.
The code appears to be adding support for the West Cloud service provider, including configuring it using new parameters from the param struct. It adds methods to initialize a West Cloud-specific DNS provider with authentication details.
Here's an example of how you might use this function:
// Create a parameter object with necessary credentials and TTL value
params := &DNSParam{
AuthID: "your_auth_id",
SubAuthID: "your_sub_auth_id",
AuthPassword: "your_password",
Username: "westcloud_username", // New field required specifically for West Cloud
}
// Initialize AcmeClient and set DnsType to WestCN
acmeClient.UseDns(WestCN, json.Marshal(params).String(), model.WebsiteSSL)
// Wait for DNS records to propagate (optional)
time.Sleep(runningTime.Duration(time.Second))This setup ensures that your Acme client can handle West Cloud specific requirements effectively after being initialized with proper configuration details.
| if (!account.value.authorization['authID'] && !account.value.authorization['subAuthID']) { | ||
| MsgError('Please input Auth ID or Sub Auth ID'); | ||
| return; | ||
| } |
There was a problem hiding this comment.
The provided code changes look generally consistent with the intended functionality. Here are some observations:
-
New Conditional Formatting for
WestCNType:- A new
<div>block is conditionally rendered whenaccount.typeequals'WestCN'. - This includes two additional form fields:
- One field labeled "Username"
- One field labeled "Password"
- These fields use
v-modelto bind their values toaccount.authorization['username']andaccount.authorization['password'], respectively.
The addition of these fields aligns with adding support for WestCN-specific authentication requirements.
- A new
-
Validation Rules Update (Line 230):
- There's an updated validation rule for
rules.account. Specifically, it added a rule forRules.username, allowing users to enter a username. - This update ensures that all necessary forms meet proper user input validity checks across different account types.
- There's an updated validation rule for
These changes improve the application's flexibility by handling different authentication methods based on customer type (WestCN) while maintaining consistency in data binding and validation logic.
Overall, the changes seem well-planned and should work smoothly without major issues when implemented.
| }, | ||
| ]; | ||
|
|
||
| export const Fields = [ |
There was a problem hiding this comment.
The changes look mostly correct but there are a couple of suggestions for improvement:
-
Spacing Consistency: Ensure consistent spacing around operators and curly braces to improve readability.
-
Comments for New Entries: It's good practice to add comments explaining why you've added new entries if it enhances understanding or maintainability.
Here’s an optimized version with minor adjustments:
@@ -212,6 +212,10 @@
label: i18n.global.t('website.rainyun'),
value: 'RainYun',
},
+// WestCN is another DNS service provider available.
+{
+ label: i18n.global.t('website.westCN'),
+ value: 'WestCN',
+},These changes introduce clearer spacing and a brief comment in case someone reading the code later needs more context on the inclusion of WestCN as a DNS service provider.
|
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: wanghe-fit2cloud The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |



No description provided.