You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* docs: add faq non clustered operator
* fix: wording, clarify that annotation can also be used to configure namespaces
Co-authored-by: Chris Laprun <[email protected]>
Copy file name to clipboardExpand all lines: docs/documentation/faq.md
+29-1
Original file line number
Diff line number
Diff line change
@@ -43,4 +43,32 @@ without an update:
43
43
```
44
44
45
45
Although you might consider using `EventSources`, to handle reconciliation triggering in a smarter
46
-
way.
46
+
way.
47
+
48
+
### Q: How can I run an operator without cluster scope rights?
49
+
50
+
By default, JOSDK requires access to CRs at cluster scope. You may not be granted such
51
+
rights and you will see some error at startup that looks like:
52
+
53
+
```plain
54
+
io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: GET at: https://kubernetes.local.svc/apis/mygroup/v1alpha1/mycr. Message: Forbidden! Configured service account doesn't have access. Service account may have been revoked. mycrs.mygroup is forbidden: User "system:serviceaccount:ns:sa" cannot list resource "mycrs" in API group "mygroup" at the cluster scope.
55
+
```
56
+
57
+
To restrict the operator to a set of namespaces, you may override which namespaces are watched by a reconciler
58
+
at [Reconciler-level configuration](./configuration.md#reconciler-level-configuration):
59
+
60
+
```java
61
+
Operator operator;
62
+
Reconciler reconciler;
63
+
...
64
+
operator.register(reconciler, configOverrider ->
65
+
configOverrider.settingNamespace("mynamespace"));
66
+
```
67
+
Note that configuring the watched namespaces can also be done using the `@ControllerConfiguration` annotation.
68
+
69
+
Furthermore, you may not be able to list CRDs at startup which is required when `checkingCRDAndValidateLocalModel`
70
+
is `true` (`false` by default). To disable, set it to `false` at [Operator-level configuration](./configuration.md#operator-level-configuration):
0 commit comments