Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Commit 9686d30

Browse files
authored
chore: update differences (#34)
* chore: update differences * chore: update readme titles * chore: update diffs * chore: add a pull request template to avoid multiple PRs next time the project gets updated * chore: prevent changes to PR template to trigger CI
1 parent 74d6808 commit 9686d30

Some content is hidden

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

55 files changed

+149
-115
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches: [main]
66
pull_request:
77
paths-ignore:
8+
- '.github/workflows/pull_request_template.md'
89
- 'doc/**'
910
- 'README.md'
1011

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
## Description
2+
3+
TODO: Describe your changes.
4+
5+
## Checklist
6+
7+
- [ ] ✨ A brand new operator has been created using the new [kubebuilder](https://github.com/kubernetes-sigs/kubebuilder) version.
8+
- [ ] 🧪 The operator was tested agaisnt a local kubernetes cluster.
9+
- [ ] ✏️ The main `README.md` has been updated (especially the `diff` section).
10+
- [ ] ✏️ The [Medium articles](https://medium.com/@leovct/list/kubernetes-operators-101-dcfcc4cb52f6) have been updated.
11+
- [ ] ✏️ The [personal website articles](https://github.com/leovct/leovct.github.io/tree/main/content/posts/kubernetes) have been updated.
12+
- [ ] 🌟 A new release will be created, following [kubebuilder](https://github.com/kubernetes-sigs/kubebuilder)'s versions.

README.md

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,27 @@ diff --color -r operator-v1/api/v1/foo_types.go operator-v2/api/v1/foo_types.go
4848
>
4949
> // Foo's favorite colour
5050
> Colour string `json:"colour,omitempty"`
51-
Binary files operator-v1/bin/kustomize and operator-v2/bin/kustomize differ
52-
Binary files operator-v1/bin/setup-envtest and operator-v2/bin/setup-envtest differ
51+
Only in operator-v2/bin: k8s
52+
Only in operator-v1/bin: kustomize
53+
Binary files operator-v1/bin/manager and operator-v2/bin/manager differ
54+
Only in operator-v2/bin: setup-envtest
5355
diff --color -r operator-v1/config/crd/bases/tutorial.my.domain_foos.yaml operator-v2/config/crd/bases/tutorial.my.domain_foos.yaml
5456
45a46,48
5557
> colour:
5658
> description: Foo's favorite colour
5759
> type: string
60+
Only in operator-v2: cover.out
5861
Only in operator-v2/internal: color
5962
diff --color -r operator-v1/internal/controller/foo_controller.go operator-v2/internal/controller/foo_controller.go
6063
31a32
6164
> "my.domain/tutorial/internal/color"
62-
75a77
65+
76a78
6366
> foo.Status.Colour = color.ConvertStrToColor(foo.Name + foo.Namespace)
67+
diff --color -r operator-v1/internal/controller/suite_test.go operator-v2/internal/controller/suite_test.go
68+
66c66
69+
< fmt.Sprintf("1.28.3-%s-%s", runtime.GOOS, runtime.GOARCH)),
70+
---
71+
> fmt.Sprintf("1.28.0-%s-%s", runtime.GOOS, runtime.GOARCH)),
6472
```
6573

6674
### `v2` <> `v2-with-tests`
@@ -72,12 +80,7 @@ diff --color -r operator-v2/README.md operator-v2-with-tests/README.md
7280
< # operator-v2
7381
---
7482
> # operator-v2-with-tests
75-
Only in operator-v2-with-tests/bin: manager
76-
diff --color -r operator-v2/go.mod operator-v2-with-tests/go.mod
77-
7a8
78-
> k8s.io/api v0.28.0
79-
64d64
80-
< k8s.io/api v0.28.0 // indirect
83+
Binary files operator-v2/bin/manager and operator-v2-with-tests/bin/manager differ
8184
Only in operator-v2-with-tests/internal/color: color_test.go
8285
Only in operator-v2-with-tests/internal/controller: foo_controller_test.go
8386
diff --color -r operator-v2/internal/controller/suite_test.go operator-v2-with-tests/internal/controller/suite_test.go
@@ -100,6 +103,10 @@ diff --color -r operator-v2/internal/controller/suite_test.go operator-v2-with-t
100103
> )
101104
53a61
102105
> ctx, cancel = context.WithCancel(context.TODO())
106+
66c74
107+
< fmt.Sprintf("1.28.0-%s-%s", runtime.GOOS, runtime.GOARCH)),
108+
---
109+
> fmt.Sprintf("1.28.3-%s-%s", runtime.GOOS, runtime.GOARCH)),
103110
83a92,108
104111
> // Register and start the Foo controller
105112
> k8sManager, err := ctrl.NewManager(cfg, ctrl.Options{

operator-v1/PROJECT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
domain: my.domain
66
layout:
77
- go.kubebuilder.io/v4
8-
projectName: operator-v1
8+
projectName: operator
99
repo: my.domain/tutorial
1010
resources:
1111
- api:

operator-v1/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
**Build and push your image to the location specified by `IMG`:**
1717

1818
```sh
19-
make docker-build docker-push IMG=<some-registry>/operator-v1:tag
19+
make docker-build docker-push IMG=<some-registry>/operator:tag
2020
```
2121

2222
**NOTE:** This image ought to be published in the personal registry you specified.
@@ -32,7 +32,7 @@ make install
3232
**Deploy the Manager to the cluster with the image specified by `IMG`:**
3333

3434
```sh
35-
make deploy IMG=<some-registry>/operator-v1:tag
35+
make deploy IMG=<some-registry>/operator:tag
3636
```
3737

3838
> **NOTE**: If you encounter RBAC errors, you may need to grant yourself cluster-admin

operator-v1/config/default/kustomization.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Adds namespace to all resources.
2-
namespace: operator-v1-system
2+
namespace: operator-system
33

44
# Value of this field is prepended to the
55
# names of all resources, e.g. a deployment named
66
# "wordpress" becomes "alices-wordpress".
77
# Note that it should also match with the prefix (text before '-') of the namespace
88
# field above.
9-
namePrefix: operator-v1-
9+
namePrefix: operator-
1010

1111
# Labels to add to all resources and selectors.
1212
#labels:

operator-v1/config/manager/manager.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ metadata:
66
app.kubernetes.io/name: namespace
77
app.kubernetes.io/instance: system
88
app.kubernetes.io/component: manager
9-
app.kubernetes.io/created-by: operator-v1
10-
app.kubernetes.io/part-of: operator-v1
9+
app.kubernetes.io/created-by: operator
10+
app.kubernetes.io/part-of: operator
1111
app.kubernetes.io/managed-by: kustomize
1212
name: system
1313
---
@@ -21,8 +21,8 @@ metadata:
2121
app.kubernetes.io/name: deployment
2222
app.kubernetes.io/instance: controller-manager
2323
app.kubernetes.io/component: manager
24-
app.kubernetes.io/created-by: operator-v1
25-
app.kubernetes.io/part-of: operator-v1
24+
app.kubernetes.io/created-by: operator
25+
app.kubernetes.io/part-of: operator
2626
app.kubernetes.io/managed-by: kustomize
2727
spec:
2828
selector:

operator-v1/config/prometheus/monitor.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ metadata:
77
app.kubernetes.io/name: servicemonitor
88
app.kubernetes.io/instance: controller-manager-metrics-monitor
99
app.kubernetes.io/component: metrics
10-
app.kubernetes.io/created-by: operator-v1
11-
app.kubernetes.io/part-of: operator-v1
10+
app.kubernetes.io/created-by: operator
11+
app.kubernetes.io/part-of: operator
1212
app.kubernetes.io/managed-by: kustomize
1313
name: controller-manager-metrics-monitor
1414
namespace: system

operator-v1/config/rbac/auth_proxy_client_clusterrole.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ metadata:
55
app.kubernetes.io/name: clusterrole
66
app.kubernetes.io/instance: metrics-reader
77
app.kubernetes.io/component: kube-rbac-proxy
8-
app.kubernetes.io/created-by: operator-v1
9-
app.kubernetes.io/part-of: operator-v1
8+
app.kubernetes.io/created-by: operator
9+
app.kubernetes.io/part-of: operator
1010
app.kubernetes.io/managed-by: kustomize
1111
name: metrics-reader
1212
rules:

operator-v1/config/rbac/auth_proxy_role.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ metadata:
55
app.kubernetes.io/name: clusterrole
66
app.kubernetes.io/instance: proxy-role
77
app.kubernetes.io/component: kube-rbac-proxy
8-
app.kubernetes.io/created-by: operator-v1
9-
app.kubernetes.io/part-of: operator-v1
8+
app.kubernetes.io/created-by: operator
9+
app.kubernetes.io/part-of: operator
1010
app.kubernetes.io/managed-by: kustomize
1111
name: proxy-role
1212
rules:

0 commit comments

Comments
 (0)