-
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
📝 Move samples to its own directories
Add kustomization.yaml for ease of use
- Loading branch information
Showing
10 changed files
with
111 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# New tunnel | ||
apiVersion: networking.cfargotunnel.com/v1alpha1 | ||
kind: ClusterTunnel | ||
metadata: | ||
name: new-tunnel | ||
spec: | ||
newTunnel: | ||
name: new-k8s-cluster-tunnel | ||
size: 2 | ||
cloudflare: | ||
domain: example.com | ||
secret: cloudflare-secrets | ||
# accountId and accountName cannot be both empty. If both are provided, Account ID is used if valid, else falls back to Account Name. | ||
email: [email protected] | ||
accountName: <Cloudflare account name> | ||
accountId: <Cloudflare account ID> | ||
# CLOUDFLARE_API_TOKEN: <override key to be used reading from secret> | ||
# CLOUDFLARE_API_KEY: <override key to be used reading from secret> | ||
# --- | ||
# # Existing tunnel | ||
# apiVersion: networking.cfargotunnel.com/v1alpha1 | ||
# kind: ClusterTunnel | ||
# metadata: | ||
# name: existing-tunnel | ||
# spec: | ||
# existingTunnel: | ||
# # id and name cannot be both empty. If both are provided, Tunnel ID is used if valid, else falls back to Tunnel Name. | ||
# id: <tunnel ID> | ||
# name: <tunnel Name> | ||
# size: 2 | ||
# cloudflare: | ||
# domain: example.com | ||
# secret: cloudflare-secrets | ||
# # accountId and accountName cannot be both empty. If both are provided, Account ID is used if valid, else falls back to Account Name. | ||
# accountName: <Cloudflare account name> | ||
# accountId: <Cloudflare account ID> | ||
# # CLOUDFLARE_API_KEY: <override key to be used reading from secret> | ||
# # CLOUDFLARE_TUNNEL_CREDENTIAL_FILE: <override key to be used reading from secret> | ||
# # CLOUDFLARE_TUNNEL_CREDENTIAL_SECRET: <override key to be used reading from secret> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace: test-cloudflare-operator-cluster-tunnel | ||
namePrefix: test-cloudflare-operator-cluster-tunnel- | ||
|
||
resources: | ||
- "./namespace.yaml" | ||
- "./secrets.yaml" | ||
- "./crd.yaml" | ||
- "./service.yaml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: cloudflare-secrets | ||
namespace: cloudflare-operator-system # For a default installation, this will be the namespace for cluster resources | ||
type: Opaque | ||
data: | ||
CLOUDFLARE_API_TOKEN: <API Key, base64 encoded> | ||
CLOUDFLARE_API_KEY: <API Key, base64 encoded> | ||
# CREDENTIAL_FILE is used if found, else CREDENTIAL_SECRET is used to build the file. | ||
# Either of them is needed when using an existing tunnel | ||
CLOUDFLARE_TUNNEL_CREDENTIAL_FILE: <~/.cloudflared/tunnelID.json, base64 encoded> | ||
CLOUDFLARE_TUNNEL_CREDENTIAL_SECRET: <TunnelSecret from ~/.cloudflared/tunnelID.json, base64 encoded> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: whoami | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: whoami | ||
template: | ||
metadata: | ||
labels: | ||
app: whoami | ||
spec: | ||
containers: | ||
- name: whoami | ||
image: traefik/whoami | ||
resources: | ||
limits: | ||
memory: "128Mi" | ||
cpu: "500m" | ||
ports: | ||
- containerPort: 80 | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: whoami-test | ||
annotations: | ||
cfargotunnel.com/cluster-tunnel: new-tunnel | ||
spec: | ||
selector: | ||
app: whoami | ||
ports: | ||
- port: 80 | ||
targetPort: 80 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace: test-cloudflare-operator-tunnel-app | ||
namePrefix: test-cloudflare-operator-tunnel- | ||
|
||
resources: | ||
- "./namespace.yaml" | ||
- "./secrets.yaml" | ||
- "./crd.yaml" | ||
- "./service.yaml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: app |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters