Skip to content

Commit

Permalink
add backend deployment, service and change FQDN to service
Browse files Browse the repository at this point in the history
  • Loading branch information
ili16 committed Dec 26, 2023
1 parent 01bf544 commit 3755bae
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea/
20 changes: 20 additions & 0 deletions Kubernetes/modernizer/modernizer-backend-deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: modernizer-backend-deployment
spec:
replicas: 1
selector:
matchLabels:
app: modernizer-backend
template:
metadata:
labels:
app: modernizer-backend
spec:
containers:
- name: modernizer-backend
image: registry.tech4comp.dbis.rwth-aachen.de/rwthacis/modernizer:latest
ports:
- containerPort: 8080
imagePullPolicy: Always
13 changes: 13 additions & 0 deletions Kubernetes/modernizer/modernizer-backend-service.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: modernizer-backend-service
spec:
selector:
app: modernizer-backend
ports:
- name: gin-web
protocol: TCP
port: 443
targetPort: 8080
type: ClusterIP
14 changes: 5 additions & 9 deletions Kubernetes/modernizer/modernizer-service.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
---

# nginx-service.yaml

apiVersion: v1
kind: Service
metadata:
name: modernizer-service
name: modernizer-backend-service
spec:
selector:
app: nginx
app: modernizer-backend
ports:
- name: https
- name: API
protocol: TCP
port: 443
targetPort: 80 # Expose port 443
type: ClusterIP
targetPort: 8080
type: ClusterIP
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func main() {

func getInfo(c *gin.Context) {

resp, err := http.Get("https://modernizer.milki-psy.dbis.rwth-aachen.de")
resp, err := http.Get("ollama-service.ba-kovacevic:11434")

if err != nil {
//
Expand Down

0 comments on commit 3755bae

Please sign in to comment.