Skip to content

Commit

Permalink
Merge pull request #172 from GiganticMinecraft/add-cloudflared-mcserv…
Browse files Browse the repository at this point in the history
…er-helm-chart

proxy-kubernetes-cloudflared-redis chart を追加
  • Loading branch information
kory33 authored Mar 26, 2022
2 parents f34c9d2 + b75726b commit 27591cc
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 0 deletions.
5 changes: 5 additions & 0 deletions helm-charts/proxy-kubernetes-cloudflared-redis/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v2
name: proxy-kubernetes-cloudflared-redis
version: "1.0.0"
maintainers:
- name: GiganticMinecraft
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: cloudflared-redis--{{ .Values.RedisServerName }}
labels:
app: cloudflared-redis--{{ .Values.RedisServerName }}
appgroup: cloudflared
release-namespace: {{ .Release.Namespace }}
spec:
replicas: 1
selector:
matchLabels:
app: cloudflared-redis--{{ .Values.RedisServerName }}
appgroup: cloudflared
release-namespace: {{ .Release.Namespace }}
template:
metadata:
labels:
app: cloudflared-redis--{{ .Values.RedisServerName }}
appgroup: cloudflared
release-namespace: {{ .Release.Namespace }}
spec:
containers:
- name: cloudflared-redis--{{ .Values.RedisServerName }}
image: cloudflare/cloudflared:2021.12.1
args:
- access
- tcp
- --loglevel
- debug
- --hostname
- redis--{{ .Values.RedisServerName }}.{{ .Values.subdomain }}.seichi.click
- --url
- 0.0.0.0:6379
env:
- name: TUNNEL_SERVICE_TOKEN_ID
valueFrom:
secretKeyRef:
name: cloudflared-access-token
key: TUNNEL_SERVICE_TOKEN_ID
- name: TUNNEL_SERVICE_TOKEN_SECRET
valueFrom:
secretKeyRef:
name: cloudflared-access-token
key: TUNNEL_SERVICE_TOKEN_SECRET
ports:
- containerPort: 6379
name: redis
readinessProbe:
initialDelaySeconds: 15
periodSeconds: 5
timeoutSeconds: 1
successThreshold: 2
failureThreshold: 2
tcpSocket:
port: 6379
resources:
requests:
memory: 64Mi
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: cloudflared-redis--{{ .Values.RedisServerName }}
spec:
type: ClusterIP
ports:
- name: redis
port: 6379
protocol: TCP
targetPort: 6379
selector:
app: cloudflared-redis--{{ .Values.RedisServerName }}
appgroup: cloudflared
release-namespace: {{ .Release.Namespace }}
7 changes: 7 additions & 0 deletions helm-charts/proxy-kubernetes-cloudflared-redis/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# プロキシされる先のRedisサーバーの識別子。
RedisServerName: "redisbungee"
# ホスト名の seichi.click 以下のサブドメイン名。
subdomain: "tcp-network"
# この二つの設定で、プロキシ先の hostname が
# redis--{{ .Values.RedisServerName }}.{{ .Values.subdomain }}.seichi.click
# のように設定される。

0 comments on commit 27591cc

Please sign in to comment.