(clusterName string, namespace string)
| 130 | } |
| 131 | |
| 132 | func buildManager(clusterName string, namespace string) (manager.Manager, error) { |
| 133 | return controllerruntime.NewManager(controllerruntime.GetConfigOrDie(), controllerruntime.Options{ |
| 134 | Scheme: scheme.BuildWithAllKnownScheme(), |
| 135 | Cache: cache.Options{ |
| 136 | ByObject: map[client.Object]cache.ByObject{ |
| 137 | &apiv1.Cluster{}: { |
| 138 | Field: fields.OneTermEqualSelector("metadata.name", clusterName), |
| 139 | Namespaces: map[string]cache.Config{ |
| 140 | namespace: {}, |
| 141 | }, |
| 142 | }, |
| 143 | }, |
| 144 | }, |
| 145 | Client: client.Options{ |
| 146 | Cache: &client.CacheOptions{ |
| 147 | DisableFor: []client.Object{ |
| 148 | &corev1.Secret{}, |
| 149 | &corev1.ConfigMap{}, |
| 150 | // todo(armru): we should remove the backup endpoints from the local webserver |
| 151 | &apiv1.Backup{}, |
| 152 | }, |
| 153 | }, |
| 154 | }, |
| 155 | LeaderElection: false, |
| 156 | Metrics: metricsserver.Options{ |
| 157 | BindAddress: "0", |
| 158 | }, |
| 159 | }) |
| 160 | } |
no test coverage detected