Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/replicatedhq/kubeflare
A Kubernetes Operator to manage Cloudflare settings via a declarative Kubernetes API
https://github.com/replicatedhq/kubeflare
cloudflare kubernetes kubernetes-operator
Last synced: about 2 months ago
JSON representation
A Kubernetes Operator to manage Cloudflare settings via a declarative Kubernetes API
- Host: GitHub
- URL: https://github.com/replicatedhq/kubeflare
- Owner: replicatedhq
- License: apache-2.0
- Created: 2020-09-02T15:47:17.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-14T12:00:34.000Z (over 2 years ago)
- Last Synced: 2024-04-13T22:20:34.077Z (10 months ago)
- Topics: cloudflare, kubernetes, kubernetes-operator
- Language: Go
- Homepage: https://kubeflare.com
- Size: 271 KB
- Stars: 56
- Watchers: 9
- Forks: 10
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Kubeflare
Kuebflare is a Kubernetes cluster add-on (Operator) that allows you to manage your Cloudflare settings using a Kubernetes declarative API.
After installing the Kubeflare Operator to your Kubernetes cluster, some new custom types will be created in the cluster. These types allow you to define a Cloudflare Zone (domain) and specify the settings and DNS records to create. When this YAML is deployed to the cluster, the Kubeflare Operator will reconcile this with the Cloudflare API to deploy the settings requested in the YAML to the Cloudflare account.
## Motivation
This project was created at [Replicated](https://www.replicated.com) to manage Cloudflare settings using our GitOps workflow. We wanted a way for a devleoper to commit their DNS records and other Cloudflare settings to be reviewed and deployed with their code, as a single deployment. This tightly couples the infrastructure changes with the application changes, and makes deploying new services easier and more transparant.
## Installation
Full instruction and all installation methods are listed in the [documentation](https://kubeflare.com).
## Examples
Below is an example of a Kubernetes manifest that we deploy for a domain (with some information redacted):
```yaml
apiVersion: crds.kubeflare.io/v1alpha1
kind: Zone
metadata:
name: domainname.io
spec:
apiToken: redacted
settings:
alwaysUseHttps: true
alwaysOnline: true
minify:
css: true
---
apiVersion: crds.kubeflare.io/v1alpha1
kind: DNSRecord
metadata:
name: www.domainname.io
spec:
zone: domainname.io
record:
type: "A"
name: "www"
content: "1.1.1.1"
proxied: true
ttl: 3600
---
apiVersion: crds.kubeflare.io/v1alpha1
kind: DNSRecord
metadata:
name: mx-records
spec:
zone: domainname.io
records:
- type: "MX"
name: "domainname.io"
content: "aspmx.l.google.com"
priority: 1
- type: "MX"
name: "domainname.io"
content: "alt1.aspmx.l.google.com"
priority: 5
- type: "MX"
name: "domainname.io"
content: "alt2.aspmx.l.google.com"
priority: 5
- type: "MX"
name: "domainname.io"
content: "alt3.aspmx.l.google.com"
proxied: false
priority: 10
- type: "MX"
name: "domainname.io"
content: "alt4.aspmx.l.google.com"
priority: 10
```## Settings supported
The Cloudflare API is large and supports many settings. Kubeflare doesn't support all yet, but the current release of Kubeflare supports the following settings:
- All [zone settings](https://api.cloudflare.com/#zone-settings-get-all-zone-settings) (all settings listed under "Zone Settings")
- DNS RecordsThis project is independent of Cloudflare and built using their public APIs. This is not a Cloudflare project.