MCPcopy Create free account
hub / github.com/devfile/devworkspace-operator / getClusterConfig

Function getClusterConfig

pkg/config/sync.go:172–181  ·  view source on GitHub ↗
(namespace string, client crclient.Client)

Source from the content-addressed store, hash-verified

170}
171
172func getClusterConfig(namespace string, client crclient.Client) (*controller.DevWorkspaceOperatorConfig, error) {
173 clusterConfig := &controller.DevWorkspaceOperatorConfig{}
174 if err := client.Get(context.Background(), types.NamespacedName{Name: OperatorConfigName, Namespace: namespace}, clusterConfig); err != nil {
175 if k8sErrors.IsNotFound(err) {
176 return nil, nil
177 }
178 return nil, err
179 }
180 return clusterConfig, nil
181}
182
183func getMergedConfig(from, to *controller.OperatorConfiguration) *controller.OperatorConfiguration {
184 mergedConfig := to.DeepCopy()

Callers 2

SetupControllerConfigFunction · 0.85

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected