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: README.md
+3-23Lines changed: 3 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,32 +4,17 @@
4
4
5
5
## Overview
6
6
---
7
-
This project is a small tool to produce Go Operators corresponding to Helm Charts in a reproducible and scalable way. Read more about the design in the [design doc](docs/Design.md).
7
+
Helm2Go-Operator-SDK (H2Go) is a tool which creates the scaffold for Go Operators corresponding to Helm Charts in a reproducible and scalable way. Read more about the design in the [design doc](docs/Design.md).
8
8
9
9
[Helm](https://github.com/helm/helm) is a tool used for managing Kubernetes charts. Charts are packages of pre-configured Kubernetes resources. Helm allows for versioning and distribution of native Kubernetes applications.
10
10
11
11
Go Operators are native Kubernetes applications used to deploy, upgrade, and manage other Kubernetes applications.
12
12
13
-
14
-
## Workflow
15
-
---
16
-
The tool provides the following workflow to develop operators in Go from corresponding Helm Charts:
17
-
18
-
1. Identify Helm Chart
19
-
* Tool supports local charts
20
-
* Tool supports external charts i.e. those hosted on external repositories
21
-
2. Specify the neccessary resource, and the API is generated adding Custom Resource Definitions (CRDs)
22
-
3.*Supported* Kubernetes Resources Controllers are automatically generated
23
-
4. User must write the reconciling logic for the controller using the [Operator-SDK](https://github.com/operator-framework/operator-sdk) and [controller-runtime](https://godoc.org/sigs.k8s.io/controller-runtime) APIs.
24
-
5. Use the [Operator-SDK](https://github.com/operator-framework/operator-sdk) CLI to build and generate the operator deployment manifests.
25
-
26
-
27
13
## Prerequisites
28
14
---
29
15
*[git](https://git-scm.com/downloads)
30
16
*[go](https://golang.org/dl/) version v1.12+
31
17
*[operator-sdk](https://github.com/operator-framework/operator-sdk) version v0.8+
32
-
*[dep](https://golang.github.io/dep/docs/installation.html) version v0.5.0+
33
18
34
19
35
20
## Quick Start
@@ -39,14 +24,12 @@ In the following example, we will create an nginx-operator using the existing [B
39
24
### Create, Build and Deploy an *nginx-operator* from Local Chart
40
25
```
41
26
# Create an nginx-operator that defines the Ngnix CR
$ helm2go-operator-sdk new nginx-operator --helm-chart=/path/to/nginx --api-version=web.example.com/v1alpha1 --kind=Ngnix
45
29
# Enter operator directory
46
30
$ cd nginx-operator
47
31
48
32
# Build the operator
49
-
$ export GO111MODULE=off
50
33
$ operator-sdk build quay.io/example/image
51
34
$ docker push quay.io/example/image
52
35
@@ -90,7 +73,4 @@ Deployment
90
73
```
91
74
If attempting to parse a Kubernetes resource other than the ones listed above the tool will prompt the user to either `continue` code generation without the unsupported resources or `stop` the code generation all together.
92
75
93
-
94
-
## Common Problems
95
-
---
96
-
If you are experiencing build errors: `go: error loading module requirements`, execute the following command `export GO111MODULES=off` within the operator folder.
76
+
*Note:* H2Go currently only supports non-deprecated resources. Thus, API Versions such as `apiVersion: extensions/v1beta1` should be updated to `apiVersion: apps/v1` or similar.
0 commit comments