85 lines
1.7 KiB
YAML
85 lines
1.7 KiB
YAML
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: requirements-periodic-table
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: fastapi-app
|
|
namespace: requirements-periodic-table
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: fastapi-app
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: fastapi-app
|
|
spec:
|
|
containers:
|
|
- name: fastapi-app
|
|
image: docker.io/gulimabr/requirements-periodic-table-backend:latest
|
|
imagePullPolicy: Always
|
|
ports:
|
|
- containerPort: 8080
|
|
envFrom:
|
|
- configMapRef:
|
|
name: periodic-table-env # Provide config for APP settings
|
|
env:
|
|
- name: PROXY_HEADERS
|
|
value: "true"
|
|
- name: TRUSTED_PROXY_HOSTS
|
|
value: "*"
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: fastapi-app
|
|
namespace: requirements-periodic-table
|
|
spec:
|
|
selector:
|
|
app: fastapi-app
|
|
ports:
|
|
- port: 8080
|
|
targetPort: 8080
|
|
name: http
|
|
type: ClusterIP
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: frontend
|
|
namespace: requirements-periodic-table
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: frontend
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: frontend
|
|
spec:
|
|
containers:
|
|
- name: frontend
|
|
image: docker.io/gulimabr/requirements-periodic-table-frontend:latest
|
|
imagePullPolicy: Always
|
|
ports:
|
|
- containerPort: 80
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: frontend
|
|
namespace: requirements-periodic-table
|
|
spec:
|
|
selector:
|
|
app: frontend
|
|
ports:
|
|
- port: 80
|
|
targetPort: 80
|
|
name: http
|
|
type: LoadBalancer
|