feat: new deployment provider: proxmoxve

This commit is contained in:
Fu Diwei
2025-05-09 20:53:25 +08:00
parent 26359b9d16
commit f63ee41405
27 changed files with 465 additions and 51 deletions

View File

@@ -52,6 +52,7 @@ import (
pJDCloudVOD "github.com/usual2970/certimate/internal/pkg/core/deployer/providers/jdcloud-vod"
pK8sSecret "github.com/usual2970/certimate/internal/pkg/core/deployer/providers/k8s-secret"
pLocal "github.com/usual2970/certimate/internal/pkg/core/deployer/providers/local"
pProxmoxVE "github.com/usual2970/certimate/internal/pkg/core/deployer/providers/proxmoxve"
pQiniuCDN "github.com/usual2970/certimate/internal/pkg/core/deployer/providers/qiniu-cdn"
pQiniuPili "github.com/usual2970/certimate/internal/pkg/core/deployer/providers/qiniu-pili"
pRainYunRCDN "github.com/usual2970/certimate/internal/pkg/core/deployer/providers/rainyun-rcdn"
@@ -723,6 +724,24 @@ func createDeployerProvider(options *deployerProviderOptions) (deployer.Deployer
return deployer, err
}
case domain.DeploymentProviderTypeProxmoxVE:
{
access := domain.AccessConfigForProxmoxVE{}
if err := maputil.Populate(options.ProviderAccessConfig, &access); err != nil {
return nil, fmt.Errorf("failed to populate provider access config: %w", err)
}
deployer, err := pProxmoxVE.NewDeployer(&pProxmoxVE.DeployerConfig{
ApiUrl: access.ApiUrl,
ApiToken: access.ApiToken,
ApiTokenSecret: access.ApiTokenSecret,
AllowInsecureConnections: access.AllowInsecureConnections,
NodeName: maputil.GetString(options.ProviderExtendedConfig, "nodeName"),
AutoRestart: maputil.GetBool(options.ProviderExtendedConfig, "autoRestart"),
})
return deployer, err
}
case domain.DeploymentProviderTypeQiniuCDN, domain.DeploymentProviderTypeQiniuKodo, domain.DeploymentProviderTypeQiniuPili:
{
access := domain.AccessConfigForQiniu{}