Skip to content

Commit 3769057

Browse files
authored
Mention kustomize and RBAC in Ansible tutorial (#5796)
* Mention `kustomize` and RBAC in Ansible tutorial Fixes #5731 Fixes #5730 Signed-off-by: Austin Macdonald <[email protected]> * alphabetize link list for sanity Signed-off-by: Austin Macdonald <[email protected]>
1 parent b7efd52 commit 3769057

File tree

1 file changed

+20
-8
lines changed
  • website/content/en/docs/building-operators/ansible

1 file changed

+20
-8
lines changed

website/content/en/docs/building-operators/ansible/tutorial.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ This memcached role will:
103103
- Set the Deployment size
104104
105105
Note that the tasks in this Ansible role file are what actually defines the behavior of the spec and status of the memcached custom resource.
106-
As Kubernetes allows entry of arbitrary fields when creating resources, we don't need to actually create specific fields in the CRD.
106+
As Kubernetes allows entry of arbitrary fields when creating resources, we don't need to actually create specific fields in the CRD.
107107
While we won't be doing this in this tutorial, it is recommended to also define these fields in the CRD, so that Kubernetes users
108108
can see the fields that will be used when using the custom resource.
109109
It is also good practice to set default values for variables used in Ansible
@@ -178,7 +178,18 @@ make install run
178178

179179
By default, a new namespace is created with name `<project-name>-system`, ex. `memcached-operator-system`, and will be used for the deployment.
180180

181-
Run the following to deploy the operator. This will also install the RBAC manifests from `config/rbac`.
181+
The scaffolded `Makefile` uses [`kustomize`][kustomize-docs] to apply
182+
custom configurations and generate manifests from the `config/`
183+
directory, which are piped to `kubectl`.
184+
185+
```sh
186+
kustomize build config/default | kubectl apply -f -
187+
```
188+
189+
Commonly, Operator authors may need to modify `config/rbac` in order to
190+
give their Operator the necessary permissions to reconcile.
191+
192+
Run the following to customize the manifests and deploy the operator.
182193

183194
```sh
184195
make deploy
@@ -348,14 +359,15 @@ https://github.com/operator-framework/operator-sdk/issues/3447
348359

349360
OLM will manage creation of most if not all resources required to run your operator, using a bit of setup from other operator-sdk commands. Check out the [OLM integration guide][tutorial-bundle].
350361

351-
[legacy-quickstart-doc]:https://v0-19-x.sdk.operatorframework.io/docs/ansible/quickstart/
352-
[migration-guide]:/docs/building-operators/ansible/migration
353-
[install-guide]:/docs/building-operators/ansible/installation
354-
[image-reg-config]:/docs/olm-integration/cli-overview#private-bundle-and-catalog-image-registries
355362
[ansible-developer-tips]:/docs/building-operators/ansible/development-tips/
356363
[ansible-watches]:/docs/building-operators/ansible/reference/watches
357364
[custom-resources]:https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/
358-
[layout-doc]:/docs/building-operators/ansible/reference/scaffolding
359365
[doc-bundle]:https://github.com/operator-framework/operator-registry/blob/v1.16.1/docs/design/operator-bundle.md#operator-bundle
360-
[tutorial-bundle]:/docs/olm-integration/tutorial-bundle
361366
[doc-olm]:/docs/olm-integration/tutorial-bundle/#enabling-olm
367+
[image-reg-config]:/docs/olm-integration/cli-overview#private-bundle-and-catalog-image-registries
368+
[install-guide]:/docs/building-operators/ansible/installation
369+
[layout-doc]:/docs/building-operators/ansible/reference/scaffolding
370+
[legacy-quickstart-doc]:https://v0-19-x.sdk.operatorframework.io/docs/ansible/quickstart/
371+
[kustomize-docs]:https://kustomize.io/
372+
[migration-guide]:/docs/building-operators/ansible/migration
373+
[tutorial-bundle]:/docs/olm-integration/tutorial-bundle

0 commit comments

Comments
 (0)