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
Copy file name to clipboardExpand all lines: docs/DOCS.md
+6-6
Original file line number
Diff line number
Diff line change
@@ -56,16 +56,16 @@ TODO: explain running operator locally against a cluster
56
56
57
57
### Run Single Instance
58
58
59
-
There should be always just one instance of an operator running at a time (think process). If there there would be
59
+
There should be always just one instance of an operator running at a time (think process). If there would be
60
60
two ore more, in general it could lead to concurrency issues. Note that we are also doing optimistic locking when we update a resource.
61
-
In this way the operator is not highly available. However for operators this not necessary an issue,
61
+
In this way the operator is not highly available. However for operators this is not necessarily an issue,
62
62
if the operator just gets restarted after it went down.
63
63
64
64
### At Least Once
65
65
66
66
To implement controller logic, we have to override two methods: `createOrUpdateResource` and `deleteResource`.
67
-
These methods are called if a resource is create/changed or marked for deletion. In most cases these methods will be
68
-
called just once, but in some rare casescan happen that are called more then once. In practice this means that the
67
+
These methods are called if a resource is created/changed or marked for deletion. In most cases these methods will be
68
+
called just once, but in some rare cases, it can happen that they are called more then once. In practice this means that the
69
69
implementation needs to be **idempotent**.
70
70
71
71
### Smart Scheduling
@@ -77,11 +77,11 @@ a customizable retry mechanism to deal with temporal errors.
77
77
78
78
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
79
79
(We use `kubectl get ... --watch` in the background). This can be a huge amount of resources depending on your use case.
80
-
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.
80
+
So it could be a good case to just have a status field on the resource which is checked, if there is anything needed to be done.
81
81
82
82
### Deleting a Resource
83
83
84
84
During deletion process we use [Kubernetes finalizers](https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#finalizers
85
85
"Kubernetes docs") finalizers. This is required, since it can happen that the operator is not running while the delete
86
86
of resource is executed (think `oc delete`). In this case we would not catch the delete event. So we automatically add a
87
-
finalizer first time we update the resource if its not there.
87
+
finalizer first time we update the resource if it's not there.
0 commit comments