Skip to content

Commit 5474e44

Browse files
authored
refactor: package naming (#145)
Signed-off-by: Attila Mészáros <[email protected]>
1 parent 0008aac commit 5474e44

File tree

85 files changed

+265
-260
lines changed

Some content is hidden

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

85 files changed

+265
-260
lines changed

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ 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/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))
3030

3131
```yaml
3232

@@ -48,12 +48,12 @@ spec:
4848
```
4949
5050
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).
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.glue/v1beta1
56+
apiVersion: io.javaoperatorsdk.operator.glue/v1beta1
5757
kind: GlueOperator
5858
metadata:
5959
name: webpage-operator
@@ -128,11 +128,11 @@ resources are applied, however, there are certain cases when this is needed also
128128
The following example shows how to deploy a [dynamic admission controller](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/) that mutates
129129
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
130130
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))
133133

134134
```yaml
135-
apiVersion: io.csviri.operator.glue/v1beta1
135+
apiVersion: io.javaoperatorsdk.operator.glue/v1beta1
136136
kind: Glue
137137
metadata:
138138
name: mutation-webhook-deployment
@@ -161,7 +161,7 @@ spec:
161161
template:
162162
spec:
163163
containers:
164-
image: ghcr.io/csviri/sample-pod-mutating-webhook:0.1.0
164+
image: ghcr.io/javaoperatorsdk/sample-pod-mutating-webhook:0.1.0
165165
name: pod-mutating-hook
166166
ports:
167167
- containerPort: 443

docs/comparison.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ 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/kubernetes-glue-operator/issues/75)
40+
The main practical difference is in supporting ["bulk resources"](https://github.com/java-operator-sdk/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

docs/getting-started.md

+6-6
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/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
12+
kubectl apply -f https://github.com/java-operator-sdk/kubernetes-glue-operator/releases/latest/download/glues.io.javaoperatorsdk.operator.glue-v1.yml -f https://github.com/java-operator-sdk/kubernetes-glue-operator/releases/latest/download/glueoperators.io.java-operator-sdk.operator.glue-v1.yml
1313
```
1414

1515
Deploy the `kubernetes-glue-operator`:
1616

1717
```bash
18-
kubectl apply -f https://github.com/csviri/kubernetes-glue-operator/releases/latest/download/kubernetes.yml
18+
kubectl apply -f https://github.com/java-operator-sdk/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/kubernetes-glue-operator/tree/main/src/test/resources/sample/webpage)
23+
## Try out the [WebPage Sample](https://github.com/java-operator-sdk/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/kubernetes-glue-operator/main/src/test/resources/sample/webpage/webpage.crd.yaml
28+
kubectl apply -f https://raw.githubusercontent.com/java-operator-sdk/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/kubernetes-glue-operator/main/src/test/resources/sample/webpage/webpage.operator.yaml
34+
kubectl apply -f https://raw.githubusercontent.com/java-operator-sdk/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/kubernetes-glue-operator/main/src/test/resources/sample/webpage/webpage.sample.yaml
40+
kubectl apply -f https://raw.githubusercontent.com/java-operator-sdk/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

+19-19
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/kubernetes-glue-operator/releases/latest/download/glues.glue-v1.yml)
9+
## [Glue resource](https://github.com/java-operator-sdk/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 `childResources` (sometimes referred to as managed resources) and `related resources`:
@@ -40,16 +40,16 @@ It has several attributes:
4040

4141
At the moment there are two types of built-in conditions provided:
4242

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

4949
### Related resources
5050

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

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

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

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

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

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

7676
### Reconciliation notes
7777

@@ -82,7 +82,7 @@ for a resource that depends on it.
8282

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

85-
## [GlueOperator resource](https://github.com/csviri/kubernetes-glue-operator/releases/latest/download/glueoperators.glue-v1.yml)
85+
## [GlueOperator resource](https://github.com/java-operator-sdk/kubernetes-glue-operator/releases/latest/download/glueoperators.glue-v1.yml)
8686

8787
The specs of `GlueOperator` are almost identical to `Glue`, it just adds some additional attributes:
8888

@@ -94,9 +94,9 @@ The specs of `GlueOperator` are almost identical to `Glue`, it just adds some ad
9494
- **`glueMetadata`** - optionally, you can customize the `Glue` resource created for each parent resource.
9595
This is especially important when the parent is a cluster scoped resource - in that case it is mandatory to set.
9696
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).
9898

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

101101
## Deployment
102102

@@ -105,7 +105,7 @@ the default [configuration options](https://docs.quarkiverse.io/quarkus-operator
105105
defined by QOSDK can be overridden using environment variables.
106106

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

111111
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
144144
to the `Glue` resource when it is created. Since it is not trivial to parse label selectors, in more
145145
complex forms of label selectors (other the ones mentioned above), the labels to add to the `Glue` resources
146146
by a `GlueOperator` needs to be specified explicitly using
147-
[`glue.operator.glue-operator-managed-glue-label`](https://github.com/csviri/kubernetes-glue-operator/blob/main/src/main/java/io/csviri/operator/glue/ControllerConfig.java#L10-L10)
147+
[`glue.operator.glue-operator-managed-glue-label`](https://github.com/java-operator-sdk/kubernetes-glue-operator/blob/main/src/main/java/io/java-operator-sdk/operator/glue/ControllerConfig.java#L10-L10)
148148
config key (which is a type of map). Therefore, for a label selector that specified two values for a glue:
149149

150150
`quarkus.operator-sdk.controllers.glue.selector=mylabel1=value1,mylabel2=value2`
@@ -156,7 +156,7 @@ you need to add the following configuration params:
156156
`glue.operator.glue-operator-managed-glue-label.mylabel2=value2`
157157

158158
This will ensure that the labels are added correctly to the `Glue`. See the related
159-
[integration test](https://github.com/csviri/kubernetes-glue-operator/blob/main/src/test/java/io/csviri/operator/glue/GlueOperatorComplexLabelSelectorTest.java#L23-L23).
159+
[integration test](https://github.com/java-operator-sdk/kubernetes-glue-operator/blob/main/src/test/java/io/java-operator-sdk/operator/glue/GlueOperatorComplexLabelSelectorTest.java#L23-L23).
160160

161161
### Label selectors managed resources
162162

@@ -185,12 +185,12 @@ be continuously improved in the follow-up releases.
185185

186186
## Samples
187187

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.
189189
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`
190190
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.
194194

195195
## Related documents
196196

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
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.glue</groupId>
5+
<groupId>io.javaoperatorsdk.operator.glue</groupId>
66
<artifactId>kubernetes-glue-operator</artifactId>
77
<version>0.4.2-SNAPSHOT</version>
88
<packaging>jar</packaging>

src/main/java/io/csviri/operator/glue/customresource/glue/GlueStatus.java

-7
This file was deleted.

src/main/java/io/csviri/operator/glue/customresource/operator/ResourceFlowOperatorStatus.java

-8
This file was deleted.

src/main/java/io/csviri/operator/glue/ControllerConfig.java src/main/java/io/javaoperatorsdk/operator/glue/ControllerConfig.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.csviri.operator.glue;
1+
package io.javaoperatorsdk.operator.glue;
22

33
import java.util.Map;
44

src/main/java/io/csviri/operator/glue/GlueException.java src/main/java/io/javaoperatorsdk/operator/glue/GlueException.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.csviri.operator.glue;
1+
package io.javaoperatorsdk.operator.glue;
22

33
public class GlueException extends RuntimeException {
44

src/main/java/io/csviri/operator/glue/Main.java src/main/java/io/javaoperatorsdk/operator/glue/Main.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package io.csviri.operator.glue;
1+
package io.javaoperatorsdk.operator.glue;
22

33
import io.quarkus.runtime.Quarkus;
44
import io.quarkus.runtime.annotations.QuarkusMain;

0 commit comments

Comments
 (0)