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
Note that controllers needs to be registered as beans in the Spring context. For example adding the `@Component` annotation
123
-
on the classes will work.
124
-
See Spring docs for for details, also our spring-boot with component scanning.
125
-
All controllers that are registered as a bean, gets automatically registered to operator.
126
-
127
-
Kubernetes client creation using properties is also supported, for complete list see: [Link for config class]
128
-
129
-
130
109
## Implementation / Design details
131
110
132
111
This library relies on the amazing [kubernetes-client](https://github.com/fabric8io/kubernetes-client) from fabric8.
@@ -148,19 +127,24 @@ two ore more, in general it could lead to concurrency issues. Note that we are a
148
127
In this way the operator is not highly available. However for operators this not necessary an issue,
149
128
if the operator just gets restarted after it went down.
150
129
151
-
#### Operator Restarts
152
-
153
-
When an operator is started we got events for every resource (of a type we listen to) already on the cluster. Even if the resource is not changed
154
-
(We use `kubectl get ... --watch` in the background). This can be a huge amount of resources depending on your use case.
155
-
So it could be a good case just have a status field on the resource which is checked, if there anything needs to be done.
156
-
157
130
#### At Least Once
158
131
159
132
To implement controller logic, we have to override two methods: `createOrUpdateResource` and `deleteResource`.
160
133
These methods are called if a resource is create/changed or marked for deletion. In most cases these methods will be
161
134
called just once, but in some rare cases can happen that are called more then once. In practice this means that the
162
135
implementation needs to be **idempotent**.
163
136
137
+
### Smart Scheduling
138
+
139
+
In our scheduling algorithm we make sure, that no events are processed concurrently for a resource. In addition we provide
140
+
a customizable retry mechanism to deal with temporal errors.
141
+
142
+
#### Operator Restarts
143
+
144
+
When an operator is started we got events for every resource (of a type we listen to) already on the cluster. Even if the resource is not changed
145
+
(We use `kubectl get ... --watch` in the background). This can be a huge amount of resources depending on your use case.
146
+
So it could be a good case just have a status field on the resource which is checked, if there anything needs to be done.
147
+
164
148
#### Deleting a Resource
165
149
166
150
During deletion process we use [Kubernetes finalizers](https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#finalizers
0 commit comments