Skip to content

Commit 5a59e2d

Browse files
adyanthcyclingwithelephants
authored andcommitted
fixup: docs (#157)
1 parent 505e58b commit 5a59e2d

9 files changed

Lines changed: 56 additions & 51 deletions

File tree

docs/configuration/tunnel-and-cluster-tunnel.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ The Tunnel and the ClusterTunnel have the exact same configuration options. The
77
kubectl explain tunnel.spec
88
```
99

10-
Here is an overview of a ClusterTunnel as YAML.
10+
Here is an overview of a ClusterTunnel as YAML for `v1alpha2`. Also look at migration docs for [`v1alpha1`](../migrations/crd/v1alpha2.md)
1111

1212
```yaml
13-
apiVersion: networking.cfargotunnel.com/v1alpha1
13+
apiVersion: networking.cfargotunnel.com/v1alpha2
1414
kind: ClusterTunnel # or Tunnel
1515
metadata:
1616
name: tunnel-cr-name
@@ -43,8 +43,14 @@ spec:
4343

4444
# cloudflared configuration
4545
fallbackTarget: http_status:404 # The default service to point cloudflared to. Defaults to http_status:404
46-
image: cloudflare/cloudflared:2025.4.0 # Image to run. Used for running an up-to-date image. Can be swapped out to an arm based image if needed
4746
noTlsVerify: false # Disables the TLS verification to backend services globally
4847
originCaPool: homelab-ca # Secret containing CA certificates to trust. Must contain tls.crt to be trusted globally and optionally other certificates (see the caPool service annotation for usage)
49-
size: 1 # Replica count for the tunnel deployment
48+
deployPatch: |
49+
spec:
50+
replicas: 2
51+
template:
52+
spec:
53+
containers:
54+
- name: cloudflared
55+
image: cloudflare/cloudflared:2025.4.0 # Image to run. Used for running a pinned image. Can be swapped out to an arm based image if needed
5056
```

docs/examples/tunnel-binding-simple/manifests/cloudflare-operator/cluster-tunnel.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
apiVersion: networking.cfargotunnel.com/v1alpha1
1+
apiVersion: networking.cfargotunnel.com/v1alpha2
22
kind: ClusterTunnel
33
metadata:
44
name: k3s-cluster-tunnel # The ClusterTunnel Custom Resource Name
55
spec:
66
newTunnel:
77
name: my-k8s-tunnel # Name of your new tunnel on Cloudflare
8-
size: 2 # This is the number of replicas for cloudflared
98
cloudflare:
109
email: email@example.com # Your email used to login to the Cloudflare Dashboard
1110
domain: example.com # Domain under which the tunnel runs and adds DNS entries to

docs/examples/tunnel-binding-with-reverse-proxy/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ This assumes:
8989
- in `manifests/hello/ingress.yaml`
9090
- `<domain>`: the domain associated with the cloudflare zone you are managing.
9191
This should match your tunnel/clusterTunnel.
92-
- in `manifests/tunnel-binding.yaml`
92+
- in `manifests/cloudflare-operator/tunnel-binding.yaml`
9393
- `<domain>`: the domain associated with the cloudflare zone you are managing.
9494
This should match your tunnel/clusterTunnel.
9595
1. deploy the TunnelBinding
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: networking.cfargotunnel.com/v1alpha2
2+
kind: ClusterTunnel
3+
metadata:
4+
name: example-tunnel # The ClusterTunnel Custom Resource Name
5+
spec:
6+
newTunnel:
7+
name: my-k8s-tunnel # Name of your new tunnel on Cloudflare
8+
cloudflare:
9+
email: email@example.com # Your email used to login to the Cloudflare Dashboard
10+
domain: example.com # Domain under which the tunnel runs and adds DNS entries to
11+
secret: cloudflare-secrets # The secret created before
12+
# accountId and accountName cannot be both empty. If both are provided, Account ID is used if valid, else falls back to Account Name.
13+
accountName: <Cloudflare account name>
14+
accountId: <Cloudflare account ID>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
apiVersion: networking.cfargotunnel.com/v1alpha1
2+
kind: TunnelBinding
3+
metadata:
4+
name: ingress-nginx
5+
subjects:
6+
# this example assumes you are exposing services with your reverse proxy without certificates.
7+
# In general this is not recommended
8+
- name: wildcard
9+
spec:
10+
fqdn: "*.<domain>"
11+
target: http://ingress-nginx-controller.ingress-nginx.svc.cluster.local:80
12+
noTlsVerify: true
13+
14+
# # this example assumes you are generating certificates for your reverse proxy using e.g. cert-manager
15+
# # you should use only one of the following two configurations, not both.
16+
# - name: wildcard
17+
# spec:
18+
# fqdn: "*.<domain>"
19+
# target: https://ingress-nginx-controller.ingress-nginx.svc.cluster.local:443
20+
21+
tunnelRef:
22+
kind: ClusterTunnel
23+
name: example-tunnel

docs/examples/tunnel-binding-with-reverse-proxy/manifests/tunnel-binding.yaml

Lines changed: 0 additions & 23 deletions
This file was deleted.

docs/examples/tunnel-simple/manifests/tunnel.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
apiVersion: networking.cfargotunnel.com/v1alpha1
1+
apiVersion: networking.cfargotunnel.com/v1alpha2
22
kind: Tunnel
33
metadata:
44
name: example-tunnel
55
spec:
66
newTunnel:
77
name: example-tunnel
8-
size: 1
98
cloudflare:
109
email: <email-address>
1110
domain: <domain>

docs/getting-started.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,12 @@ kubectl apply -k 'https://github.com/adyanth/cloudflare-operator/config/default'
6363
Now that the operator is installed, we can make it useful.
6464

6565
1. [Deploy a secret with your API token](./docs/examples/operator-authentication)
66-
1. [Create a Tunnel/ClusterTunnel resource](./docs/examples/tunnel-simple)
67-
1. Configure routing for your tunnel by following one of:
66+
2. [Create a Tunnel/ClusterTunnel resource](./docs/examples/tunnel-simple)
67+
3. Configure routing for your tunnel by following one of:
6868
- [configure routing directly (simple)](./docs/examples/tunnel-binding-simple)
6969
- [configure routing with a reverse proxy](./docs/examples/tunnel-binding-with-reverse-proxy)
7070

71-
Look into the documentation in `docs/configuration` to understand various configurable parameters of this operator.
71+
## Additional Info
72+
73+
* Look into the documentation in `docs/configuration` to understand various configurable parameters of this operator.
74+
* Look at migration documentation in `docs/migrations` for upgrades.

docs/migrations.md

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)