Skip to content

Commit

Permalink
wacruit judge (dev) (#87)
Browse files Browse the repository at this point in the history
Co-authored-by: shinhong-park <[email protected]>
Co-authored-by: davin111 <[email protected]>
  • Loading branch information
3 people authored Jul 14, 2023
1 parent 611fa5f commit 25f09f8
Show file tree
Hide file tree
Showing 8 changed files with 288 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ apps/siksha-dev/ @wafflestudio/siksha
apps/siksha-prod/ @wafflestudio/siksha
apps/waffledotcom-dev/waffledotcom-server @wafflestudio/waffledotcom-backend
apps/waffledotcom-prod/waffledotcom-server @wafflestudio/waffledotcom-backend
apps/wacruit-dev @wafflestudio/waffledotcom-backend
apps/wacruit-prod @wafflestudio/waffledotcom-backend
apps/pupuri-prod/ @woohm402
apps/ggzz-dev/ @wafflestudio/ggzz
apps/k8s-monitoring/ @PFCJeong
18 changes: 18 additions & 0 deletions apps/templates/wacruit-judge-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
namespace: argocd
name: wacruit-judge-dev
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
project: default
source:
repoURL: {{ .Values.spec.source.repoURL }}
targetRevision: HEAD
path: apps/wacruit-dev/wacruit-judge
destination:
server: {{ .Values.spec.destination.server }}
namespace: argocd
syncPolicy:
{{- .Values.spec.syncPolicy | toYaml | nindent 4 }}
18 changes: 18 additions & 0 deletions apps/templates/wacruit-judge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
namespace: argocd
name: wacruit-judge
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
project: default
source:
repoURL: {{ .Values.spec.source.repoURL }}
targetRevision: HEAD
path: apps/wacruit-prod/wacruit-judge
destination:
server: {{ .Values.spec.destination.server }}
namespace: argocd
syncPolicy:
{{- .Values.spec.syncPolicy | toYaml | nindent 4 }}
73 changes: 73 additions & 0 deletions apps/wacruit-dev/wacruit-judge/wacruit-judge-server.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: wacruit-judge-server
labels:
app: wacruit-judge-server
namespace: wacruit-dev
spec:
replicas: 1
selector:
matchLabels:
app: wacruit-judge-server
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
revisionHistoryLimit: 4
template:
metadata:
labels:
app: wacruit-judge-server
spec:
serviceAccountName: wacruit-judge-server
containers:
- image: 405906814034.dkr.ecr.ap-northeast-2.amazonaws.com/wacruit-dev/wacruit-judge-server:3
name: wacruit-judge-server
resources:
requests:
cpu: 100m
memory: 192Mi
limits:
cpu: 200m
memory: 192Mi
ports:
- containerPort: 2358
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: wacruit-judge-server
namespace: wacruit-dev
annotations:
eks.amazonaws.com/role-arn: arn:aws:iam::405906814034:role/wacruit-dev-role
---
apiVersion: v1
kind: Service
metadata:
namespace: wacruit-dev
name: wacruit-judge-server
spec:
type: ClusterIP
selector:
app: wacruit-judge-server
ports:
- port: 80
targetPort: 2358
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
namespace: wacruit-dev
name: wacruit-judge-server
spec:
gateways:
- istio-ingress/waffle-ingressgateway
- mesh
hosts:
- wacruit-judge-server.wacruit-dev.svc.cluster.local
http:
- route:
- destination:
host: wacruit-judge-server
45 changes: 45 additions & 0 deletions apps/wacruit-dev/wacruit-judge/wacruit-judge-worker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: wacruit-judge-worker
labels:
app: wacruit-judge-worker
namespace: wacruit-dev
spec:
replicas: 1
selector:
matchLabels:
app: wacruit-judge-worker
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
revisionHistoryLimit: 4
template:
metadata:
labels:
app: wacruit-judge-worker
spec:
serviceAccountName: wacruit-judge-worker
containers:
- image: 405906814034.dkr.ecr.ap-northeast-2.amazonaws.com/wacruit-dev/wacruit-judge-server:3
name: wacruit-judge-worker
command: ["./scripts/workers"]
securityContext:
privileged: true
resources:
requests:
cpu: 500m
memory: 512Mi
limits:
cpu: 500m
memory: 512Mi
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: wacruit-judge-worker
namespace: wacruit-dev
annotations:
eks.amazonaws.com/role-arn: arn:aws:iam::405906814034:role/wacruit-dev-role
73 changes: 73 additions & 0 deletions apps/wacruit-prod/wacruit-judge/wacruit-judge-server.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: wacruit-judge-server
labels:
app: wacruit-judge-server
namespace: wacruit-prod
spec:
replicas: 0
selector:
matchLabels:
app: wacruit-judge-server
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
revisionHistoryLimit: 4
template:
metadata:
labels:
app: wacruit-judge-server
spec:
serviceAccountName: wacruit-judge-server
containers:
- image: 405906814034.dkr.ecr.ap-northeast-2.amazonaws.com/wacruit-prod/wacruit-judge-server:1
name: wacruit-judge-server
resources:
requests:
cpu: 200m
memory: 256Mi
limits:
cpu: 400m
memory: 256Mi
ports:
- containerPort: 2358
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: wacruit-judge-server
namespace: wacruit-prod
annotations:
eks.amazonaws.com/role-arn: arn:aws:iam::405906814034:role/wacruit-prod-role
---
apiVersion: v1
kind: Service
metadata:
namespace: wacruit-prod
name: wacruit-judge-server
spec:
type: ClusterIP
selector:
app: wacruit-judge-server
ports:
- port: 80
targetPort: 2358
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
namespace: wacruit-prod
name: wacruit-judge-server
spec:
gateways:
- istio-ingress/waffle-ingressgateway
- mesh
hosts:
- wacruit-judge-server.wacruit-prod.svc.cluster.local
http:
- route:
- destination:
host: wacruit-judge-server
45 changes: 45 additions & 0 deletions apps/wacruit-prod/wacruit-judge/wacruit-judge-worker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: wacruit-judge-worker
labels:
app: wacruit-judge-worker
namespace: wacruit-prod
spec:
replicas: 0
selector:
matchLabels:
app: wacruit-judge-worker
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
revisionHistoryLimit: 4
template:
metadata:
labels:
app: wacruit-judge-worker
spec:
serviceAccountName: wacruit-judge-worker
containers:
- image: 405906814034.dkr.ecr.ap-northeast-2.amazonaws.com/wacruit-prod/wacruit-judge-server:1
name: wacruit-judge-worker
command: ["./scripts/workers"]
securityContext:
privileged: true
resources:
requests:
cpu: 1000m
memory: 1Gi
limits:
cpu: 1000m
memory: 1Gi
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: wacruit-judge-worker
namespace: wacruit-prod
annotations:
eks.amazonaws.com/role-arn: arn:aws:iam::405906814034:role/wacruit-prod-role
14 changes: 14 additions & 0 deletions misc/apps/namespace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,17 @@ metadata:
name: waffledotcom-prod
labels:
istio-injection: enabled
---
apiVersion: v1
kind: Namespace
metadata:
name: wacruit-dev
labels:
istio-injection: enabled
---
apiVersion: v1
kind: Namespace
metadata:
name: wacruit-prod
labels:
istio-injection: enabled

0 comments on commit 25f09f8

Please sign in to comment.