Skip to content

Commit

Permalink
Improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rxbn committed Mar 18, 2023
1 parent 0502e68 commit 42f53b3
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 4 deletions.
34 changes: 30 additions & 4 deletions content/en/docs/cloudflare-operator/get_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,42 @@ The following prerequisites are required to complete this tutorial:

{{% alert color="warning" %}}
**Attention!** :warning:
Note that after a successful installation and configuration, cloudflare-operator will delete **ALL** DNS records in **EVERY ZONE** to which the API token has access!
Note that after a successful installation and configuration, cloudflare-operator will delete **ALL** DNS records in **EVERY ZONE** to which the API token has access!
It is therefore highly recommended to <a href="https://developers.cloudflare.com/dns/manage-dns-records/how-to/import-and-export/#export-records" target="blank">export your existing DNS records</a> first!
{{% /alert %}}

## Create Cloudflare API token

The token can be created by following <a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/" target="blank">this guide</a>.

The following permissions are required:

- `Zone:Zone:Read`
- `Zone:DNS:Edit`

Configure the following `Zone resources`:

- `Include:All zones`

or, if you want to limit the zones to which the token has access:

- `Include:Specific zone:example.com`

The summary should look similar to this:

`All zones - Zone:Read, DNS:Edit`

## Configure Cloudflare account

Create a secret with the Cloudflare API token. The token can be created by following <a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/" target="blank">this guide</a>.
Create a secret with the previously created Cloudflare API token.

{{% alert color="info" %}}
**Note**
The key in the secret must be named `apiToken`.
{{% /alert %}}

```yaml
---
apiVersion: v1
kind: Secret
type: Opaque
Expand All @@ -42,6 +64,7 @@ stringData:
Next, create an account object:

```yaml
---
apiVersion: cf.containeroo.ch/v1beta1
kind: Account
metadata:
Expand All @@ -54,8 +77,10 @@ spec:
```

{{% alert color="warning" %}}
**Attention!** :warning:
After this step, cloudflare-operator will delete **ALL** DNS records in **EVERY ZONE** to which the API token has access!
:warning: **BE CAREFUL!** :warning:
Did you export your existing DNS records?
After creating the account, cloudflare-operator will delete **ALL** DNS records in **EVERY ZONE** to which the API token has access!
This is your last chance to <a href="https://developers.cloudflare.com/dns/manage-dns-records/how-to/import-and-export/#export-records" target="blank">export your existing DNS records</a>!
{{% /alert %}}

Check if the account is ready:
Expand Down Expand Up @@ -85,6 +110,7 @@ example-com example.com 12345678901234567890123456789012 True
Now, we can create our first DNS record:

```yaml
---
apiVersion: cf.containeroo.ch/v1beta1
kind: DNSRecord
metadata:
Expand Down
1 change: 1 addition & 0 deletions content/en/docs/cloudflare-operator/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ A full list of all supported Helm values can be found <a href="https://artifacth
Example `values.yaml` file:

```yaml
---
image:
repository: ghcr.io/containeroo/cloudflare-operator
tag: latest
Expand Down

0 comments on commit 42f53b3

Please sign in to comment.