-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #172 from GiganticMinecraft/add-cloudflared-mcserv…
…er-helm-chart proxy-kubernetes-cloudflared-redis chart を追加
- Loading branch information
Showing
4 changed files
with
86 additions
and
0 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,5 @@ | ||
apiVersion: v2 | ||
name: proxy-kubernetes-cloudflared-redis | ||
version: "1.0.0" | ||
maintainers: | ||
- name: GiganticMinecraft |
59 changes: 59 additions & 0 deletions
59
helm-charts/proxy-kubernetes-cloudflared-redis/templates/deployment.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,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 |
15 changes: 15 additions & 0 deletions
15
helm-charts/proxy-kubernetes-cloudflared-redis/templates/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,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 }} |
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,7 @@ | ||
# プロキシされる先のRedisサーバーの識別子。 | ||
RedisServerName: "redisbungee" | ||
# ホスト名の seichi.click 以下のサブドメイン名。 | ||
subdomain: "tcp-network" | ||
# この二つの設定で、プロキシ先の hostname が | ||
# redis--{{ .Values.RedisServerName }}.{{ .Values.subdomain }}.seichi.click | ||
# のように設定される。 |