Skip to content

Commit 0085ff9

Browse files
committed
Improve helm script bundling
1 parent c6b8f52 commit 0085ff9

2 files changed

Lines changed: 18 additions & 5 deletions

File tree

apps/faf-legacy-deployment/templates/deploy-coop.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ spec:
3939
containers:
4040
- image: gradle:9.2-jdk21
4141
imagePullPolicy: Always
42-
name: faf-coop-deployment
42+
name: faf-deploy-coop
4343
workingDir: /workspace
4444
envFrom:
4545
- configMapRef:
@@ -49,18 +49,18 @@ spec:
4949
command: [ "gradle", "run" ]
5050
volumeMounts:
5151
- mountPath: /workspace/build.gradle.kts
52-
name: faf-deploy-coop
52+
name: faf-deploy-scripts
5353
subPath: "build.gradle.kts"
5454
- mountPath: /workspace/CoopDeployer.kt
55-
name: faf-deploy-coop
55+
name: faf-deploy-scripts
5656
subPath: "CoopDeployer.kt"
5757
- mountPath: /workspace/legacy-featured-mod-files
5858
name: faf-featured-mods
5959
restartPolicy: Never
6060
volumes:
61-
- name: faf-deploy-coop
61+
- name: faf-deploy-scripts
6262
configMap:
63-
name: "faf-deploy-coop"
63+
name: "faf-deploy-scripts"
6464
- name: faf-featured-mods
6565
hostPath:
6666
path: /opt/faf/data/legacy-featured-mod-files
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: faf-deploy-scripts
5+
labels:
6+
app: faf-deploy-coop
7+
data:
8+
# Loop through all files in the 'scripts' directory
9+
{{- range $path, $bytes := .Files.Glob "scripts/*" }}
10+
{{- $file := base $path }}
11+
{{ $file }}: |-
12+
{{ tpl ($bytes | toString) $ | indent 4 }}
13+
{{- end }}

0 commit comments

Comments
 (0)