Skip to content

Commit 6c14587

Browse files
authored
refactor: rename to kubernetes-glue-operator (#77)
Signed-off-by: csviri <[email protected]>
1 parent 20d1289 commit 6c14587

File tree

69 files changed

+254
-256
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+254
-256
lines changed

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Resource Glue Operator
1+
# Kubernetes Glue Operator
22

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
44
applying a custom resource**.
55

66
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
2626
The project introduces two Kubernetes custom resources `Glue` and `GlueOperator`.
2727
You can use `GlueOperator` to define your own operator.
2828
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))
3030

3131
```yaml
3232

33-
apiVersion: "resourceglueoperator.sample/v1"
33+
apiVersion: "glueoperator.sample/v1"
3434
kind: WebPage
3535
metadata:
3636
name: hellows
@@ -47,19 +47,19 @@ spec:
4747
</html>
4848
```
4949
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).
5252
To define how the `WebPage` should be reconciled, thus what resources should be created for
5353
a `WebPage`, we prepare a `GlueOperator`:
5454

5555
```yaml
56-
apiVersion: io.csviri.operator.resourceglue/v1beta1
56+
apiVersion: io.csviri.operator.glue/v1beta1
5757
kind: GlueOperator
5858
metadata:
5959
name: webpage-operator
6060
spec:
6161
parent:
62-
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
6363
kind: WebPage
6464
resources:
6565
- name: htmlconfigmap
@@ -127,11 +127,11 @@ resources are applied, however, there are certain cases when this is needed also
127127
The following example shows how to deploy a [dynamic admission controller](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/) that mutates
128128
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
129129
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))
132132

133133
```yaml
134-
apiVersion: io.csviri.operator.resourceglue/v1beta1
134+
apiVersion: io.csviri.operator.glue/v1beta1
135135
kind: Glue
136136
metadata:
137137
name: mutation-webhook-deployment
@@ -202,5 +202,5 @@ spec:
202202
- pods
203203
```
204204

205-
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.
206206

docs/comparison.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Rational and Comparison to Similar Solutions
22

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
44
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:
66

77
1. **input is only a custom resource** (`Glue` or `GlueOperator`) that makes it very easy to set up, maintain,
88
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.
2525
As mentioned before there are solutions that are comparable to ours, and all of them have advantages and disadvantages:
2626

2727
- [**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
2929
describes the Kubernetes resources that we are interested in - or watched/managed for a custom resource.
3030
However, it does not describe the desired state that is up to you to implement in the form of a web service endpoint,
3131
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
3737

3838
In summary *metacontroller* is a bit more generic solution this moment,
3939
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)
4141
we will also support it in future versions.
4242

4343
- [Helm Operators](https://sdk.operatorframework.io/docs/building-operators/helm/tutorial/) - are a very efficient
4444
way to convert a helm chart into a controller. It also makes it very easy to start and use.
4545
However, the controller still needs to be build (the helm chart is not just an input configuration),
4646
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*.
4848

4949
- [Crossplane Composition](https://docs.crossplane.io/latest/concepts/compositions/) TODO

docs/getting-started.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,35 +9,35 @@ Start a local Kubernetes cluster using for example [Minikube](https://minikube.s
99
Apply the CustomResourceDefinitions:
1010

1111
```bash
12-
kubectl apply -f https://github.com/csviri/resource-glue-operator/releases/latest/download/glues.io.csviri.operator.resourceglue-v1.yml -f https://github.com/csviri/resource-glue-operator/releases/latest/download/glueoperators.io.csviri.operator.resourceglue-v1.yml
12+
kubectl apply -f https://github.com/csviri/kubernetes-glue-operator/releases/latest/download/glues.io.csviri.operator.glue-v1.yml -f https://github.com/csviri/kubernetes-glue-operator/releases/latest/download/glueoperators.io.csviri.operator.glue-v1.yml
1313
```
1414

15-
Deploy the `resource-glue-operator`:
15+
Deploy the `kubernetes-glue-operator`:
1616

1717
```bash
18-
kubectl apply -f https://github.com/csviri/resource-glue-operator/releases/latest/download/kubernetes.yml
18+
kubectl apply -f https://github.com/csviri/kubernetes-glue-operator/releases/latest/download/kubernetes.yml
1919
```
2020

2121
Note that this deployment gives the controller access to all the resources on the cluster, this is not what you might want in production.
2222

23-
## Try out the [WebPage Sample](https://github.com/csviri/resource-workflow-operator/tree/main/src/test/resources/sample/webpage)
23+
## Try out the [WebPage Sample](https://github.com/csviri/kubernetes-glue-operator/tree/main/src/test/resources/sample/webpage)
2424

2525
First apply the CustomResourceDefinition for `WebPage` :
2626

2727
```bash
28-
kubectl apply -f https://raw.githubusercontent.com/csviri/resource-glue-operator/main/src/test/resources/sample/webpage/webpage.crd.yaml
28+
kubectl apply -f https://raw.githubusercontent.com/csviri/kubernetes-glue-operator/main/src/test/resources/sample/webpage/webpage.crd.yaml
2929
```
3030

3131
Apply the `GlueOperator` for `WebPage`:
3232

3333
```bash
34-
kubectl apply -f https://raw.githubusercontent.com/csviri/resource-glue-operator/main/src/test/resources/sample/webpage/webpage.operator.yaml
34+
kubectl apply -f https://raw.githubusercontent.com/csviri/kubernetes-glue-operator/main/src/test/resources/sample/webpage/webpage.operator.yaml
3535
```
3636

3737
Create a new static `WebPage`:
3838

3939
```bash
40-
kubectl apply -f https://raw.githubusercontent.com/csviri/resource-glue-operator/main/src/test/resources/sample/webpage/webpage.sample.yaml
40+
kubectl apply -f https://raw.githubusercontent.com/csviri/kubernetes-glue-operator/main/src/test/resources/sample/webpage/webpage.sample.yaml
4141
```
4242

4343
All done! Check the resources created, if using minikube you can open the served WebPage with `minikube service webpage1`.

docs/reference.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ of [Java Operator SDK](https://github.com/operator-framework/java-operator-sdk)
66
Although it is limited only to Kubernetes resources it makes it very easy to use in language-independent
77
(DependentResources in JOSDK are also covering external resources) way.
88

9-
## [Glue resource](https://github.com/csviri/resource-glue-operator/releases/latest/download/glues.io.csviri.operator.resourceglue-v1.yml)
9+
## [Glue resource](https://github.com/csviri/kubernetes-glue-operator/releases/latest/download/glues.glue-v1.yml)
1010

1111
`Glue` is the heart of the operator. Note that `GlueOperator` controller just creates a new `Glue` with a related resource,
1212
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
3737

3838
At the moment there are two types of built-in conditions provided:
3939

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).
4141
- **`JSCondition`** - a generic condition, that allows writing conditions in JavaScript. As input, all the resources are available which
4242
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).
4545

4646
### Related resources
4747

4848
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)
5050
The following attributes can be defined for a related resource:
5151

5252
- **`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:
5959
Both in `JSCondition` and resource templates other resources can be referenced by the name.
6060

6161
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).
6363

6464
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 -
6565
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).
6767

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)
6969

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).
7171

7272
### Reconciliation notes
7373

@@ -78,22 +78,22 @@ for a resource that depends on it.
7878

7979
The `DependentResource` implementation of JOSDK makes all kinds of optimizations on the reconciliation which are utilized (or will be also here).
8080

81-
## [GlueOperator resource](https://github.com/csviri/resource-glue-operator/releases/latest/download/glueoperators.io.csviri.operator.resourceglue-v1.yml)
81+
## [GlueOperator resource](https://github.com/csviri/kubernetes-glue-operator/releases/latest/download/glueoperators.glue-v1.yml)
8282

8383
The specs of `GlueOperator` are almost identical to `Glue`, it just adds one additional attribute **`parent`**,
8484
which has two sub-attributes: **`apiVersion`** and **`kind`**. This structure specifies the resource
8585
types - usually but not necessarily custom resources - watched.
8686

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).
8888

89-
## Deploying `resource-glue-operator`
89+
## Deploying `kubernetes-glue-operator`
9090

9191
Implementation is using [Quarkus Operator SDK (QOSDK)](https://github.com/quarkiverse/quarkus-operator-sdk),
9292
the default [configuration options](https://docs.quarkiverse.io/quarkus-operator-sdk/dev/includes/quarkus-operator-sdk.html)
9393
defined by QOSDK can be overridden using environment variables.
9494

9595
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).
9797
While we will provide more options, users are encouraged to enhance/adjust this for their purposes.
9898

9999
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.
103103

104104
The project is mainly tested with cluster-scoped deployment, however, QOSDK namespace-scoped deployments are also supported.
105105

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)
108108

109109
## Implementation details and performance
110110

@@ -127,12 +127,12 @@ Note that none of the limitations are unsolvable, and will be continuously remov
127127

128128
## Samples
129129

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.
131131
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`
132132
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.
136136

137137
## Related documents
138138

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44

5-
<groupId>io.csviri.operator.resourceglue</groupId>
6-
<artifactId>resource-glue-operator</artifactId>
5+
<groupId>io.csviri.operator.glue</groupId>
6+
<artifactId>kubernetes-glue-operator</artifactId>
77
<version>0.1.1-SNAPSHOT</version>
88
<packaging>jar</packaging>
99
<name>Resource Flow Operator</name>

0 commit comments

Comments
 (0)