Skip to content

Commit

Permalink
feat: added idea-reaction pod
Browse files Browse the repository at this point in the history
  • Loading branch information
m1sk9 committed Nov 7, 2023
1 parent 51a9375 commit 924f1e7
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v1
kind: ConfigMap
matadata:
name: idea-reaction-config
data:
config.yaml: |
reactions: ["👍", "👎"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: idea-reaction
namespace: seichi-minecraft
labels:
app: idea-reaction
spec:
replicas: 1
selector:
matchLabels:
app: idea-reaction
template:
metadata:
labels:
app: idea-reaction
spec:
- name: idea-reaction
image: ghcr.io/giganticminecraft/idea-reaction:latest
resources:
requests:
cpu: 250m
memory: 128Mi
limits:
cpu: 500m
memory: 256Mi
env:
- name: TARGET_CHANNEL_ID
value: "959292335177486367"
# Webhook ID は Webhook の UserId と同一のため, 公開情報になる.
- name: TARGET_WEBHOOK_ID
value: "959307225413845072"
- name: TARGET_GUILD_ID
value: "237758724121427969"
- name: DISCORD_TOKEN
valueFrom:
secretKeyRef:
name: idea-reaction-discord-token
key: IDEA_REACTION_DISCORD_TOKEN
envFrom:
- configMapRef:
name: idea-reaction-config
6 changes: 6 additions & 0 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,12 @@ variable "minecraft__prod_game_db__password" {
sensitive = true
}

variable "minecraft__idea_reaction_discord_token" {
description = "Token set to the production idea-reaction"
type = string
sensitive = true
}

#endregion

#region env variables for Cloudflare Pages projects
Expand Down
5 changes: 3 additions & 2 deletions terraform/onp_cluster_minecraft_secrets.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ resource "kubernetes_secret" "onp_minecraft_prod_secrets" {
}

data = {
DISCORDSRV_TOKEN = var.minecraft__discordsrv_bot_token
GAME_DB_PASSWORD = var.minecraft__prod_game_db__password
DISCORDSRV_TOKEN = var.minecraft__discordsrv_bot_token
GAME_DB_PASSWORD = var.minecraft__prod_game_db__password
IDEA_REACTION_DISCORD_TOKEN = var.minecraft__idea_reaction_discord_token
}

type = "Opaque"
Expand Down

0 comments on commit 924f1e7

Please sign in to comment.