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
* change `add api` to `add crd`
* clarify that `helm-charts` directory will be used to detect that
operator type is `helm`
* add base image build and tag plan
Copy file name to clipboardExpand all lines: doc/proposals/helm-operator.md
+15-5Lines changed: 15 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
### Background
4
4
5
-
As was mentioned in the [Ansible Operator Proposal](./ansible-operator.md), not everyone is a golang developer, so the SDK needs to support other types of operators to gain adoption across a wider community of users.
5
+
As was mentioned in the [Ansible Operator Proposal](./ansible-operator.md), not everyone is a golang developer, so the SDK needs to support other types of operators to gain adoption across a wider community of users.
6
6
7
7
[Helm](https://helm.sh/) is one of the most widely-used tools for Kubernetes application management, and it bills itself as the "package manager for Kubernetes." Operators serve a nearly identical function, but they improve on Helm's concepts by incorporating an always-on reconciliation loop rather than relying on an imperative user-driven command line tool. By integrating Helm's templating engine and release management into an operator, the SDK will further increase the number of potential users by adding the ability to deploy Charts (e.g. from Helm's [large catalog of existing Charts](https://github.com/helm/charts)) as operators with very little extra effort.
8
8
@@ -86,19 +86,21 @@ The resulting structure will be:
86
86
| | <gvk>_cr.yaml
87
87
```
88
88
89
+
The SDK CLI will use the presence of the `helm-charts` directory to detect a `helm` type project.
90
+
89
91
#### Add
90
92
91
93
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.
92
94
93
95
```
94
-
operator-sdk add api --api-version=<group>/<version> --kind=<kind>
***Required:** --api-version - the group/version for the CRD.
100
102
101
-
**NOTE:**`operator-sdk addcontroller` will not be supported, since it doesn't make sense for a Helm operator.
103
+
**NOTE:**`operator-sdk add` subcommands `api` and `controller` will not be supported, since they are only valid for Go operators.
102
104
103
105
#### Up
104
106
@@ -118,10 +120,18 @@ Build functionality will be updated to support building a docker image from the
118
120
operator-sdk build <image-name>
119
121
```
120
122
123
+
### Base Image
124
+
125
+
The SDK team will maintain a build job for the `helm-operator` base image with the following tagging methodology:
126
+
* Builds on the master branch that pass nightly CI tests will be tagged with `:master`
127
+
* Builds for tags that pass CI will be tagged with `:<tag>`. If the tag is also the greatest semantic version for the repository, the image will also be tagged with `:latest`.
128
+
129
+
The go binary included in the base image will be built with `GOOS=linux` and `GOARCH=amd64`.
130
+
131
+
The base image repository will be `quay.io/water-hole/helm-operator`.
132
+
121
133
### Observations and open questions
122
134
123
135
* There will be a large amount of overlap in the `operator-sdk` commands for the Ansible and Helm operators. We should take care to extract the resusable features of the Ansible operator commands into a shared library, usable by both Helm and Ansible commands.
124
136
125
-
* This proposal assumes that a Helm Operator base image will be available for building Helm operator projects. What generates the Helm operator base image and what is the registry, image name, versioning, etc.?
126
-
127
137
* There is a moderate amount of complexity already related to how operator types are handled between the `go` and `ansible` types. With the addition of a third type, there may need to be a larger design proposal for operator types. For example, do we need to define an `Operator` interface that each of the operator types can implement for flag verification, scaffolding, project detection, etc.?
0 commit comments