diff --git a/.common/preview-ui-template/templates/dashboard-deployment.yaml b/.common/preview-ui-template/templates/dashboard-deployment.yaml index b88091297..30cfe9266 100644 --- a/.common/preview-ui-template/templates/dashboard-deployment.yaml +++ b/.common/preview-ui-template/templates/dashboard-deployment.yaml @@ -27,3 +27,11 @@ spec: ports: - name: http containerPort: {{ .Values.port }} + {{- if .Values.containers.volumeMounts }} + volumeMounts: + {{- toYaml .Values.containers.volumeMounts | nindent 12 }} + {{- end }} + {{- if .Values.volumes }} + volumes: + {{- toYaml .Values.volumes | nindent 8 }} + {{- end }} diff --git a/preview-traq/kustomization.yaml b/preview-traq/kustomization.yaml index 32e6d7fbb..a8624e398 100644 --- a/preview-traq/kustomization.yaml +++ b/preview-traq/kustomization.yaml @@ -1,6 +1,14 @@ helmGlobals: chartHome: ../.common +configMapGenerator: + - name: preview-traq-config + namespace: preview-traq + files: + - config.json=../traq/frontend/config.jsonc + options: + disableNameSuffixHash: true + helmCharts: - includeCRDs: true name: preview-ui diff --git a/preview-traq/values.yaml b/preview-traq/values.yaml index 28fb1ed20..84ba50542 100644 --- a/preview-traq/values.yaml +++ b/preview-traq/values.yaml @@ -34,3 +34,14 @@ staging: otherParameters: port: 80 + +containers: + volumeMounts: + - name: config-json + mountPath: /app/override/config.json + subPath: config.jsonc + +volumes: + - name: config-json + configMap: + name: preview-traq-config diff --git a/traq-dev/frontend/deployment-patch.yaml b/traq-dev/frontend/deployment-patch.yaml index b0c2b93b0..c5e5e1028 100644 --- a/traq-dev/frontend/deployment-patch.yaml +++ b/traq-dev/frontend/deployment-patch.yaml @@ -21,3 +21,11 @@ spec: value: "1120421442" - name: NEW_RELIC_AGENT_ID value: "1120421442" + volumeMounts: + - name: config-json + mountPath: /app/override/config.json + subPath: config.jsonc + volumes: + - name: config-json + configMap: + name: traq-frontend-config diff --git a/traq-dev/frontend/kustomization.yaml b/traq-dev/frontend/kustomization.yaml index e25b4c5eb..04b148f1b 100644 --- a/traq-dev/frontend/kustomization.yaml +++ b/traq-dev/frontend/kustomization.yaml @@ -1,6 +1,11 @@ resources: - ../../traq/frontend +configMapGenerator: + - name: traq-frontend-config + files: + - ../../traq/frontend/config.jsonc + patches: - path: deployment-patch.yaml target: diff --git a/traq/frontend/config.jsonc b/traq/frontend/config.jsonc new file mode 100644 index 000000000..2495f58c0 --- /dev/null +++ b/traq/frontend/config.jsonc @@ -0,0 +1,140 @@ +{ + "$schema": "https://raw.githubusercontent.com/traPtitech/traQ_S-UI/refs/heads/master/config.schema.json", + "firebase": { + "apiKey": "AIzaSyDee_VkrRtByJCrCZAX3nTSDPl8AaHlWfY", + "appId": "1:993645413001:web:b253ea3776d6cf85163c58", + "projectId": "traq-r", + "messagingSenderId": "993645413001", + "vapidKey": "BPHegiDotHG7TlKhoW1qvwUYjOQj1C7RgKjvw3etUJZ_4x3LWUtFVXtRANWwckJX4G2w3CVj4zwi5QNThg7DZH4" + }, + "enableQall": true, + "enableSearch": true, + "services": [ + { + "label": "Portal", + "iconPath": "portal.svg", + "appLink": "https://portal.trap.jp/" + }, + { + "label": "Official Website", + "iconPath": "traP.svg", + "appLink": "https://trap.jp/" + }, + { + "label": "Wiki", + "iconPath": "crowi.svg", + "appLink": "https://wiki.trap.jp/" + }, + { + "label": "Blog Admin", + "iconPath": "ghost.svg", + "appLink": "https://blog-admin.trap.jp/" + }, + { + "label": "Drive", + "iconPath": "nextcloud.svg", + "appLink": "https://drive.trap.jp/" + }, + { + "label": "Gitea", + "iconPath": "gitea.svg", + "appLink": "https://git.trap.jp/" + }, + { + "label": "NeoShowcase", + "iconPath": "neoshowcase.svg", + "appLink": "https://ns.trap.jp/" + }, + { + "label": "HackMD", + "iconPath": "hackmd.svg", + "appLink": "https://md.trap.jp/" + }, + { + "label": "anke-to", + "iconPath": "anke-to.svg", + "appLink": "https://anke-to.trap.jp/" + }, + { + "label": "booQ", + "iconPath": "booq.svg", + "appLink": "https://booq.trap.jp/" + }, + { + "label": "knoQ", + "iconPath": "knoq.svg", + "appLink": "https://knoq.trap.jp/" + }, + { + "label": "BOT Console", + "iconPath": "bot-console.svg", + "appLink": "https://bot-console.trap.jp/" + }, + { + "label": "Jomon", + "iconPath": "jomon.svg", + "appLink": "https://jomon.trap.jp/" + }, + { + "label": "traPortfolio", + "iconPath": "traPortfolio.svg", + "appLink": "https://portfolio.trap.jp/" + }, + { + "label": "tpf-admin", + "iconPath": "traPortfolio-admin.svg", + "appLink": "https://portfolio-admin.trap.jp/" + }, + { + "label": "rucQ", + "iconPath": "rucq.svg", + "appLink": "https://rucq.trap.jp/" + }, + { + "label": "traP Collection", + "iconPath": "traPCollection.svg", + "appLink": "https://collection.trap.jp/" + } + ], + "ogpIgnoreHostNames": [ + "wiki.trap.jp", + "git.trap.jp", + "md.trap.jp", + "drive.trap.jp", + "anke-to.trap.jp", + "booq.trap.jp", + "knoq.trap.jp", + "wiki.trapti.tech", + "git.trapti.tech", + "md.trapti.tech", + "drive.trapti.tech", + "jomon.trap.jp", + "ns.trap.jp", + "portfolio-admin.trap.jp", + "rucq.trap.jp" + ], + "wikiPageOrigin": "https://wiki.trap.jp", + "blogPagePrefix": "https://trap.jp/author/", + "auth": { + "resetLink": "https://portal.trap.jp/reset-password", + "changeLink": "https://portal.trap.jp/me/change-password", + "changeName": "traPortal" + }, + "isRootChannelSelectableAsParentChannel": false, + "tooLargeFileMessage": "大きい%sの共有にはDriveを使用してください", + "showWidgetCopyButton": true, + "inlineReplyDisableChannels": [ + "#general", + "#general/schedule", + "#general/meeting", + "#random", + "#random/wasure", + "#services" + ], + "iosPwaInfoLink": "https://wiki.trap.jp/SysAd/docs/traQ-S/PWA", + "defaultChannelId": [ + "04ad2c18-fdcb-4c43-beef-82e8ba26ac98", // #general of q.trap.jp + "83afc6cc-737d-4868-9a2f-aeb7c199260e" // #general of q-dev.trapti.tech + ], + "fallbackChannelPath": "general" +} diff --git a/traq/frontend/deployment.yaml b/traq/frontend/deployment.yaml index 209a848c4..fd4701253 100644 --- a/traq/frontend/deployment.yaml +++ b/traq/frontend/deployment.yaml @@ -33,4 +33,12 @@ spec: value: "1120420953" - name: NEW_RELIC_AGENT_ID value: "1120420953" + volumeMounts: + - mountPath: /app/override/config.json + name: config-json + subPath: config.jsonc + volumes: + - configMap: + name: traq-frontend-config + name: config-json restartPolicy: Always