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

[9c-dev cluster] Arena service test infra #2262

Merged
merged 4 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
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
14 changes: 14 additions & 0 deletions 9c-dev/arena-service-test-20241218/application.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: arena-service-test-20241218
namespace: argocd
spec:
project: default
source:
repoURL: https://github.com/planetarium/9c-infra.git
targetRevision: main
path: 9c-dev/arena-service-test-20241218
destination:
server: https://kubernetes.default.svc
namespace: arena-service-test-20241218
35 changes: 35 additions & 0 deletions 9c-dev/arena-service-test-20241218/arena-service-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: arena-service
app.kubernetes.io/instance: arena-service-test-20241218
name: arena-service-deployment
namespace: arena-service-test-20241218
spec:
replicas: 2
selector:
matchLabels:
app: arena-service
template:
metadata:
labels:
app: arena-service
spec:
containers:
- name: arena-service
image: planetariumhq/arena-service:git-eb849c21d287be4ffefd276264fc53a2391dee7f
ports:
- containerPort: 80
env:
- name: ConnectionStrings__DefaultConnection
value: "Host=psql-service;Database=arena;Username=testuser;Password=$(POSTGRES_PASSWORD)"
- name: Logging__LogLevel__Default
value: "Information"
- name: Logging__LogLevel__Microsoft.AspNetCore
value: "Warning"
- name: AllowedHosts
value: "*"
envFrom:
- secretRef:
name: arena-service-secret
10 changes: 10 additions & 0 deletions 9c-dev/arena-service-test-20241218/arena-service-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: Secret
metadata:
labels:
app: arena-service
app.kubernetes.io/instance: arena-service-test-20241218
name: arena-service-secret
namespace: arena-service-test-20241218
type: Opaque
stringData: {}
19 changes: 19 additions & 0 deletions 9c-dev/arena-service-test-20241218/arena-service-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: arena-service
app.kubernetes.io/instance: arena-service-test-20241218
name: arena-service-service
namespace: arena-service-test-20241218
annotations:
service.beta.kubernetes.io/aws-load-balancer-target-group-attributes: stickiness.enabled=true,stickiness.type=source_ip,preserve_client_ip.enabled=true
service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags: Environment=development,Team=game,Owner=jiwon,Service=arena-service-test-20241218,Name=arena-service
spec:
externalTrafficPolicy: Local
type: LoadBalancer
selector:
app: arena-service
ports:
- port: 80
targetPort: 80
39 changes: 39 additions & 0 deletions 9c-dev/arena-service-test-20241218/psql-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: psql
app.kubernetes.io/instance: arena-service-test-20241218
name: psql-deployment
namespace: arena-service-test-20241218
spec:
replicas: 1
selector:
matchLabels:
app: psql
template:
metadata:
labels:
app: psql
spec:
containers:
- name: psql
image: postgres:15
ports:
- containerPort: 5432
env:
- name: POSTGRES_DB
value: "arena"
- name: POSTGRES_USER
value: "testuser"
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: arena-service-secret
key: POSTGRES_PASSWORD
volumeMounts:
- mountPath: /var/lib/postgresql/data
name: psql-data
volumes:
- name: psql-data
emptyDir: {}
19 changes: 19 additions & 0 deletions 9c-dev/arena-service-test-20241218/psql-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: psql
app.kubernetes.io/instance: arena-service-test-20241218
name: psql-service
namespace: arena-service-test-20241218
annotations:
service.beta.kubernetes.io/aws-load-balancer-target-group-attributes: stickiness.enabled=true,stickiness.type=source_ip,preserve_client_ip.enabled=true
service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags: Environment=development,Team=game,Owner=jiwon,Service=arena-service-test-20241218,Name=psql
spec:
externalTrafficPolicy: Local
ports:
- port: 5432
targetPort: 5432
selector:
app: psql
type: LoadBalancer
Loading