Skip to content

Commit f936b62

Browse files
committed
docs: add faq non clustered operator
1 parent b97d36e commit f936b62

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

docs/documentation/faq.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,32 @@ without an update:
4343
```
4444

4545
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 require access to CR 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 namesapce, you may override the namespaces 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+
68+
Furthermore, you may not be able to list CRDs at startup which is required when `checkingCRDAndValidateLocalModel`
69+
is `true` (by default). To disable set it to `false` at [Operator-level configuration](./configuration.md#operator-level-configuration):
70+
71+
```java
72+
ConfigurationServiceProvider.overrideCurrent(o -> o.checkingCRDAndValidateLocalModel(false)
73+
.withLeaderElectionConfiguration(new LeaderElectionConfiguration("bar", "barNS")));
74+
```

0 commit comments

Comments
 (0)