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
doc/proposals/helm-operator.md: cleanup and PR feedback updates
* Change `release.ReleaseManager` back to `release.Manager`
* Improve description of `pkg/helm/controller` package
* Clarifying flags and features of `add crd` subcommand
* Clarifying that `test` command is not supproted
* Clarifying `new` command flag requirements and support
Copy file name to clipboardExpand all lines: doc/proposals/helm-operator.md
+20-10Lines changed: 20 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -22,8 +22,8 @@ Packages will be added to the operator-sdk. These packages are designed to be us
22
22
* Will contain a helper function to create a Helm client from `controller-runtime` manager.
23
23
24
24
* /operator-sdk/pkg/helm/controller
25
-
* Will contain the Helm controller.
26
-
* Will contain an exposed reconciler. The default `Add` function will use this reconciler.
25
+
* Will contain an exported `HelmOperatorReconciler` that implements the `controller-runtime``reconcile.Reconciler` interface.
26
+
* Will contain an exported `Add` function that creates a controller using the `HelmOperatorReconciler` and adds watches based on a set of watch options passed to the `Add` function.
27
27
28
28
* /operator-sdk/pkg/helm/engine
29
29
* Will contain a Helm Engine implementation that adds owner references to generated Kubernetes resource assets, which is necessary for garbage collection of Helm chart resources.
@@ -32,18 +32,18 @@ Packages will be added to the operator-sdk. These packages are designed to be us
32
32
* Will contain types and utilities used by other Helm packages in the SDK.
33
33
34
34
* /operator-sdk/pkg/helm/release
35
-
* Will contain the ReleaseManager types and interfaces. A ReleaseManager is responsible for:
35
+
* Will contain the `Manager` types and interfaces. A `Manager` is responsible for:
36
36
* Implementing Helm's Tiller functions that are necessary to install, update, and uninstall releases.
37
37
* Reconciling an existing release's resources.
38
-
* A default ReleaseManager implementation is provided in this package but is not exported.
38
+
* A default `Manager` implementation is provided in this package but is not exported.
39
39
* Package functions:
40
-
*NewReleaseManager - function that returns a new ReleaseManager for a provided helm chart.
41
-
*NewReleaseManagersFromEnv - function that returns a map of GVK to ReleaseManager types based on environment variables.
42
-
*NewReleaseManagersFromFile - function that returns a map of GVK to ReleaseManager types based on a provided config file.
40
+
*`NewManager` - function that returns a new Manager for a provided helm chart.
41
+
*`NewManagersFromEnv` - function that returns a map of GVK to Manager types based on environment variables.
42
+
*`NewManagersFromFile` - function that returns a map of GVK to Manager types based on a provided config file.
43
43
44
44
### Commands
45
45
46
-
We are adding and updating existing commands to accommodate the helm operator. Changes to the `cmd` package as well as changes to the generator are needed.
46
+
We are adding and updating existing commands to accommodate the Helm operator. Changes to the `cmd` package as well as changes to the generator are needed.
47
47
48
48
#### New
49
49
@@ -53,6 +53,11 @@ New functionality will be updates to allow Helm operator developers to create a
53
53
operator-sdk new <project-name> --type=helm --kind=<kind> --api-version=<group/version>
54
54
```
55
55
56
+
Flags:
57
+
*`--type=helm` is required to create Helm operator project.
58
+
***Required:** --kind - the kind for the CRD.
59
+
***Required:** --api-version - the group/version for the CRD.
60
+
56
61
This will be new scaffolding for the above command under the hood. We will:
57
62
* Create a `./<project-name>` directory.
58
63
* Create a `./<project-name>/helm-charts` directory.
@@ -93,14 +98,15 @@ The SDK CLI will use the presence of the `helm-charts` directory to detect a `he
93
98
Add functionality will be updated to allow Helm operator developers to add new CRDs/CRs and to update the watches.yaml file for additional Helm charts. The command helps when a user wants to watch more than one CRD for their operator.
***Required:** --api-version - the group/version for the CRD.
107
+
***Optional:** --update-watches - whether or not to update watches.yaml file (default: false).
102
108
103
-
**NOTE:**`operator-sdk add` subcommands `api` and `controller` will not be supported, since they are only valid for Go operators.
109
+
**NOTE:**`operator-sdk add` subcommands `api` and `controller` will not be supported, since they are only valid for Go operators. Running these subcommands in a Helm operator project will result in an error.
104
110
105
111
#### Up
106
112
@@ -120,6 +126,10 @@ Build functionality will be updated to support building a docker image from the
120
126
operator-sdk build <image-name>
121
127
```
122
128
129
+
#### Test
130
+
131
+
The SDK `test` command currently only supports Go projects, so there will be no support for the `operator-sdk test` subcommand in the initial integration of the Helm operator.
132
+
123
133
### Base Image
124
134
125
135
The SDK team will maintain a build job for the `helm-operator` base image with the following tagging methodology:
0 commit comments