Skip to content

Commit aeb87e8

Browse files
committed
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
1 parent cd09a9f commit aeb87e8

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

doc/proposals/helm-operator.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ Packages will be added to the operator-sdk. These packages are designed to be us
2222
* Will contain a helper function to create a Helm client from `controller-runtime` manager.
2323

2424
* /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.
2727

2828
* /operator-sdk/pkg/helm/engine
2929
* 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
3232
* Will contain types and utilities used by other Helm packages in the SDK.
3333

3434
* /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:
3636
* Implementing Helm's Tiller functions that are necessary to install, update, and uninstall releases.
3737
* 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.
3939
* 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.
4343

4444
### Commands
4545

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.
4747

4848
#### New
4949

@@ -53,6 +53,11 @@ New functionality will be updates to allow Helm operator developers to create a
5353
operator-sdk new <project-name> --type=helm --kind=<kind> --api-version=<group/version>
5454
```
5555

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+
5661
This will be new scaffolding for the above command under the hood. We will:
5762
* Create a `./<project-name>` directory.
5863
* 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
9398
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.
9499

95100
```
96-
operator-sdk add crd --api-version=<group>/<version> --kind=<kind>
101+
operator-sdk add crd --api-version=<group>/<version> --kind=<kind> --update-watches=<true|false>
97102
```
98103

99104
Flags:
100105
* **Required:** --kind - the kind for the CRD.
101106
* **Required:** --api-version - the group/version for the CRD.
107+
* **Optional:** --update-watches - whether or not to update watches.yaml file (default: false).
102108

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.
104110

105111
#### Up
106112

@@ -120,6 +126,10 @@ Build functionality will be updated to support building a docker image from the
120126
operator-sdk build <image-name>
121127
```
122128

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+
123133
### Base Image
124134

125135
The SDK team will maintain a build job for the `helm-operator` base image with the following tagging methodology:

0 commit comments

Comments
 (0)