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: README.md
+9-7Lines changed: 9 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ should be reconciled. Supports conditional resources in runtime, ordering of res
23
23
The project introduces two Kubernetes custom resources `Glue` and `GlueOperator`.
24
24
You can use `GlueOperator` to define your own operator.
25
25
Let's take a look at an example, where we define an operator for WebPage custom resource, that represents a static website served from the Cluster. (You can see the
26
-
[full example here](https://github.com/csviri/resource-workflow-operator/blob/main/src/test/resources/sample/webpage)):
26
+
[full example here](https://github.com/csviri/resource-workflow-operator/blob/main/src/test/resources/sample/webpage)):
27
27
28
28
```yaml
29
29
@@ -45,7 +45,7 @@ spec:
45
45
```
46
46
47
47
To create an operator (or more precisely the controller part) with `resource-glue-operator` we have first apply
48
-
the {CRD for WebPage](https://github.com/csviri/resource-workflow-operator/blob/main/src/test/resources/sample/webpage/webpage.crd.yml).
48
+
the [CRD for WebPage](https://github.com/csviri/resource-workflow-operator/blob/main/src/test/resources/sample/webpage/webpage.crd.yml).
49
49
To define how the `WebPage` should be reconciled, thus what resources should be created for
50
50
a `WebPage`, we prepare a `GlueOperator`:
51
51
@@ -120,7 +120,7 @@ resources are applied, however, there are certain cases when this is needed also
120
120
The following example shows how to deploy a [dynamic admission controller](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/) that mutates
121
121
all the `Pods`, adding annotation on them. Note that this is a tricky situation since the endpoint for the `MutatingWebhookConfiguration` is also a `Pod`, thus it should be
122
122
first up and running before the configuration is applied, otherwise, the mutation webhook will block the changes on the pods, which would render the cluster unable to manage `Pods'
123
-
(irrelevant details are omitted, see the full version [here][https://github.com/csviri/resource-workflow-operator/blob/main/src/test/resources/sample/mutation/mutation.glue.yaml]):
123
+
(irrelevant details are omitted, see the full version [here](https://github.com/csviri/resource-workflow-operator/blob/main/src/test/resources/sample/mutation/mutation.glue.yaml)):
type: ReadyCondition # ready post conditions determine when a Deployment is considered "ready", thus up and running.
143
143
resource:
@@ -158,8 +158,10 @@ spec:
158
158
protocol: TCP
159
159
160
160
- name: mutation_hook_config
161
-
# dependsOn relation means, that the resource will be reconciled only if all the listed resources are already reconciled and ready (if ready post-condition is present).
162
-
# This resource will be applied, after the service and deployment are applied, and the deployment is ready, thus all the pods are started up and ready.
161
+
# dependsOn relation means, that the resource will be reconciled only if all
162
+
# the listed resources are already reconciled and ready (if ready post-condition is present).
163
+
# This resource will be applied after the service and deployment are applied,
164
+
# and the deployment is ready, thus all the pods are started up and ready.
163
165
dependsOn:
164
166
- deployment
165
167
- service
@@ -190,5 +192,5 @@ spec:
190
192
- pods
191
193
```
192
194
193
-
195
+
See the full E2E test [here](https://github.com/csviri/resource-workflow-operator/blob/main/src/test/java/io/csviri/operator/resourceglue/sample/mutation/MutationWebhookDeploymentE2E.java).
0 commit comments