Skip to content

Commit

Permalink
Add k8s configuration ymls
Browse files Browse the repository at this point in the history
  • Loading branch information
slashexx committed Nov 4, 2024
1 parent 061de9f commit 591fc74
Show file tree
Hide file tree
Showing 7 changed files with 110 additions and 6 deletions.
13 changes: 7 additions & 6 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ const INITIAL_CODE: Record<Language, string> = {
};

const LANGUAGE_CONFIGS = {
c: { label: 'C', icon: Cpu, color: "text-blue-500" },
cpp: { label: "C++", icon: Cpu, color: "text-blue-500" },
python: { label: "Python", icon: Code2, color: "text-yellow-500" },
java: { label: "Java", icon: Coffee, color: "text-red-500" },
go: { label: "Go", icon: Code2, color: "text-cyan-500" },
c: { label: 'C', icon: "devicon-c-plain colored", color: "text-red-500" },
cpp: { label: "C++", icon:"devicon-cplusplus-plain colored", color: "text-blue-500" },
python: { label: "Python", icon: "devicon-python-plain colored" , color: "text-yellow-500" },
java: { label: "Java", icon: "devicon-java-plain colored", color: "text-red-500" },
go: { label: "Go", icon: "devicon-go-plain colored", color: "text-cyan-500" },
};

function App() {
Expand Down Expand Up @@ -122,7 +122,8 @@ function App() {
className={`p-3 rounded-lg transition-all ${selectedLanguage === lang ? "bg-gray-700 shadow-lg scale-105" : "hover:bg-gray-700/50"
} flex flex-col items-center gap-1`}
>
<Icon className={`w-6 h-6 ${color}`} />
<i className={`${Icon}`} style={{ fontSize: '27px' }} />

<span className="text-xs">{label}</span>
</button>
);
Expand Down
23 changes: 23 additions & 0 deletions k8s/api-gateway/deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: api-gateway
labels:
app: api-gateway

spec:
replicas: 2
selector:
matchLabels:
app: api-gateway
template:
metadata:
labels:
app: api-gateway

spec:
containers:
- name: api-gateway
image: codebrewery-api-gateway:latest
ports:
- containerPort: 8080
12 changes: 12 additions & 0 deletions k8s/api-gateway/service.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: api-gateway-service
spec:
selector:
app: api-gateway
ports:
- protocol: TCP
port: 80
targetPort: 8080
type: NodePort
21 changes: 21 additions & 0 deletions k8s/code-execution-service/deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: code-execution-service
labels:
app: code-execution-service
spec:
replicas: 2
selector:
matchLabels:
app: code-execution-service
template:
metadata:
labels:
app: code-execution-service
spec:
containers:
- name: code-execution-service
image: codebrewery-code-execution-service:latest
ports:
- containerPort: 8081
13 changes: 13 additions & 0 deletions k8s/code-execution-service/service.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: code-execution-service
labels:
app: code-execution-service
spec:
type: ClusterIP
ports:
- port: 8081
targetPort: 8081
selector:
app: code-execution-service
21 changes: 21 additions & 0 deletions k8s/frontend/deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: codebrewery-frontend
labels:
app: codebrewery-frontend
spec:
replicas: 2
selector:
matchLabels:
app: codebrewery-frontend
template:
metadata:
labels:
app: codebrewery-frontend
spec:
containers:
- name: codebrewery-frontend
image: codebrewery-frontend:latest
ports:
- containerPort: 5173
13 changes: 13 additions & 0 deletions k8s/frontend/service.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: codebrewery-frontend
labels:
app: codebrewery-frontend
spec:
type: ClusterIP
ports:
- port: 5173
targetPort: 5173
selector:
app: codebrewery-frontend

0 comments on commit 591fc74

Please sign in to comment.