apiVersion: v1 kind: Secret metadata: name: autoflow-secrets namespace: etri-aisw type: Opaque stringData: rds-password: "cuuva" jwt-secret: "275511b31c520562d69802ce4a913773102563891563a24062f44b3f312ca2bd034440e81836d1b4ccf4195f43db4c81a4e489a41f1ae0967afe468c9a361f4d" --- apiVersion: apps/v1 kind: Deployment metadata: name: autoflow-server namespace: etri-aisw 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: "mariadb-svc" - name: RDS_USERNAME value: "cuuva" - 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-aisw spec: accessModes: - ReadWriteOnce storageClassName: gp2 resources: requests: storage: 10Gi --- apiVersion: v1 kind: Service metadata: name: autoflow-server-svc namespace: etri-aisw spec: selector: app: autoflow-server ports: - protocol: TCP port: 80 targetPort: 8080 type: ClusterIP --- apiVersion: apps/v1 kind: Deployment metadata: name: mariadb namespace: etri-aisw spec: replicas: 1 selector: matchLabels: app: mariadb template: metadata: labels: app: mariadb spec: nodeSelector: nodegroup: cpu containers: - name: mariadb image: mariadb:10.5 ports: - containerPort: 3306 env: - name: MYSQL_ROOT_PASSWORD value: "root_password" - name: MYSQL_DATABASE value: "autoflow" - name: MYSQL_USER value: "cuuva" - name: MYSQL_PASSWORD value: "cuuva" volumeMounts: - name: mariadb-data mountPath: /var/lib/mysql - name: init-sql mountPath: /docker-entrypoint-initdb.d volumes: - name: mariadb-data persistentVolumeClaim: claimName: mariadb-pvc - name: init-sql configMap: name: mariadb-init-sql --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: mariadb-pvc namespace: etri-aisw spec: accessModes: - ReadWriteOnce storageClassName: gp2 resources: requests: storage: 20Gi --- apiVersion: v1 kind: Service metadata: name: mariadb-svc namespace: etri spec: selector: app: mariadb ports: - protocol: TCP port: 3306 targetPort: 3306 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