Skip to content

Commit

Permalink
Merge pull request #67 from 3scale/fix-tenant-doc
Browse files Browse the repository at this point in the history
fix tenant doc
  • Loading branch information
eguzki authored Feb 28, 2019
2 parents cc41075 + 4b607f0 commit f23a844
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
2 changes: 1 addition & 1 deletion doc/api-crd-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ CRD Diagram:

### Tenant Secret

The credentials are typically provided by the [Tenant Controller](/doc/tenant-crd-reference.md)
The credentials are typically provided by the [Tenant Controller](/doc/tenant-reference.md)
and stored in a secret, defined by the tenant CR.

But this Secret can also be created by the user following this schema:
Expand Down
27 changes: 22 additions & 5 deletions doc/user-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,24 @@ solution in the "operator-test" project
Deploying the *APIManager* custom resource (see section above) creates a default tenant.
Optionally, you may create other tenants deploying **Tenant custom resource** objects.

To deploy a new tenant in your 3scale instance, create a new YAML file with the following content:
To deploy a new tenant in your 3scale instance, first, create secret to store admin password:

```sh
$ cat ecorp-admin-secret.yaml
apiVersion: v1
kind: Secret
metadata:
name: ecorp-admin-secret
type: Opaque
stringData:
admin_password: <admin password value>
$ oc create -f ecorp-admin-secret.yaml
secret/ecorp-admin-secret created
```

then, create a new Tenant CR YAML file with the following content:

```yaml
apiVersion: capabilities.3scale.net/v1alpha1
Expand All @@ -201,7 +218,7 @@ spec:

To look at more information on what the Tenant Custom Resource fields and
possible values are refer to
the [Tenant CRD Reference](tenant-crd-reference.md) documentation.
the [Tenant CRD Reference](tenant-reference.md) documentation.

```sh
export NAMESPACE="operator-test"
Expand Down Expand Up @@ -266,7 +283,7 @@ spec:
In all the Selectors (metric, plan, mappingrules...) we use a specific label "api: api01", you can change that and add as many labels and play with the selectors to cover really complex scenarios.
We should add a Plan:
We should add a Plan:
```yaml
apiVersion: capabilities.3scale.net/v1alpha1
Expand Down Expand Up @@ -303,7 +320,7 @@ spec:
```
A simple limit with a limit of 10 hits per day for the previous metric:
A simple limit with a limit of 10 hits per day for the previous metric:
```yaml
apiVersion: capabilities.3scale.net/v1alpha1
Expand Down Expand Up @@ -356,7 +373,7 @@ As you can see, the binding object will reference the `ecorp-tenant-secret` and
Now, navigate to your new created 3scale Tenant, and check that everything has been created!
For more information, check the reference doc: [Capabilities CRD Reference](api-crd-reference.md)
## Cleanup
Delete the created custom resources:
Expand Down

0 comments on commit f23a844

Please sign in to comment.