(namespace string, client crclient.Client)
| 170 | } |
| 171 | |
| 172 | func 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 | |
| 183 | func getMergedConfig(from, to *controller.OperatorConfiguration) *controller.OperatorConfiguration { |
| 184 | mergedConfig := to.DeepCopy() |
no test coverage detected