Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 42 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ Rather than using DNS to resolve the host, the CloudFlare API is queried for the

## Installation

### Gentoo

https://github.com/mark-wagner/portage/tree/master/net-dns/cfdc/cfdc-9999.ebuild

Add =net-dns/cfdc-9999 \*\* to /etc/portage/package.keywords.

Create a configuration file (default is /etc/cfdc.conf). The format is JSON and these are the required keys:
* api\_key - CloudFlare API Key https://www.cloudflare.com/a/account/my-account -> Global API Key
* email - Email address associated with the zone
* api\_token - cloudflare api token with Zone.Zone, Zone.DNS permissions
* name - host name you want to update
* zone - zone (domain) you want to update

Expand All @@ -32,6 +33,45 @@ To have the script start at boot run `rc-update add cfdc default`. The provided

If you changed the location of the log file update /etc/logrotate.d/cfdc.

### Kubernetes

Create a json file cfdc.conf with keys desribed as above.

```
kubectl create secret generic cfdc --from-file cfdc.conf
```

Sample manifest:

```
apiVersion: apps/v1
kind: Deployment
metadata:
name: cfdc
labels:
app: cfdc
spec:
selector:
matchLabels:
app: cfdc
template:
metadata:
labels:
app: cfdc
spec:
containers:
- name: cfdc
image: marklanfearnet/cfdc:latest
volumeMounts:
- name: cfdc
mountPath: /etc/cfdc
readOnly: true
volumes:
- name: cfdc
secret:
secretName: cfdc
```

## License

Distributed under the terms of the GNU General Public License v2
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
requests==2.23.0
requests==2.31.0