MCPcopy Index your code
hub / github.com/cortexlabs/cortex / getConfigureClusterConfig

Function getConfigureClusterConfig

cli/cmd/lib_cluster_config.go:144–162  ·  view source on GitHub ↗
(awsClient *aws.Client, k8sClient *k8s.Client, stacks clusterstate.ClusterStacks, cachedClusterConfig clusterconfig.Config, newClusterConfigFile string)

Source from the content-addressed store, hash-verified

142}
143
144func getConfigureClusterConfig(awsClient *aws.Client, k8sClient *k8s.Client, stacks clusterstate.ClusterStacks, cachedClusterConfig clusterconfig.Config, newClusterConfigFile string) (*clusterconfig.Config, clusterconfig.ConfigureChanges, error) {
145 newUserClusterConfig := &clusterconfig.Config{}
146
147 err := readUserClusterConfigFile(newUserClusterConfig, newClusterConfigFile)
148 if err != nil {
149 return nil, clusterconfig.ConfigureChanges{}, err
150 }
151
152 newUserClusterConfig.Telemetry = isTelemetryEnabled()
153 cachedClusterConfig.Telemetry = newUserClusterConfig.Telemetry
154
155 configureChanges, err := newUserClusterConfig.ValidateOnConfigure(awsClient, k8sClient, cachedClusterConfig, stacks.NodeGroupsStacks)
156 if err != nil {
157 err = errors.Append(err, fmt.Sprintf("\n\ncluster configuration schema can be found at https://docs.cortex.dev/v/%s/", consts.CortexVersionMinor))
158 return nil, clusterconfig.ConfigureChanges{}, errors.Wrap(err, newClusterConfigFile)
159 }
160
161 return newUserClusterConfig, configureChanges, nil
162}
163
164func confirmInstallClusterConfig(clusterConfig *clusterconfig.Config, awsClient *aws.Client, disallowPrompt bool) {
165 eksPrice := aws.EKSPrices[clusterConfig.Region]

Callers 1

cluster.goFile · 0.85

Calls 5

ValidateOnConfigureMethod · 0.95
AppendFunction · 0.92
WrapFunction · 0.92
isTelemetryEnabledFunction · 0.85

Tested by

no test coverage detected