-
Notifications
You must be signed in to change notification settings - Fork 6
feat(traQ): inject config during deployment #1315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
a2d98a7
868d43e
3446320
ae1a6b3
57de4db
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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: {} |
| 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 | ||
| 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 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. このpatchは |
||
| 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" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,3 +2,8 @@ resources: | |
| - ./deployment.yaml | ||
| - ./service.yaml | ||
| - ./ingress-route.yaml | ||
|
|
||
| configMapGenerator: | ||
| - name: traq-frontend-config | ||
| files: | ||
| - config.json | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 良さそうですが、先に |
||
Uh oh!
There was an error while loading. Please reload this page.