Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions preview-traq/deployment-patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: preview-traq-placeholder
spec:
template:
spec:
initContainers:
- name: convert-config
image: busybox:1.36.1
command: ["sh", "-c"]
args:
- |
echo ";(() => { self.traQConfig = $(cat /config-in/config.json) })()" > /app/override/config.js
volumeMounts:
- name: config-json
mountPath: /config-in
- name: config-js
mountPath: /app/override
resources:
requests:
cpu: "10m"
memory: "50Mi"
limits:
cpu: "50m"
memory: "100Mi"
containers:
- name: preview-traq-placeholder
volumeMounts:
- name: config-js
mountPath: /app/override/config.js
subPath: config.js
volumes:
- name: config-json
configMap:
name: preview-traq-config
- name: config-js
emptyDir: {}
15 changes: 15 additions & 0 deletions preview-traq/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
helmGlobals:
chartHome: ../.common

configMapGenerator:
- name: preview-traq-config
namespace: preview-traq
files:
- config.json=../traq/frontend/config.json
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
options:
disableNameSuffixHash: true

helmCharts:
- includeCRDs: true
name: preview-ui
namespace: preview-traq
releaseName: preview-traq
valuesFile: values.yaml

patches:
- path: deployment-patch.yaml
target:
kind: Deployment
name: preview-traq-.*
namespace: preview-traq
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

このpatchはkustomize build実行時に行われるため、preview-uiが生成するArgoCD Applicationにおいては行われないと思います。
これをやる場合、.common/preview-ui-templateDeploymentinitContainersをHelm Valueで指定できるようにするとできそうです。

135 changes: 135 additions & 0 deletions traq/frontend/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
{
"$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"
}
22 changes: 22 additions & 0 deletions traq/frontend/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@ spec:
spec:
nodeSelector:
kubernetes.io/hostname: c1-203.tokyotech.org
initContainers:
- name: convert-config
image: busybox:1.36.1
command: ["sh", "-c"]
args:
- |
echo ";(() => { self.traQConfig = $(cat /config-in/config.json) })()" > /app/override/config.js
volumeMounts:
- name: config-json
mountPath: /config-in
- name: config-js
Comment thread
uni-kakurenbo marked this conversation as resolved.
Outdated
mountPath: /app/override
containers:
- image: ghcr.io/traptitech/traq-ui:3.31.2
name: traq-frontend
Expand All @@ -33,4 +45,14 @@ spec:
value: "1120420953"
- name: NEW_RELIC_AGENT_ID
value: "1120420953"
volumeMounts:
- mountPath: /app/override/config.js
name: config-js
subPath: config.js
volumes:
- configMap:
name: traq-frontend-config
name: config-json
- emptyDir: {}
name: config-js
restartPolicy: Always
5 changes: 5 additions & 0 deletions traq/frontend/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@ resources:
- ./deployment.yaml
- ./service.yaml
- ./ingress-route.yaml

configMapGenerator:
- name: traq-frontend-config
files:
- config.json
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

良さそうですが、先にtraq-devでテストして欲しいです🙏