Compare commits
17 Commits
9540b1c4c3
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| bafaad377a | |||
| 411e23b13e | |||
| eb460b62ac | |||
| a5a96d5472 | |||
| 45050eb643 | |||
| 714fb2dd23 | |||
| f24b199a84 | |||
| 36a8448c4b | |||
| 99d0f2be84 | |||
| 5d89a676df | |||
| a7f3fa41a2 | |||
| cf4991cc8d | |||
| 628fa7de31 | |||
| 31cf0dd8c4 | |||
| 4f59de0df9 | |||
| 58d14454e3 | |||
| 10540695f8 |
@@ -2,11 +2,11 @@ apiVersion: apps/v1
|
|||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: fastapi-api
|
name: fastapi-api
|
||||||
namespace: student-<vas-username>
|
namespace: student-iva
|
||||||
annotations:
|
annotations:
|
||||||
argocd.argoproj.io/sync-wave: "1" # deploy NAKON baze
|
argocd.argoproj.io/sync-wave: "1" # deploy NAKON baze
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 2
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: fastapi-api
|
app: fastapi-api
|
||||||
@@ -17,7 +17,10 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: fastapi-api
|
- name: fastapi-api
|
||||||
image: vasic/fastapi-todo-api:1.0
|
image: git.fpmoz.sum.ba/dvasic/fastapi-todo-api:1.0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8000
|
- containerPort: 8000
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -2,13 +2,13 @@ apiVersion: networking.k8s.io/v1
|
|||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: fastapi-api-ingress
|
name: fastapi-api-ingress
|
||||||
namespace: student-<vas-username>
|
namespace: student-iva
|
||||||
annotations:
|
annotations:
|
||||||
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||||
cert-manager.io/cluster-issuer: letsencrypt-prod
|
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||||
spec:
|
spec:
|
||||||
rules:
|
rules:
|
||||||
- host: <vas-username>.fpmoz.sum.ba # zamijenite!
|
- host: iva.fpmoz.sum.ba # zamijenite!
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: /
|
- path: /
|
||||||
@@ -20,5 +20,5 @@ spec:
|
|||||||
number: 80
|
number: 80
|
||||||
tls:
|
tls:
|
||||||
- hosts:
|
- hosts:
|
||||||
- <vas-username>.fpmoz.sum.ba
|
- iva.fpmoz.sum.ba
|
||||||
secretName: fastapi-api-tls
|
secretName: fastapi-api-tls
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ apiVersion: v1
|
|||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: fastapi-api-service
|
name: fastapi-api-service
|
||||||
namespace: student-<vas-username>
|
namespace: student-iva
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
app: fastapi-api
|
app: fastapi-api
|
||||||
|
|||||||
@@ -2,8 +2,9 @@ apiVersion: v1
|
|||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
name: fastapi-config
|
name: fastapi-config
|
||||||
namespace: student-<vas-username>
|
namespace: student-iva
|
||||||
data:
|
data:
|
||||||
DATABASE_HOST: postgres-service
|
DATABASE_HOST: postgres-service
|
||||||
DATABASE_PORT: "5432"
|
DATABASE_PORT: "5432"
|
||||||
APP_ENV: production
|
APP_ENV: production
|
||||||
|
MAX_TODOS: "100"
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Namespace
|
kind: Namespace
|
||||||
metadata:
|
metadata:
|
||||||
name: student-<vas-username> # zamijenite <vas-username>
|
name: student-iva # zamijenite <vas-username>
|
||||||
labels:
|
labels:
|
||||||
managed-by: argocd
|
managed-by: argocd
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ apiVersion: v1
|
|||||||
kind: Secret
|
kind: Secret
|
||||||
metadata:
|
metadata:
|
||||||
name: postgres-secret
|
name: postgres-secret
|
||||||
namespace: student-<vas-username>
|
namespace: student-iva
|
||||||
type: Opaque
|
type: Opaque
|
||||||
data:
|
data:
|
||||||
POSTGRES_PASSWORD: c3R1ZGVudDEyMw== # student123
|
POSTGRES_PASSWORD: c3R1ZGVudDEyMw== # student123
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ apiVersion: apps/v1
|
|||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: postgres
|
name: postgres
|
||||||
namespace: student-<vas-username>
|
namespace: student-iva
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
@@ -21,6 +21,15 @@ spec:
|
|||||||
name: postgres-secret # lozinke iz Secreta
|
name: postgres-secret # lozinke iz Secreta
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 5432
|
- containerPort: 5432
|
||||||
|
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: "50m"
|
||||||
|
memory: "64Mi"
|
||||||
|
limits:
|
||||||
|
cpu: "100m"
|
||||||
|
memory: "128Mi"
|
||||||
|
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: postgres-data
|
- name: postgres-data
|
||||||
mountPath: /var/lib/postgresql/data
|
mountPath: /var/lib/postgresql/data
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ apiVersion: v1
|
|||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
name: postgres-pvc
|
name: postgres-pvc
|
||||||
namespace: student-<vas-username>
|
namespace: student-iva
|
||||||
spec:
|
spec:
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteOnce # jedan node moze pisati u isto vrijeme
|
- ReadWriteOnce # jedan node moze pisati u isto vrijeme
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ apiVersion: v1
|
|||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: postgres-service
|
name: postgres-service
|
||||||
namespace: student-<vas-username>
|
namespace: student-iva
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
app: postgres
|
app: postgres
|
||||||
|
|||||||
Reference in New Issue
Block a user