-
Notifications
You must be signed in to change notification settings - Fork 4
knoQのk8s移行 #1160
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?
knoQのk8s移行 #1160
Changes from 1 commit
da8d91b
f175bf0
27b9f25
bd1136f
7ddb738
5e8c2a3
4240464
a011886
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,53 @@ | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: knoq-backend | ||
| labels: | ||
| app: knoq-backend | ||
|
|
||
| spec: | ||
| selector: | ||
| matchLabels: | ||
| app: knoq-backend | ||
| template: | ||
| metadata: | ||
| labels: | ||
| app: knoq-backend | ||
| spec: | ||
| affinity: | ||
| nodeAffinity: | ||
| preferredDuringSchedulingIgnoredDuringExecution: | ||
| - preference: | ||
| matchExpressions: | ||
| - key: kubernetes.io/hostname | ||
| operator: In | ||
| values: | ||
| - las211.tokyotech.org | ||
| weight: 1 | ||
|
|
||
| containers: | ||
| - name: knoq-backend | ||
|
||
| image: ghcr.io/traptitech/knoq:main | ||
| env: | ||
| - name: DB_USER | ||
| value: "service_knoq" | ||
| - name: DB_PORT | ||
| value: "3306" | ||
| - name: DB_HOST | ||
| value: "tailscale.kmbk.tokyotech.org" | ||
| - name: DB_NAME | ||
| value: "service_knoq" | ||
| - name: DB_PASSWORD | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: knoq-secrets | ||
| key: DB_PASSWORD | ||
|
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. READMEに従って、この値を格納するSecretの用意をお願いします |
||
| ports: | ||
| - containerPort: 3000 | ||
| resources: | ||
| requests: | ||
| cpu: "10m" | ||
| memory: "10Mi" | ||
| limits: | ||
| cpu: "200m" | ||
| memory: "300Mi" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: knoq-backend-service | ||
|
|
||
| spec: | ||
| type: ClusterIP | ||
| selector: | ||
| app: knoq-backend | ||
| ports: | ||
| - name: http | ||
| port: 3000 | ||
| targetPort: 3000 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| apiVersion: cert-manager.io/v1 | ||
| kind: Certificate | ||
| metadata: | ||
| name: knoq-certificate | ||
|
|
||
| spec: | ||
| issuerRef: | ||
| kind: ClusterIssuer | ||
| name: cluster-issuer | ||
| secretName: knoq-tls | ||
| duration: 2160h0m0s # 90d | ||
| renewBefore: 720h0m0s # 30d | ||
| dnsNames: | ||
| - knoq.trap.jp |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| apiVersion: traefik.io/v1alpha1 | ||
| kind: IngressRoute | ||
| metadata: | ||
| name: knoq-ingressroute | ||
|
|
||
| spec: | ||
| entryPoints: | ||
| - websecure | ||
| tls: | ||
| secretName: knoq-tls | ||
|
|
||
| routes: | ||
| - match: (Host(`knoq.trap.jp`) && PathPrefix(`/api/`) | ||
|
||
| middlewares: | ||
| - name: auth-trap-jp-hard | ||
| namespace: auth | ||
| services: | ||
| - kind: Service | ||
| name: knoq-backend-service | ||
| port: 3000 | ||
| scheme: http | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| resources: | ||
|
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. ファイル名ミス: |
||
| - backend-deployment.yaml | ||
| - backend-service.yaml | ||
| - ingress-route.yaml | ||
| - certificate.yaml | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
この辺の名前から
-backendを削除して欲しいです(フロントエンドも実行されるので)ファイル名からもお願いします🙏