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
+7-7
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ Either in the discussion section here on GitHub or at [Kubernetes Slack Operator
26
26
The project introduces two Kubernetes custom resources `Glue` and `GlueOperator`.
27
27
You can use `GlueOperator` to define your own operator.
28
28
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
29
-
[full example here](https://github.com/csviri/kubernetes-glue-operator/blob/main/src/test/resources/sample/webpage))
29
+
[full example here](https://github.com/java-operator-sdk/kubernetes-glue-operator/blob/main/src/test/resources/sample/webpage))
30
30
31
31
```yaml
32
32
@@ -48,12 +48,12 @@ spec:
48
48
```
49
49
50
50
To create an operator (or more precisely the controller part) with `kubernetes-glue-operator` we have first apply
51
-
the [CRD for WebPage](https://github.com/csviri/kubernetes-glue-operator/blob/main/src/test/resources/sample/webpage/webpage.crd.yml).
51
+
the [CRD for WebPage](https://github.com/java-operator-sdk/kubernetes-glue-operator/blob/main/src/test/resources/sample/webpage/webpage.crd.yml).
52
52
To define how the `WebPage` should be reconciled, thus what resources should be created for
@@ -128,11 +128,11 @@ resources are applied, however, there are certain cases when this is needed also
128
128
The following example shows how to deploy a [dynamic admission controller](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/) that mutates
129
129
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 'Pods' should be
130
130
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'.
131
-
(Irrelevant details are omitted, see the full version [here](https://github.com/csviri/kubernetes-glue-operator/blob/main/src/test/resources/sample/mutation/mutation.glue.yaml),
132
-
see the full E2E test [here](https://github.com/csviri/kubernetes-glue-operator/blob/main/src/test/java/io/csviri/operator/glue/sample/mutation/MutationWebhookDeploymentE2E.java))
131
+
(Irrelevant details are omitted, see the full version [here](https://github.com/java-operator-sdk/kubernetes-glue-operator/blob/main/src/test/resources/sample/mutation/mutation.glue.yaml),
132
+
see the full E2E test [here](https://github.com/java-operator-sdk/kubernetes-glue-operator/blob/main/src/test/java/io/java-operator-sdk/operator/glue/sample/mutation/MutationWebhookDeploymentE2E.java))
`Glue` is the heart of the operator. Note that `GlueOperator` controller just creates a new `Glue` with a related resource,
12
12
for each parent custom resource. `Glue` defines `childResources` (sometimes referred to as managed resources) and `related resources`:
@@ -40,16 +40,16 @@ It has several attributes:
40
40
41
41
At the moment there are two types of built-in conditions provided:
42
42
43
-
-**`ReadyCondition`** - check if a resource is up and running. Use it only as a `readyPostCondition`. See sample usage [here](https://github.com/csviri/kubernetes-glue-operator/blob/main/src/test/resources/sample/mutation/mutation.glue.yaml#L24-L25).
43
+
-**`ReadyCondition`** - check if a resource is up and running. Use it only as a `readyPostCondition`. See sample usage [here](https://github.com/java-operator-sdk/kubernetes-glue-operator/blob/main/src/test/resources/sample/mutation/mutation.glue.yaml#L24-L25).
44
44
-**`JSCondition`** - a generic condition, that allows writing conditions in JavaScript. As input, all the resources are available which
45
45
are either child or related. The script should return a boolean value.
46
-
See accessing the related resource in [WebPage sample](https://github.com/csviri/kubernetes-glue-operator/blob/main/src/test/resources/sample/webpage/webpage.operator.yaml#L62-L64),
47
-
and cross-referencing resources [here](https://github.com/csviri/kubernetes-glue-operator/blob/main/src/test/resources/glue/TwoResourcesAndCondition.yaml#L23-L28).
46
+
See accessing the related resource in [WebPage sample](https://github.com/java-operator-sdk/kubernetes-glue-operator/blob/main/src/test/resources/sample/webpage/webpage.operator.yaml#L62-L64),
47
+
and cross-referencing resources [here](https://github.com/java-operator-sdk/kubernetes-glue-operator/blob/main/src/test/resources/glue/TwoResourcesAndCondition.yaml#L23-L28).
48
48
49
49
### Related resources
50
50
51
51
Related resources are resources that are not reconciled (not created, updated, or deleted) during reconciliation, but serve as an input for it.
52
-
See sample usage within `Glue`[here](https://github.com/csviri/kubernetes-glue-operator/blob/main/src/test/resources/glue/RelatedResourceSimpleWithCondition.yaml)
52
+
See sample usage within `Glue`[here](https://github.com/java-operator-sdk/kubernetes-glue-operator/blob/main/src/test/resources/glue/RelatedResourceSimpleWithCondition.yaml)
53
53
The following attributes can be defined for a related resource:
54
54
55
55
-**`name`** - same as for child resource, unique identifier, used to reference the resource.
@@ -63,15 +63,15 @@ The following attributes can be defined for a related resource:
63
63
Both in `JSCondition` and resource templates other resources can be referenced by the name.
64
64
65
65
If there are more `resourceNames` specified for a related resource, the resource is referenced in a form
66
-
`[related resource name]#[resource name]`. See sample [here](https://github.com/csviri/kubernetes-glue-operator/blob/main/src/test/resources/glue/MultiNameRelatedResource.yaml).
66
+
`[related resource name]#[resource name]`. See sample [here](https://github.com/java-operator-sdk/kubernetes-glue-operator/blob/main/src/test/resources/glue/MultiNameRelatedResource.yaml).
67
67
68
68
When a resource `B` references another resource `A`, resource `A` will be guaranteed to be in the cache - especially for initial reconciliation when the resource is created -
69
69
only if `B` depends on `A` on it. This is natural, in other words, after reconciliation up-to-date version of the resource is guaranteed to be in the cache after reconciliation.
70
-
See sample resource cross-referencing [here](https://github.com/csviri/kubernetes-glue-operator/blob/main/src/test/resources/glue/CrossReferenceResource.yaml).
70
+
See sample resource cross-referencing [here](https://github.com/java-operator-sdk/kubernetes-glue-operator/blob/main/src/test/resources/glue/CrossReferenceResource.yaml).
71
71
72
-
The metadata of `Glue` can be referenced under `glueMetadata`, see sample [here](https://github.com/csviri/kubernetes-glue-operator/blob/main/src/test/resources/glue/TemplateForConcurrency.yaml#L12-L12)
72
+
The metadata of `Glue` can be referenced under `glueMetadata`, see sample [here](https://github.com/java-operator-sdk/kubernetes-glue-operator/blob/main/src/test/resources/glue/TemplateForConcurrency.yaml#L12-L12)
73
73
74
-
In addition to that in `GlueOperator` the **`parent`** attribute can be used to reference the parent resource on which behalf the resources are created. See sample [here](https://github.com/csviri/kubernetes-glue-operator/blob/main/src/test/resources/glueoperator/Templating.yaml).
74
+
In addition to that in `GlueOperator` the **`parent`** attribute can be used to reference the parent resource on which behalf the resources are created. See sample [here](https://github.com/java-operator-sdk/kubernetes-glue-operator/blob/main/src/test/resources/glueoperator/Templating.yaml).
75
75
76
76
### Reconciliation notes
77
77
@@ -82,7 +82,7 @@ for a resource that depends on it.
82
82
83
83
The `DependentResource` implementation of JOSDK makes all kinds of optimizations on the reconciliation which are utilized (or will be also here).
The specs of `GlueOperator` are almost identical to `Glue`, it just adds some additional attributes:
88
88
@@ -94,9 +94,9 @@ The specs of `GlueOperator` are almost identical to `Glue`, it just adds some ad
94
94
-**`glueMetadata`** - optionally, you can customize the `Glue` resource created for each parent resource.
95
95
This is especially important when the parent is a cluster scoped resource - in that case it is mandatory to set.
96
96
Using this you can specify the **`name`** and **`namespace`** of the created `Glue`.
97
-
See usage on the sample [secret-copy-operator](https://github.com/csviri/kubernetes-glue-operator/blob/main/src/test/resources/sample/secretcopy/secret-copy.operator.yaml#L10-L12).
97
+
See usage on the sample [secret-copy-operator](https://github.com/java-operator-sdk/kubernetes-glue-operator/blob/main/src/test/resources/sample/secretcopy/secret-copy.operator.yaml#L10-L12).
98
98
99
-
See minimal `GlueOperator`[here](https://github.com/csviri/kubernetes-glue-operator/blob/main/src/test/resources/glueoperator/SimpleGlueOperator.yaml).
99
+
See minimal `GlueOperator`[here](https://github.com/java-operator-sdk/kubernetes-glue-operator/blob/main/src/test/resources/glueoperator/SimpleGlueOperator.yaml).
100
100
101
101
## Deployment
102
102
@@ -105,7 +105,7 @@ the default [configuration options](https://docs.quarkiverse.io/quarkus-operator
105
105
defined by QOSDK can be overridden using environment variables.
106
106
107
107
With every release, there are Kubernetes resources provided to make an initial deployment very simple.
108
-
See `kubernetes.yml` in [release assets](https://github.com/csviri/kubernetes-glue-operator/releases).
108
+
See `kubernetes.yml` in [release assets](https://github.com/java-operator-sdk/kubernetes-glue-operator/releases).
109
109
While we will provide more options, users are encouraged to enhance/adjust this for their purposes.
110
110
111
111
Since the project is a meta-controller, it needs to have access rights to all the resources it manages.
@@ -144,7 +144,7 @@ custom resource tracked, so if there is a label selector defined for `Glue` it n
144
144
to the `Glue` resource when it is created. Since it is not trivial to parse label selectors, in more
145
145
complex forms of label selectors (other the ones mentioned above), the labels to add to the `Glue` resources
146
146
by a `GlueOperator` needs to be specified explicitly using
@@ -185,12 +185,12 @@ be continuously improved in the follow-up releases.
185
185
186
186
## Samples
187
187
188
-
1.[WebPage](https://github.com/csviri/kubernetes-glue-operator/tree/main/src/test/resources/sample/webpage)`GlueOperator`, serves a static website from the cluster.
188
+
1.[WebPage](https://github.com/java-operator-sdk/kubernetes-glue-operator/tree/main/src/test/resources/sample/webpage)`GlueOperator`, serves a static website from the cluster.
189
189
To achieve this, it creates three resources a `Deployment` running Nginx, a `ConfigMap` that contains the HTML file an mounted to nginx, a `Service` and an optional `Ingress`
190
190
to expose the static web page.
191
-
3.[Muatation Hook Deployment](https://github.com/csviri/kubernetes-glue-operator/tree/main/src/test/resources/sample/mutation), described on the project home page.
192
-
4.[Additional `Glue` samples](https://github.com/csviri/kubernetes-glue-operator/tree/main/src/test/resources/glue), note that these are used for integration testing.
193
-
5.[Additional `GlueOperator` samples](https://github.com/csviri/kubernetes-glue-operator/tree/main/src/test/resources/glueoperator), also used for integration testing.
191
+
3.[Muatation Hook Deployment](https://github.com/java-operator-sdk/kubernetes-glue-operator/tree/main/src/test/resources/sample/mutation), described on the project home page.
192
+
4.[Additional `Glue` samples](https://github.com/java-operator-sdk/kubernetes-glue-operator/tree/main/src/test/resources/glue), note that these are used for integration testing.
193
+
5.[Additional `GlueOperator` samples](https://github.com/java-operator-sdk/kubernetes-glue-operator/tree/main/src/test/resources/glueoperator), also used for integration testing.
0 commit comments