Skip to content
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

feat: deploy scoreserver #282

Merged
merged 1 commit into from
Feb 20, 2025
Merged
Changes from all commits
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
2 changes: 1 addition & 1 deletion manifest/application/scoreserver/helmfile.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
environments:
dev:
prod:

---
releases:
- name: local-charts
chart: ./local
57 changes: 57 additions & 0 deletions manifest/application/scoreserver/local/backend.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
apiVersion: v1
kind: Service
metadata:
name: scoreserver-admin-api
labels:
app.kubernetes.io/name: scoreserver-admin-api
app.kubernetes.io/part-of: scoreserver
app.kubernetes.io/component: backend
spec:
selector:
app.kubernetes.io/name: scoreserver-backend
ports:
- name: http
port: 80
protocol: TCP
targetPort: 8081
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: scoreserver-backend
labels:
app.kubernetes.io/name: scoreserver-backend
app.kubernetes.io/part-of: scoreserver
app.kubernetes.io/component: backend
spec:
replicas: 2
selector:
matchLabels:
app.kubernetes.io/name: scoreserver-backend
template:
metadata:
labels:
app.kubernetes.io/name: scoreserver-backend
app.kubernetes.io/part-of: scoreserver
app.kubernetes.io/component: backend
spec:
containers:
- name: scoreserver
image: ghcr.io/ictsc/ictsc-regalia/scoreserver:latest
Copy link
Contributor Author

Choose a reason for hiding this comment

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

タグが sha-{short sha} の形式になっているのでコンテナリポジトリの更新に合わせて更新できるようにしたい

dev と prod で更新のポリシーも変えたい

Copy link
Contributor Author

Choose a reason for hiding this comment

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

どうしたらいいのかわからんのでアイデア募集中という状態

env:
- name: DB_DSN
valueFrom:
secretKeyRef:
name: postgres-app-credential
Copy link
Contributor Author

Choose a reason for hiding this comment

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

シークレットの管理方法がわからなくて手で入れてる

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Postgres Operator がうまく動きそうなのでこれ自体はなんとかなるかも,他はちゃんと考える必要がある

key: dsn
livenessProbe:
initialDelaySeconds: 10
grpc:
port: 8081
resources:
limits:
memory: 128Mi
cpu: 1
requests:
memory: 64Mi
cpu: 200m
23 changes: 23 additions & 0 deletions manifest/application/scoreserver/local/postgres-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: v1
kind: Service
metadata:
name: postgres
spec:
type: ClusterIP
clusterIP: None
ports:
- name: postgres
port: 5432
targetPort: 5432
---
apiVersion: v1
kind: Endpoints
metadata:
name: postgres
subsets:
- addresses:
- ip: 192.168.100.201
ports:
- name: postgres
protocol: TCP
port: 5432