Cluster Service Initiation
Provider Service Calls/Initiates the Cluster Service
cluster, err := cluster.NewService(ctx, session, bus, cclient, ipOperatorClient, waiter, clusterConfig)
if err != nil {
cancel()
<-bc.lc.Done()
return nil, err
}
The parameters for cluster.NewService
include the Provider's Kubernetes cluster settings.
clusterConfig := cluster.NewDefaultConfig()
clusterConfig.InventoryResourcePollPeriod = cfg.InventoryResourcePollPeriod
clusterConfig.InventoryResourceDebugFrequency = cfg.InventoryResourceDebugFrequency
clusterConfig.InventoryExternalPortQuantity = cfg.ClusterExternalPortQuantity
clusterConfig.CPUCommitLevel = cfg.CPUCommitLevel
clusterConfig.MemoryCommitLevel = cfg.MemoryCommitLevel
clusterConfig.StorageCommitLevel = cfg.StorageCommitLevel
clusterConfig.BlockedHostnames = cfg.BlockedHostnames
clusterConfig.DeploymentIngressStaticHosts = cfg.DeploymentIngressStaticHosts
clusterConfig.DeploymentIngressDomain = cfg.DeploymentIngressDomain
clusterConfig.ClusterSettings = cfg.ClusterSettings
These settings are defined in the flags used when the provider-services run
command is issued.
Example flag made available within the provider/cmd/provider-services/cmd/run.go
file for Ingress Domain declaration.
const (
...
FlagDeploymentIngressDomain = "deployment-ingress-domain"
....
)