Skip to content

Commit b29b335

Browse files
authored
doc/*,CHANGELOG.md: adding helm operator docs (#783)
* doc/helm: adding helm project layout and user/developer guides * doc: updating CLI reference and user guide for Helm * CHANGELOG.md: add helm operator line * doc/helm: minor example output and formatting changes * doc/helm: updates based on PR feedback * doc/helm/user-guide.md: fixing nits and copy/paste typo * README.md: added Helm workflow * user-guide.md,helm,ansible: update user guides to describe --cluster-scoped scaffold changes
1 parent 5713fe5 commit b29b335

File tree

8 files changed

+842
-7
lines changed

8 files changed

+842
-7
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
### Added
44

5+
- Helm type operator generation support ([#776](https://github.com/operator-framework/operator-sdk/pull/776))
6+
57
### Changed
68

79
- The SDK's Kubernetes Golang dependency versions/revisions have been updated from `v1.11.2` to `v1.12.3`. ([#807](https://github.com/operator-framework/operator-sdk/pull/807))

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ The Operator SDK is a framework that uses the [controller-runtime][controller_ru
2323

2424
## Workflow
2525

26-
The SDK provides workflows to develop operators in Go or Ansible.
26+
The SDK provides workflows to develop operators in Go, Ansible, or Helm.
2727

2828
The following workflow is for a new **Go** operator:
2929
1. Create a new operator project using the SDK Command Line Interface(CLI)
@@ -38,6 +38,12 @@ The following workflow is for a new **Ansible** operator:
3838
3. Use the SDK CLI to build and generate the operator deployment manifests
3939
4. Optionally add additional CRD's using the SDK CLI and repeat steps 2 and 3
4040

41+
The following workflow is for a new **Helm** operator:
42+
1. Create a new operator project using the SDK Command Line Interface(CLI)
43+
2. Create a new (or add your existing) Helm chart for use by the operator's reconciling logic
44+
3. Use the SDK CLI to build and generate the operator deployment manifests
45+
4. Optionally add additional CRD's using the SDK CLI and repeat steps 2 and 3
46+
4147
## Prerequisites
4248

4349
- [dep][dep_tool] version v0.5.0+.
@@ -118,7 +124,7 @@ $ kubectl delete -f deploy/crds/app_v1alpha1_appservice_crd.yaml
118124

119125
To learn more about the writing an operator in Go, see the [user guide][guide].
120126

121-
The SDK also supports developing an operator using Ansible. See the [Ansible operator user guide][ansible_user_guide].
127+
The SDK also supports developing an operator using Ansible or Helm. See the [Ansible][ansible_user_guide] and [Helm][helm_user_guide] operator user guides.
122128

123129
## Samples
124130

@@ -152,3 +158,4 @@ Operator SDK is under Apache 2.0 license. See the [LICENSE][license_file] file f
152158
[kubectl_tool]:https://kubernetes.io/docs/tasks/tools/install-kubectl/
153159
[controller_runtime]: https://github.com/kubernetes-sigs/controller-runtime
154160
[ansible_user_guide]:./doc/ansible/user-guide.md
161+
[helm_user_guide]:./doc/helm/user-guide.md

doc/ansible/user-guide.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@ If you'd like to create your memcached-operator project to be cluster-scoped use
6262
$ operator-sdk new memcached-operator --cluster-scoped --api-version=cache.example.com/v1alpha1 --kind=Memcached --type=ansible
6363
```
6464

65+
Using `--cluster-scoped` will scaffold the new operator with the following modifications:
66+
* `deploy/operator.yaml` - Set `WATCH_NAMESPACE=""` instead of setting it to the pod's namespace
67+
* `deploy/role.yaml` - Use `ClusterRole` instead of `Role`
68+
* `deploy/role_binding.yaml`:
69+
* Use `ClusterRoleBinding` instead of `RoleBinding`
70+
* Set the subject namespace to `REPLACE_NAMESPACE`. This must be changed to the namespace in which the operator is deployed.
71+
6572
### Watches file
6673

6774
The Watches file contains a list of mappings from custom resources, identified

0 commit comments

Comments
 (0)