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: RELEASE.md
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -25,14 +25,14 @@ process was done to ensure that we have an aligned process under the org (simila
25
25
> **Note**
26
26
> - You will need to have checkout locally from the remote repository the previous branch
27
27
> - Also, ensure that you fetch all tags from the remote `git fetch --all --tags`
28
-
> - Also, if you face issues to generate the release notes you might want to able to sort it out by running i.e.:
28
+
> - Also, if you face issues to generate the release notes you might want to able to sort it out by running i.e.:
29
29
> `go run sigs.k8s.io/kubebuilder-release-tools/notes --use-upstream=false --from=v3.11.0 --branch=release-X`
30
30
31
31
32
32
### Draft a new release from GitHub
33
33
34
34
1. Create a new tag with the correct version from the new `release-<MAJOR.MINOR>` branch
35
-
2. Verify the Release Github Action. It should build the assets and publish in the draft release
35
+
2. Verify the Release Github Action. It should build the assets and publish in the draft release
36
36
3. You also need to manually add the changelog generated above on the release page and publish it. Now, the code source is released !
37
37
38
38
### Update the website docs (https://book.kubebuilder.io/quick-start.html)
@@ -75,7 +75,7 @@ This action will caall the job [./build/.goreleaser.yml](./build/.goreleaser.yml
75
75
Kubebuilder projects requires artifacts which are used to do test with ENV TEST (when we call `make test` target)
76
76
These artifacts can be checked in the service page: https://storage.googleapis.com/kubebuilder-tools
77
77
78
-
The build is made from the branch [tools-releases](https://github.com/kubernetes-sigs/kubebuilder/tree/tools-releases) and the trigger will call the `build/cloudbuild_tools.yaml` passing
78
+
The build is made from the branch [tools-releases](https://github.com/kubernetes-sigs/kubebuilder/tree/tools-releases) and the trigger will call the `build/cloudbuild_tools.yaml` passing
79
79
as argument the architecture and the SO that should be used, e.g:
80
80
81
81
<imgwidth="553"alt="Screenshot 2022-04-30 at 10 15 41"src="https://user-images.githubusercontent.com/7708031/166099666-ae9cd2df-73fe-47f6-a987-464f63df9a19.png">
@@ -91,7 +91,7 @@ These images are can be checked in the consolse, see [here](https://console.clou
91
91
92
92
The project `kube-rbac-proxy` is in the process to be donated to the k8s org. However, it is going on for a long time and then,
93
93
we have no ETA for that to occur. When that occurs we can automate this process. But until there we need to generate these images
94
-
by bumping the versions/tags released by `kube-rbac-proxy` on the branch
94
+
by bumping the versions/tags released by `kube-rbac-proxy` on the branch
Copy file name to clipboardExpand all lines: designs/code-generate-image-plugin.md
+35-35Lines changed: 35 additions & 35 deletions
Original file line number
Diff line number
Diff line change
@@ -8,26 +8,26 @@
8
8
9
9
This proposal defines a new plugin which allow users get the scaffold with the
10
10
required code to have a project that will deploy and manage an image on the cluster following the guidelines and what have been considered as good practices.
11
-
11
+
12
12
## Motivation
13
13
14
-
The biggest part of the Kubebuilder users looking for to create a project that will at the end only deploy an image. In this way, one of the mainly motivations of this proposal is to abstract the complexities to achieve this goal and still giving the possibility of users improve and customize their projects according to their requirements.
14
+
The biggest part of the Kubebuilder users looking for to create a project that will at the end only deploy an image. In this way, one of the mainly motivations of this proposal is to abstract the complexities to achieve this goal and still giving the possibility of users improve and customize their projects according to their requirements.
15
15
16
16
**Note:** This plugin will address requests that has been raised for a while and for many users in the community. Check [here](https://github.com/operator-framework/operator-sdk/pull/2158), for example, a request done in the past for the SDK project which is integrated with Kubebuidler to address the same need.
17
17
18
18
### Goals
19
19
20
20
- Add a new plugin to generate the code required to deploy and manage an image on the cluster
21
21
- Promote the best practices as give example of common implementations
22
-
- Make the process to develop operators projects easier and more agil.
22
+
- Make the process to develop operators projects easier and more agil.
23
23
- Give flexibility to the users and allow them to change the code according to their needs
24
24
- Provide examples of code implementations and of the most common features usage and reduce the learning curve
25
-
25
+
26
26
### Non-Goals
27
27
28
-
The idea of this proposal is provide a facility for the users. This plugin can be improved
28
+
The idea of this proposal is provide a facility for the users. This plugin can be improved
29
29
in the future, however, this proposal just covers the basic requirements. In this way, is a non-goal
30
-
allow extra configurations such as; scaffold the project using webhooks and the controller covered by tests.
30
+
allow extra configurations such as; scaffold the project using webhooks and the controller covered by tests.
31
31
32
32
## Proposal
33
33
@@ -38,12 +38,12 @@ Add the new plugin code generate which will scaffold code implementation to depl
38
38
- Add an EnvVar on the manager manifest (`config/manager/manager.yaml`) which will store the image informed and shows its possibility to users:
39
39
40
40
```yaml
41
-
..
41
+
..
42
42
spec:
43
43
containers:
44
44
- name: manager
45
45
env:
46
-
- name: {{ resource}}-IMAGE
46
+
- name: {{ resource}}-IMAGE
47
47
value: {{image:tag}}
48
48
image: controller:latest
49
49
...
@@ -66,9 +66,9 @@ Add the new plugin code generate which will scaffold code implementation to depl
66
66
}
67
67
```
68
68
69
-
- Add the watch feature for the Deployment managed by the controller:
69
+
- Add the watch feature for the Deployment managed by the controller:
- Add a [marker][markers] in the spec definition to demonstrate how to use OpenAPI schemas validation such as `+kubebuilder:validation:Minimum=1`
89
89
90
-
- Add the specs on the `_types.go` to generate the CRD/CR sample with default values for `ImagePullPolicy` (`Always`), `ContainerPort` (`80`) and the `Replicas Size` (`3`)
90
+
- Add the specs on the `_types.go` to generate the CRD/CR sample with default values for `ImagePullPolicy` (`Always`), `ContainerPort` (`80`) and the `Replicas Size` (`3`)
91
+
92
+
- Add a finalizer implementation with TODO for the CR managed by the controller such as described in the SDK doc [Handle Cleanup on Deletion](https://sdk.operatorframework.io/docs/building-operators/golang/advanced-topics/#handle-cleanup-on-deletion)
91
93
92
-
- Add a finalizer implementation with TODO for the CR managed by the controller such as described in the SDK doc [Handle Cleanup on Deletion](https://sdk.operatorframework.io/docs/building-operators/golang/advanced-topics/#handle-cleanup-on-deletion)
93
-
94
94
### User Stories
95
95
96
-
- I am as user, would like to use a command to scaffold my common need which is deploy an image of my application, so that I do not need to know exactly how to implement it
96
+
- I am as user, would like to use a command to scaffold my common need which is deploy an image of my application, so that I do not need to know exactly how to implement it
97
97
98
-
- I am as user, would like to have a good example code base which uses the common features, so that I can easily learn its concepts and have a good start point to address my needs.
98
+
- I am as user, would like to have a good example code base which uses the common features, so that I can easily learn its concepts and have a good start point to address my needs.
99
99
100
100
- I am as maintainer, would like to have a good example to address the common questions, so that I can easily describe how to implement the projects and/or use the common features.
// ContainerPort specifies the port which will be used by the image container
244
+
// ContainerPort specifies the port which will be used by the image container
245
245
ContainerPortint`json:"container-port,omitempty"`
246
246
247
247
}
@@ -255,8 +255,8 @@ To ensure this implementation a new project example should be generated in the [
255
255
256
256
### Graduation Criteria
257
257
258
-
- The new plugin will only be support `project-version=3`
259
-
- The attribute image with the value informed should be added to the resources model in the PROJECT file to let the tool know that the Resource get done with the common basic code implementation:
258
+
- The new plugin will only be support `project-version=3`
259
+
- The attribute image with the value informed should be added to the resources model in the PROJECT file to let the tool know that the Resource get done with the common basic code implementation:
260
260
261
261
```yaml
262
262
plugins:
@@ -267,34 +267,34 @@ plugins:
267
267
kind: Captain
268
268
version: v1
269
269
image: "<some-registry>/<project-name>:<tag>
270
-
```
270
+
```
271
271
272
-
For further information check the definition agreement register in the comment https://github.com/kubernetes-sigs/kubebuilder/issues/1941#issuecomment-778649947.
272
+
For further information check the definition agreement register in the comment https://github.com/kubernetes-sigs/kubebuilder/issues/1941#issuecomment-778649947.
273
273
274
-
## Open Questions
274
+
## Open Questions
275
275
276
-
1. Should we allow to scaffold the code for an API that is already created for the project?
277
-
No, at least in the first moment to keep the simplicity.
276
+
1. Should we allow to scaffold the code for an API that is already created for the project?
277
+
No, at least in the first moment to keep the simplicity.
278
278
279
279
2. Should we support StatefulSet and Deployments?
280
280
The idea is we start it by using a Deployment. However, we can improve the feature in follow-ups to support more default types of scaffolds which could be like `kubebuilder create api --group=crew --version=v1 --image=myexample:0.0.1 --kind=App --plugins=deploy-image.go.kubebuilder.io/v1beta1 --type=[deployment|statefulset|webhook]`
281
281
282
282
3. Could this feature be useful to other languages or is it just valid to Go based operators?
283
283
284
-
This plugin would is reponsable to scaffold content and files for Go-based operators. In a future, if other language-based operators starts to be supported (either officially or by the community) this plugin could be used as reference to create an equivalent one for their languages. Therefore, it should probably not to be a `subdomain` of `go.kubebuilder.io.`
284
+
This plugin would is reponsable to scaffold content and files for Go-based operators. In a future, if other language-based operators starts to be supported (either officially or by the community) this plugin could be used as reference to create an equivalent one for their languages. Therefore, it should probably not to be a `subdomain` of `go.kubebuilder.io.`
285
285
286
286
For its integration with SDK, it might be valid for the Ansible-based operators where a new `playbook/role` could be generated as well. However, for example, for the Helm plugin it might to be useless. E.g `deploy-image.ansible.sdk.operatorframework.io/v1beta1`
287
287
288
-
4. Should we consider create a separate repo for plugins?
288
+
4. Should we consider create a separate repo for plugins?
289
289
290
-
In the long term yes. However, see that currently, Kubebuilder has not too many plugins yet. And then, and the preliminary support for plugins did not indeed release. For more info see the [Extensible CLI and Scaffolding Plugins][plugins-phase1-design-doc].
290
+
In the long term yes. However, see that currently, Kubebuilder has not too many plugins yet. And then, and the preliminary support for plugins did not indeed release. For more info see the [Extensible CLI and Scaffolding Plugins][plugins-phase1-design-doc].
291
291
292
-
In this way, at this moment, it shows to be a little Premature Optimization. Note that the issue [#2016](https://github.com/kubernetes-sigs/kubebuilder/issues/1378) will check the possibility of the plugins be as separate binaries that can be discovered by the Kubebuilder CLI binary via user-specified plugin file paths. Then, the discussion over the best approach to dealing with many plugins and if they should or not leave in the Kubebuilder repository would be better addressed after that.
292
+
In this way, at this moment, it shows to be a little Premature Optimization. Note that the issue [#2016](https://github.com/kubernetes-sigs/kubebuilder/issues/1378) will check the possibility of the plugins be as separate binaries that can be discovered by the Kubebuilder CLI binary via user-specified plugin file paths. Then, the discussion over the best approach to dealing with many plugins and if they should or not leave in the Kubebuilder repository would be better addressed after that.
293
293
294
-
5. Is Kubebuilder prepared to receive this implementation already?
294
+
5. Is Kubebuilder prepared to receive this implementation already?
295
295
296
296
The [Extensible CLI and Scaffolding Plugins - Phase 1.5](extensible-cli-and-scaffolding-plugins-phase-1-5.md) and the issue #1941 requires to be implemented before this proposal. Also, to have a better idea over the proposed solutions made so for the Plugin Ecosystem see the meta issue [#2016](https://github.com/kubernetes-sigs/kubebuilder/issues/2016)
Copy file name to clipboardExpand all lines: designs/crd_version_conversion.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ This document describes high level design and workflow for supporting multiple v
20
20
21
21
## Hub and Spoke
22
22
23
-
The basic concept is that all versions of an object share the storage. So say if you have versions v1, v2 and v3 of a Kind Toy, kubernetes will use one of the versions to persist the object in stable storage i.e. Etcd. User can specify the version to be used for storage in the Custom Resource definition for that API.
23
+
The basic concept is that all versions of an object share the storage. So say if you have versions v1, v2 and v3 of a Kind Toy, kubernetes will use one of the versions to persist the object in stable storage i.e. Etcd. User can specify the version to be used for storage in the Custom Resource definition for that API.
24
24
25
25
One can think storage version as the hub and other versions as spoke to visualize the relationship between storage and other versions (as shown below in the diagram). The key thing to note is that conversion between storage and other version should be lossless (round trippable). As shown in the diagram below, v3 is the storage/hub version and v1, v2 and v4 are spoke version. The document uses storage version and hub interchangeably.
0 commit comments