Skip to content

Commit a7df5ba

Browse files
committed
PANDARIA: Update CreateCCEHostedCluster
1 parent a31d89e commit a7df5ba

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

extensions/clusters/cce/cce_cluster_config.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package cce
22

33
import (
44
management "github.com/rancher/shepherd/clients/rancher/generated/management/v3"
5-
"github.com/rancher/shepherd/pkg/config"
65
)
76

87
const (
@@ -134,10 +133,7 @@ func nodePoolsConstructor(nodePoolsConfig []NodePool) []management.CCENodePool {
134133
return nodePools
135134
}
136135

137-
func HostClusterConfig(name, cloudCredentialID string) *management.CCEClusterConfigSpec {
138-
var cceClusterConfig ClusterConfig
139-
config.LoadConfig(CCEClusterConfigConfigurationFileKey, &cceClusterConfig)
140-
136+
func HostClusterConfig(name, cloudCredentialID string, cceClusterConfig ClusterConfig) *management.CCEClusterConfigSpec {
141137
return &management.CCEClusterConfigSpec{
142138
Authentication: &management.CCEAuthentication{
143139
AuthenticatingProxy: &management.CCEAuthenticatingProxy{

extensions/clusters/cce/create.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ import (
2424
)
2525

2626
// CreateCCEHostedCluster is a helper function that creates an CCE hosted cluster
27-
func CreateCCEHostedCluster(client *rancher.Client, displayName, cloudCredentialID string, enableClusterAlerting, enableClusterMonitoring, enableNetworkPolicy, windowsPreferedCluster bool, labels map[string]string) (*management.Cluster, error) {
28-
cceHostCluster := HostClusterConfig(displayName, cloudCredentialID)
27+
func CreateCCEHostedCluster(client *rancher.Client, displayName, cloudCredentialID string, clusterConfig ClusterConfig, enableClusterAlerting, enableClusterMonitoring, enableNetworkPolicy, windowsPreferedCluster bool, labels map[string]string) (*management.Cluster, error) {
28+
cceHostCluster := HostClusterConfig(displayName, cloudCredentialID, clusterConfig)
2929
cluster := &management.Cluster{
3030
DockerRootDir: "/var/lib/docker",
3131
CCEConfig: cceHostCluster,

0 commit comments

Comments
 (0)