|
|
|
|
apiVersion: apps/v1
|
|
|
|
|
kind: Deployment
|
|
|
|
|
metadata:
|
|
|
|
|
name: autoflow-server
|
|
|
|
|
namespace: etri
|
|
|
|
|
spec:
|
|
|
|
|
replicas: 1
|
|
|
|
|
selector:
|
|
|
|
|
matchLabels:
|
|
|
|
|
app: autoflow-server
|
|
|
|
|
template:
|
|
|
|
|
metadata:
|
|
|
|
|
labels:
|
|
|
|
|
app: autoflow-server
|
|
|
|
|
spec:
|
|
|
|
|
nodeSelector:
|
|
|
|
|
nodegroup: cpu
|
|
|
|
|
containers:
|
|
|
|
|
- name: autoflow-server
|
|
|
|
|
image: autoflow-server:latest
|
|
|
|
|
imagePullPolicy: IfNotPresent
|
|
|
|
|
ports:
|
|
|
|
|
- containerPort: 8080
|
|
|
|
|
env:
|
|
|
|
|
- name: RDS_HOSTNAME
|
|
|
|
|
value: "INTERNAL_RDS_IP_HERE"
|
|
|
|
|
- name: RDS_USERNAME
|
|
|
|
|
value: "admin"
|
|
|
|
|
- name: RDS_PASSWORD
|
|
|
|
|
valueFrom:
|
|
|
|
|
secretKeyRef:
|
|
|
|
|
name: autoflow-secrets
|
|
|
|
|
key: rds-password
|
|
|
|
|
- name: JWT_SECRET
|
|
|
|
|
valueFrom:
|
|
|
|
|
secretKeyRef:
|
|
|
|
|
name: autoflow-secrets
|
|
|
|
|
key: jwt-secret
|
|
|
|
|
- name: S3_BUCKET_NAME
|
|
|
|
|
value: "autoflow-outpost-bucket"
|
|
|
|
|
livenessProbe:
|
|
|
|
|
httpGet:
|
|
|
|
|
path: /autoflow-server-mgmt/actuator/health
|
|
|
|
|
port: 8080
|
|
|
|
|
initialDelaySeconds: 60
|
|
|
|
|
periodSeconds: 15
|
|
|
|
|
readinessProbe:
|
|
|
|
|
httpGet:
|
|
|
|
|
path: /autoflow-server-mgmt/actuator/health
|
|
|
|
|
port: 8080
|
|
|
|
|
initialDelaySeconds: 60
|
|
|
|
|
periodSeconds: 15
|
|
|
|
|
volumeMounts:
|
|
|
|
|
- name: storage-volume
|
|
|
|
|
mountPath: /app/storage
|
|
|
|
|
volumes:
|
|
|
|
|
- name: storage-volume
|
|
|
|
|
persistentVolumeClaim:
|
|
|
|
|
claimName: autoflow-storage-pvc
|
|
|
|
|
---
|
|
|
|
|
apiVersion: v1
|
|
|
|
|
kind: PersistentVolumeClaim
|
|
|
|
|
metadata:
|
|
|
|
|
name: autoflow-storage-pvc
|
|
|
|
|
namespace: etri
|
|
|
|
|
spec:
|
|
|
|
|
accessModes:
|
|
|
|
|
- ReadWriteOnce
|
|
|
|
|
storageClassName: gp2
|
|
|
|
|
resources:
|
|
|
|
|
requests:
|
|
|
|
|
storage: 10Gi
|
|
|
|
|
---
|
|
|
|
|
apiVersion: v1
|
|
|
|
|
kind: Service
|
|
|
|
|
metadata:
|
|
|
|
|
name: autoflow-server-svc
|
|
|
|
|
namespace: etri
|
|
|
|
|
spec:
|
|
|
|
|
selector:
|
|
|
|
|
app: autoflow-server
|
|
|
|
|
ports:
|
|
|
|
|
- protocol: TCP
|
|
|
|
|
port: 80
|
|
|
|
|
targetPort: 8080
|
|
|
|
|
type: ClusterIP
|
|
|
|
|
---
|
|
|
|
|
apiVersion: networking.k8s.io/v1
|
|
|
|
|
kind: Ingress
|
|
|
|
|
metadata:
|
|
|
|
|
name: autoflow-server-ingress
|
|
|
|
|
namespace: etri
|
|
|
|
|
annotations:
|
|
|
|
|
alb.ingress.kubernetes.io/scheme: internet-facing
|
|
|
|
|
alb.ingress.kubernetes.io/target-type: ip
|
|
|
|
|
alb.ingress.kubernetes.io/backend-protocol: HTTP
|
|
|
|
|
# [수정 필요] 실제 서브넷 ID 및 보안 그룹 ID 입력 필요
|
|
|
|
|
alb.ingress.kubernetes.io/subnets: subnet-xxxx, subnet-yyyy
|
|
|
|
|
alb.ingress.kubernetes.io/group.name: etri-group
|
|
|
|
|
alb.ingress.kubernetes.io/security-groups: sg-xxxx
|
|
|
|
|
alb.ingress.kubernetes.io/customer-owned-ipv4-pool: ipv4pool-xxxx
|
|
|
|
|
alb.ingress.kubernetes.io/healthcheck-protocol: HTTP
|
|
|
|
|
alb.ingress.kubernetes.io/healthcheck-path: /autoflow-server-mgmt/actuator/health
|
|
|
|
|
alb.ingress.kubernetes.io/healthcheck-interval-seconds: "15"
|
|
|
|
|
alb.ingress.kubernetes.io/healthy-threshold-count: "2"
|
|
|
|
|
alb.ingress.kubernetes.io/unhealthy-threshold-count: "3"
|
|
|
|
|
alb.ingress.kubernetes.io/success-codes: "200"
|
|
|
|
|
spec:
|
|
|
|
|
ingressClassName: alb
|
|
|
|
|
rules:
|
|
|
|
|
- http:
|
|
|
|
|
paths:
|
|
|
|
|
- path: /autoflow-server-mgmt
|
|
|
|
|
pathType: Prefix
|
|
|
|
|
backend:
|
|
|
|
|
service:
|
|
|
|
|
name: autoflow-server-svc
|
|
|
|
|
port:
|
|
|
|
|
number: 80
|