@@ -103,7 +103,7 @@ This memcached role will:
103
103
- Set the Deployment size
104
104
105
105
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.
107
107
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
108
108
can see the fields that will be used when using the custom resource.
109
109
It is also good practice to set default values for variables used in Ansible
@@ -178,7 +178,18 @@ make install run
178
178
179
179
By default, a new namespace is created with name `<project-name>-system`, ex. `memcached-operator-system`, and will be used for the deployment.
180
180
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.
182
193
183
194
` ` ` sh
184
195
make deploy
@@ -348,14 +359,15 @@ https://github.com/operator-framework/operator-sdk/issues/3447
348
359
349
360
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].
350
361
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
355
362
[ansible-developer-tips]:/docs/building-operators/ansible/development-tips/
356
363
[ansible-watches]:/docs/building-operators/ansible/reference/watches
357
364
[custom-resources]:https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/
358
- [layout-doc]:/docs/building-operators/ansible/reference/scaffolding
359
365
[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
361
366
[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