68 lines
1.6 KiB
YAML
68 lines
1.6 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: frontend-app-syifa
|
|
#namespace: intern-workspace
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: frontend-datasiswa
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: frontend-datasiswa
|
|
spec:
|
|
serviceAccountName: frontend-sa-syifa
|
|
securityContext:
|
|
runAsUser: 1000
|
|
runAsGroup: 3000
|
|
fsGroup: 2000
|
|
containers:
|
|
- name: frontend
|
|
image: syifamaulidya/frontend-app:v1
|
|
ports:
|
|
- containerPort: 3000
|
|
env:
|
|
- name: REACT_APP_API_URL
|
|
value: "http://backend-app-syifa:5000/api/auth/login"
|
|
resources:
|
|
requests:
|
|
memory: "256Mi"
|
|
cpu: "100m"
|
|
limits:
|
|
memory: "512Mi"
|
|
cpu: "200m"
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: 3000
|
|
initialDelaySeconds: 30
|
|
timeoutSeconds: 5
|
|
periodSeconds: 10
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: 3000
|
|
initialDelaySeconds: 60
|
|
timeoutSeconds: 5
|
|
periodSeconds: 15
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
runAsNonRoot: true
|
|
readOnlyRootFilesystem: false
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: frontend-app-syifa
|
|
#namespace: intern-workspace
|
|
spec:
|
|
type: NodePort
|
|
selector:
|
|
app: frontend-datasiswa
|
|
ports:
|
|
- port: 3000
|
|
targetPort: 3000
|
|
nodePort: 30068
|
|
protocol: TCP |