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
+12-12Lines changed: 12 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
# Resource Glue Operator
1
+
# Kubernetes Glue Operator
2
2
3
-
Resource Glue Operator is a powerful Kubernetes **meta operator** that allows you to create other **operators in a declarative** way by **simply
3
+
Kubernetes Glue Operator is a powerful Kubernetes **meta operator** that allows you to create other **operators in a declarative** way by **simply
4
4
applying a custom resource**.
5
5
6
6
It provides facilities to compose Kubernetes resources and describes how the resource
@@ -26,11 +26,11 @@ 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/resource-workflow-operator/blob/main/src/test/resources/sample/webpage))
29
+
[full example here](https://github.com/csviri/kubernetes-glue-operator/blob/main/src/test/resources/sample/webpage))
30
30
31
31
```yaml
32
32
33
-
apiVersion: "resourceglueoperator.sample/v1"
33
+
apiVersion: "glueoperator.sample/v1"
34
34
kind: WebPage
35
35
metadata:
36
36
name: hellows
@@ -47,19 +47,19 @@ spec:
47
47
</html>
48
48
```
49
49
50
-
To create an operator (or more precisely the controller part) with `resource-glue-operator` we have first apply
51
-
the [CRD for WebPage](https://github.com/csviri/resource-workflow-operator/blob/main/src/test/resources/sample/webpage/webpage.crd.yml).
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).
52
52
To define how the `WebPage` should be reconciled, thus what resources should be created for
apiVersion: resourceglueoperator.sample/v1 # watches all the custom resource of type WebPage
62
+
apiVersion: glueoperator.sample/v1 # watches all the custom resource of type WebPage
63
63
kind: WebPage
64
64
resources:
65
65
- name: htmlconfigmap
@@ -127,11 +127,11 @@ resources are applied, however, there are certain cases when this is needed also
127
127
The following example shows how to deploy a [dynamic admission controller](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/) that mutates
128
128
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
129
129
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'.
130
-
(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),
131
-
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))
130
+
(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),
131
+
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))
The `dependsOn` relation is a useful concept in certain situations, that might be familiar from other infrustructure-as-a-code tools, `resource-glue-operator` adopts it to Kubernetes operators.
205
+
The `dependsOn` relation is a useful concept in certain situations, that might be familiar from other infrustructure-as-a-code tools, `kubernetes-glue-operator` adopts it to Kubernetes operators.
Copy file name to clipboardExpand all lines: docs/comparison.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
# Rational and Comparison to Similar Solutions
2
2
3
-
There are other solutions comparable to *resource-glue-operator* that work (or limited to work) on top
3
+
There are other solutions comparable to *kubernetes-glue-operator* that work (or limited to work) on top
4
4
of Kubernetes resources in a language-independent way and try to simplify the operator
5
-
development but make some compromises. *resource-glue-operator* has some nice properties:
5
+
development but make some compromises. *kubernetes-glue-operator* has some nice properties:
6
6
7
7
1.**input is only a custom resource** (`Glue` or `GlueOperator`) that makes it very easy to set up, maintain,
8
8
and start with. You don't have to build the project, all you have to manage is `yaml` files (CRD, inputs, deployment)
@@ -25,7 +25,7 @@ this is probably the most elegant way to go.
25
25
As mentioned before there are solutions that are comparable to ours, and all of them have advantages and disadvantages:
26
26
27
27
-[**metacontroller**](https://github.com/metacontroller/metacontroller) - it a very interesting solution that allows
28
-
to implement controller is any language programming language, just like in the case of *resource-glue-operator* takes a custom resource as an input, which
28
+
to implement controller is any language programming language, just like in the case of *kubernetes-glue-operator* takes a custom resource as an input, which
29
29
describes the Kubernetes resources that we are interested in - or watched/managed for a custom resource.
30
30
However, it does not describe the desired state that is up to you to implement in the form of a web service endpoint,
31
31
where all the inputs are received and the output is a list of desired resources.
@@ -37,13 +37,13 @@ As mentioned before there are solutions that are comparable to ours, and all of
37
37
38
38
In summary *metacontroller* is a bit more generic solution this moment,
39
39
but with additional complexity to manage, and much harder to start with.
40
-
The main practical difference is in supporting ["bulk resources"](https://github.com/csviri/resource-glue-operator/issues/75)
40
+
The main practical difference is in supporting ["bulk resources"](https://github.com/csviri/kubernetes-glue-operator/issues/75)
41
41
we will also support it in future versions.
42
42
43
43
-[Helm Operators](https://sdk.operatorframework.io/docs/building-operators/helm/tutorial/) - are a very efficient
44
44
way to convert a helm chart into a controller. It also makes it very easy to start and use.
45
45
However, the controller still needs to be build (the helm chart is not just an input configuration),
46
46
does not handle related resources, and does not support ordering. In this terms is a bit more limited
47
-
than *resource-glue-operator*.
47
+
than *kubernetes-glue-operator*.
48
48
49
49
-[Crossplane Composition](https://docs.crossplane.io/latest/concepts/compositions/) TODO
`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 `resources` (sometimes referred to as managed resources) and `related resources`:
@@ -37,16 +37,16 @@ The `resources` section is a list of resources to be reconciled. It has several
37
37
38
38
At the moment there are two types of built-in conditions provided:
39
39
40
-
-**`ReadyCondition`** - check if a resource is up and running. Use it only as a `readyPostCondition`. See sample usage [here](https://github.com/csviri/resource-workflow-operator/blob/main/src/test/resources/sample/mutation/mutation.glue.yaml#L24-L25).
40
+
-**`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).
41
41
-**`JSCondition`** - a generic condition, that allows writing conditions in JavaScript. As input, all the resources are available which
42
42
are either managed or related. The script should return a boolean value.
43
-
See accessing the related resource in [WebPage sample](https://github.com/csviri/resource-workflow-operator/blob/main/src/test/resources/sample/webpage/webpage.operator.yaml#L62-L64),
44
-
and cross-referencing resources [here](https://github.com/csviri/resource-workflow-operator/blob/main/src/test/resources/resourceglue/TwoResourcesAndCondition.yaml#L23-L28).
43
+
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),
44
+
and cross-referencing resources [here](https://github.com/csviri/kubernetes-glue-operator/blob/main/src/test/resources/glue/TwoResourcesAndCondition.yaml#L23-L28).
45
45
46
46
### Related resources
47
47
48
48
Related resources are resources that are not managed (not created, updated, or deleted) during reconciliation, but serve as an input for it.
49
-
See sample usage within `Glue`[here](https://github.com/csviri/resource-workflow-operator/blob/main/src/test/resources/resourceglue/RelatedResourceSimpleWithCondition.yaml)
49
+
See sample usage within `Glue`[here](https://github.com/csviri/kubernetes-glue-operator/blob/main/src/test/resources/glue/RelatedResourceSimpleWithCondition.yaml)
50
50
The following attributes can be defined for a related resource:
51
51
52
52
-**`name`** - same as for managed resource, unique identifier, used to reference the resource.
@@ -59,15 +59,15 @@ The following attributes can be defined for a related resource:
59
59
Both in `JSCondition` and resource templates other resources can be referenced by the name.
60
60
61
61
If there are more `resourceNames` specified for a related resource, the resource is referenced in a form
62
-
`[related resource name]#[resource name]`. See sample [here](https://github.com/csviri/resource-workflow-operator/blob/main/src/test/resources/resourceglue/MultiNameRelatedResource.yaml).
62
+
`[related resource name]#[resource name]`. See sample [here](https://github.com/csviri/kubernetes-glue-operator/blob/main/src/test/resources/glue/MultiNameRelatedResource.yaml).
63
63
64
64
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 -
65
65
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.
66
-
See sample resource cross-referencing [here](https://github.com/csviri/resource-workflow-operator/blob/main/src/test/resources/resourceglue/CrossReferenceResource.yaml).
66
+
See sample resource cross-referencing [here](https://github.com/csviri/kubernetes-glue-operator/blob/main/src/test/resources/glue/CrossReferenceResource.yaml).
67
67
68
-
The metadata of `Glue` can be referenced under `glueMetadata`, see sample [here](https://github.com/csviri/resource-workflow-operator/blob/main/src/test/resources/resourceglue/TemplateForConcurrency.yaml#L12-L12)
68
+
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)
69
69
70
-
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/resource-workflow-operator/blob/main/src/test/resources/resourceglueoperator/Templating.yaml).
70
+
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).
71
71
72
72
### Reconciliation notes
73
73
@@ -78,22 +78,22 @@ for a resource that depends on it.
78
78
79
79
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 one additional attribute **`parent`**,
84
84
which has two sub-attributes: **`apiVersion`** and **`kind`**. This structure specifies the resource
85
85
types - usually but not necessarily custom resources - watched.
86
86
87
-
See minimal `GlueOperator`[here](https://github.com/csviri/resource-workflow-operator/blob/main/src/test/resources/resourceglueoperator/Templating.yaml).
87
+
See minimal `GlueOperator`[here](https://github.com/csviri/kubernetes-glue-operator/blob/main/src/test/resources/glueoperator/Templating.yaml).
88
88
89
-
## Deploying `resource-glue-operator`
89
+
## Deploying `kubernetes-glue-operator`
90
90
91
91
Implementation is using [Quarkus Operator SDK (QOSDK)](https://github.com/quarkiverse/quarkus-operator-sdk),
92
92
the default [configuration options](https://docs.quarkiverse.io/quarkus-operator-sdk/dev/includes/quarkus-operator-sdk.html)
93
93
defined by QOSDK can be overridden using environment variables.
94
94
95
95
With every release, there are Kubernetes resources provided to make an initial deployment very simple.
96
-
See `kubernetes.yml` in [release assets](https://github.com/csviri/resource-glue-operator/releases).
96
+
See `kubernetes.yml` in [release assets](https://github.com/csviri/kubernetes-glue-operator/releases).
97
97
While we will provide more options, users are encouraged to enhance/adjust this for their purposes.
98
98
99
99
Since the project is a meta-controller, it needs to have access rights to all the resources it manages.
@@ -103,8 +103,8 @@ and `["list", "watch"]` for related resources.
103
103
104
104
The project is mainly tested with cluster-scoped deployment, however, QOSDK namespace-scoped deployments are also supported.
105
105
106
-
See also the upcoming deployment modes/options: [sharding with label selectors](https://github.com/csviri/resource-glue-operator/issues/50),
107
-
[watching only one custom resources type](https://github.com/csviri/resource-glue-operator/issues/54)
106
+
See also the upcoming deployment modes/options: [sharding with label selectors](https://github.com/csviri/kubernetes-glue-operator/issues/50),
107
+
[watching only one custom resources type](https://github.com/csviri/kubernetes-glue-operator/issues/54)
108
108
109
109
## Implementation details and performance
110
110
@@ -127,12 +127,12 @@ Note that none of the limitations are unsolvable, and will be continuously remov
127
127
128
128
## Samples
129
129
130
-
1.[WebPage](https://github.com/csviri/resource-glue-operator/tree/main/src/test/resources/sample/webpage)`GlueOperator`, serves a static website from the cluster.
130
+
1.[WebPage](https://github.com/csviri/kubernetes-glue-operator/tree/main/src/test/resources/sample/webpage)`GlueOperator`, serves a static website from the cluster.
131
131
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`
132
132
to expose the static web page.
133
-
3.[Muatation Hook Deployment](https://github.com/csviri/resource-workflow-operator/tree/main/src/test/resources/sample/mutation), described on the project home page.
134
-
4.[Additional `Glue` samples](https://github.com/csviri/resource-workflow-operator/tree/main/src/test/resources/resourceglue), note that these are used for integration testing.
135
-
5.[Additional `GlueOperator` samples](https://github.com/csviri/resource-workflow-operator/tree/main/src/test/resources/resourceglueoperator), also used for integration testing.
133
+
3.[Muatation Hook Deployment](https://github.com/csviri/kubernetes-glue-operator/tree/main/src/test/resources/sample/mutation), described on the project home page.
134
+
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.
135
+
5.[Additional `GlueOperator` samples](https://github.com/csviri/kubernetes-glue-operator/tree/main/src/test/resources/glueoperator), also used for integration testing.
0 commit comments