Skip to content

Commit

Permalink
Merge pull request #419 from na2na-p/topic/refactor-k8s
Browse files Browse the repository at this point in the history
helm chart直す
  • Loading branch information
2na2-p[bot] authored Jul 5, 2024
2 parents 67e878e + 7480348 commit 3e78b5b
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 40 deletions.
2 changes: 1 addition & 1 deletion infra/k8s/helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ version: 3.0.0-helm
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.16.0"
appVersion: "1.17.0"
6 changes: 6 additions & 0 deletions infra/k8s/helm/templates/jetdisc/configMap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: jetdisc-configmap
data:
BOT_NAME: {{ .Values.configMap.botName | quote }}
4 changes: 3 additions & 1 deletion infra/k8s/helm/templates/jetdisc/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }}
envFrom:
- secretRef:
name: {{ .Values.secret.name }}
name: jetdisc-secret
- configMapRef:
name: jetdisc-configmap
resources: {{- toYaml .Values.resources | nindent 12 }}
restartPolicy: Always
28 changes: 0 additions & 28 deletions infra/k8s/helm/templates/jetdisc/hpa.yaml

This file was deleted.

8 changes: 8 additions & 0 deletions infra/k8s/helm/templates/jetdisc/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
kind: Secret
metadata:
name: jetdisc-secret
type: Opaque
data:
DISCORD_APP_TOKEN: {{ .Values.secrets.discordAppToken | quote }}
SET_COMMANDS_TARGET_SERVERS: {{ .Values.secrets.setCommandsTargetServers | quote }}
15 changes: 6 additions & 9 deletions infra/k8s/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ image:
registry: docker.io
pullPolicy: IfNotPresent

secret:
name: jetdisc-secret
secrets:
discordAppToken: ""
setCommandsTargetServers: []

configMap:
botName: ""

resources:
limits:
Expand All @@ -16,10 +20,3 @@ resources:
requests:
cpu: 250m
memory: 128Mi

hpa:
enabled: true
minReplicas: 1
maxReplicas: 1
targetCPUUtilizationPercentage: 80
targetMemoryUtilizationPercentage: 80
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jetdisc",
"version": "3.0.3",
"version": "3.0.4",
"description": "",
"type": "module",
"main": "built/index.js",
Expand Down

0 comments on commit 3e78b5b

Please sign in to comment.