feat : initial commit
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: api-gateway-config
|
||||
namespace: team1tier-healthsync-ns
|
||||
data:
|
||||
SERVER_PORT: "8080"
|
||||
USER_SERVICE_URL: "http://user-service:80"
|
||||
HEALTH_SERVICE_URL: "http://health-service:80"
|
||||
INTELLIGENCE_SERVICE_URL: "http://intelligence-service:80"
|
||||
GOAL_SERVICE_URL: "http://goal-service:80"
|
||||
MOTIVATOR_SERVICE_URL: "http://motivator-service:80"
|
||||
@@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: common-config
|
||||
namespace: team1tier-healthsync-ns
|
||||
data:
|
||||
ALLOWED_ORIGINS: "http://20.249.193.105"
|
||||
POSTGRES_HOST: "psql-digitalgarage-01.postgres.database.azure.com"
|
||||
POSTGRES_PORT: "5432"
|
||||
REDIS_HOST: "redis-digitalgarage-01.redis.cache.windows.net"
|
||||
REDIS_PORT: "6380"
|
||||
REDIS_USE_SSL: "true"
|
||||
SERVICE_BUS_NAMESPACE: "sb-healthsync.servicebus.windows.net"
|
||||
@@ -0,0 +1,8 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: goal-service-config
|
||||
namespace: team1tier-healthsync-ns
|
||||
data:
|
||||
SERVER_PORT: "8084"
|
||||
POSTGRES_DB: "healthsync_goal"
|
||||
@@ -0,0 +1,8 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: health-service-config
|
||||
namespace: team1tier-healthsync-ns
|
||||
data:
|
||||
SERVER_PORT: "8082"
|
||||
POSTGRES_DB: "healthsync_health"
|
||||
@@ -0,0 +1,8 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: intelligence-service-config
|
||||
namespace: team1tier-healthsync-ns
|
||||
data:
|
||||
SERVER_PORT: "8083"
|
||||
POSTGRES_DB: "healthsync_intelligence"
|
||||
@@ -0,0 +1,8 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: motivator-service-config
|
||||
namespace: team1tier-healthsync-ns
|
||||
data:
|
||||
SERVER_PORT: "8085"
|
||||
POSTGRES_DB: "healthsync_motivator"
|
||||
@@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: user-service-config
|
||||
namespace: team1tier-healthsync-ns
|
||||
data:
|
||||
SERVER_PORT: "8081"
|
||||
POSTGRES_DB: "healthsync_user"
|
||||
|
||||
# Google OAuth 설정
|
||||
GOOGLE_OAUTH_TOKEN_VERIFY_URL: "https://oauth2.googleapis.com/tokeninfo"
|
||||
GOOGLE_OAUTH_USERINFO_URL: "https://www.googleapis.com/oauth2/v2/userinfo"
|
||||
GOOGLE_OAUTH_ISSUER: "https://accounts.google.com"
|
||||
@@ -0,0 +1,55 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: api-gateway
|
||||
namespace: team1tier-healthsync-ns
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: api-gateway
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: api-gateway
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: acr-secret
|
||||
containers:
|
||||
- name: api-gateway
|
||||
image: acrhealthsync01.azurecr.io/team1tier/api-gateway:1.0.0
|
||||
imagePullPolicy: Always
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: common-config
|
||||
- configMapRef:
|
||||
name: api-gateway-config
|
||||
- secretRef:
|
||||
name: common-secret
|
||||
resources:
|
||||
requests:
|
||||
cpu: 256m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 1024m
|
||||
memory: 1024Mi
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
startupProbe:
|
||||
httpGet:
|
||||
path: /actuator/health
|
||||
port: 8080
|
||||
failureThreshold: 30
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /actuator/health
|
||||
port: 8080
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 15
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /actuator/health
|
||||
port: 8080
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 5
|
||||
@@ -0,0 +1,55 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: goal-service
|
||||
namespace: team1tier-healthsync-ns
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: goal-service
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: goal-service
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: acr-secret
|
||||
containers:
|
||||
- name: goal-service
|
||||
image: acrhealthsync01.azurecr.io/team1tier/goal-service:1.0.0
|
||||
imagePullPolicy: Always
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: common-config
|
||||
- configMapRef:
|
||||
name: goal-service-config
|
||||
- secretRef:
|
||||
name: common-secret
|
||||
resources:
|
||||
requests:
|
||||
cpu: 256m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 1024m
|
||||
memory: 1024Mi
|
||||
ports:
|
||||
- containerPort: 8084
|
||||
startupProbe:
|
||||
httpGet:
|
||||
path: /actuator/health
|
||||
port: 8084
|
||||
failureThreshold: 30
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /actuator/health
|
||||
port: 8084
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 15
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /actuator/health
|
||||
port: 8084
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 5
|
||||
@@ -0,0 +1,55 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: health-service
|
||||
namespace: team1tier-healthsync-ns
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: health-service
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: health-service
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: acr-secret
|
||||
containers:
|
||||
- name: health-service
|
||||
image: acrhealthsync01.azurecr.io/team1tier/health-service:1.0.0
|
||||
imagePullPolicy: Always
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: common-config
|
||||
- configMapRef:
|
||||
name: health-service-config
|
||||
- secretRef:
|
||||
name: common-secret
|
||||
resources:
|
||||
requests:
|
||||
cpu: 256m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 1024m
|
||||
memory: 1024Mi
|
||||
ports:
|
||||
- containerPort: 8082
|
||||
startupProbe:
|
||||
httpGet:
|
||||
path: /actuator/health
|
||||
port: 8082
|
||||
failureThreshold: 30
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /actuator/health
|
||||
port: 8082
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 15
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /actuator/health
|
||||
port: 8082
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 5
|
||||
@@ -0,0 +1,78 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: intelligence-service
|
||||
namespace: team1tier-healthsync-ns
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: intelligence-service
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: intelligence-service
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: acr-secret
|
||||
containers:
|
||||
- name: intelligence-service
|
||||
image: acrhealthsync01.azurecr.io/team1tier/intelligence-service:1.0.0
|
||||
imagePullPolicy: Always
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: common-config
|
||||
- configMapRef:
|
||||
name: intelligence-service-config
|
||||
- secretRef:
|
||||
name: common-secret
|
||||
- secretRef:
|
||||
name: intelligence-secret
|
||||
env:
|
||||
- name: CLAUDE_API_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: intelligence-secret
|
||||
key: CLAUDE_API_KEY
|
||||
- name: CLAUDE_API_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: intelligence-secret
|
||||
key: CLAUDE_API_URL
|
||||
- name: CLAUDE_MODEL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: intelligence-secret
|
||||
key: CLAUDE_MODEL
|
||||
- name: CLAUDE_MAX_TOKENS
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: intelligence-secret
|
||||
key: CLAUDE_MAX_TOKENS
|
||||
resources:
|
||||
requests:
|
||||
cpu: 256m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 1024m
|
||||
memory: 1024Mi
|
||||
ports:
|
||||
- containerPort: 8083
|
||||
startupProbe:
|
||||
httpGet:
|
||||
path: /actuator/health
|
||||
port: 8083
|
||||
failureThreshold: 30
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /actuator/health
|
||||
port: 8083
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 15
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /actuator/health
|
||||
port: 8083
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 5
|
||||
@@ -0,0 +1,57 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: motivator-service
|
||||
namespace: team1tier-healthsync-ns
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: motivator-service
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: motivator-service
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: acr-secret
|
||||
containers:
|
||||
- name: motivator-service
|
||||
image: acrhealthsync01.azurecr.io/team1tier/motivator-service:1.0.0
|
||||
imagePullPolicy: Always
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: common-config
|
||||
- configMapRef:
|
||||
name: motivator-service-config
|
||||
- secretRef:
|
||||
name: common-secret
|
||||
- secretRef:
|
||||
name: servicebus-secret
|
||||
resources:
|
||||
requests:
|
||||
cpu: 256m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 1024m
|
||||
memory: 1024Mi
|
||||
ports:
|
||||
- containerPort: 8085
|
||||
startupProbe:
|
||||
httpGet:
|
||||
path: /actuator/health
|
||||
port: 8085
|
||||
failureThreshold: 30
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /actuator/health
|
||||
port: 8085
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 15
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /actuator/health
|
||||
port: 8085
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 5
|
||||
@@ -0,0 +1,77 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: user-service
|
||||
namespace: team1tier-healthsync-ns
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: user-service
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: user-service
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: acr-secret
|
||||
containers:
|
||||
- name: user-service
|
||||
image: acrhealthsync01.azurecr.io/team1tier/user-service:1.0.0
|
||||
imagePullPolicy: Always
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: common-config
|
||||
- configMapRef:
|
||||
name: user-service-config
|
||||
- secretRef:
|
||||
name: common-secret
|
||||
env:
|
||||
# Google OAuth 관련 환경변수
|
||||
- name: GOOGLE_OAUTH_CLIENT_ID
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: google-oauth-secret
|
||||
key: GOOGLE_OAUTH_CLIENT_ID
|
||||
- name: GOOGLE_OAUTH_JAVASCRIPT_ORIGINS
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: google-oauth-secret
|
||||
key: GOOGLE_OAUTH_JAVASCRIPT_ORIGINS
|
||||
- name: GOOGLE_TOKEN_VERIFY_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: google-oauth-secret
|
||||
key: GOOGLE_TOKEN_VERIFY_URL
|
||||
- name: GOOGLE_USERINFO_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: google-oauth-secret
|
||||
key: GOOGLE_USERINFO_URL
|
||||
resources:
|
||||
requests:
|
||||
cpu: 256m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 1024m
|
||||
memory: 1024Mi
|
||||
ports:
|
||||
- containerPort: 8081
|
||||
startupProbe:
|
||||
httpGet:
|
||||
path: /actuator/health
|
||||
port: 8081
|
||||
failureThreshold: 30
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /actuator/health
|
||||
port: 8081
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 15
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /actuator/health
|
||||
port: 8081
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 5
|
||||
@@ -0,0 +1,63 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: healthsync-ingress
|
||||
namespace: team1tier-healthsync-ns
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/ssl-redirect: "false"
|
||||
nginx.ingress.kubernetes.io/use-regex: "true"
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
rules:
|
||||
- host: team1tier.20.214.196.128.nip.io
|
||||
http:
|
||||
paths:
|
||||
- path: /api/auth
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: user-service
|
||||
port:
|
||||
number: 80
|
||||
- path: /api/users
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: user-service
|
||||
port:
|
||||
number: 80
|
||||
- path: /api/health
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: health-service
|
||||
port:
|
||||
number: 80
|
||||
- path: /api/intelligence
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: intelligence-service
|
||||
port:
|
||||
number: 80
|
||||
- path: /api/goals
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: goal-service
|
||||
port:
|
||||
number: 80
|
||||
- path: /api/motivator
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: motivator-service
|
||||
port:
|
||||
number: 80
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: api-gateway
|
||||
port:
|
||||
number: 80
|
||||
@@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: common-secret
|
||||
namespace: team1tier-healthsync-ns
|
||||
type: Opaque
|
||||
stringData:
|
||||
POSTGRES_USER: "team1tier"
|
||||
POSTGRES_PASSWORD: "Hi5Jessica!"
|
||||
REDIS_PASSWORD: "Hi5Jessica!"
|
||||
JWT_SECRET_KEY: "zAQ4ojw3Tu/OD9g2NHbnn/OErpmonxOWb9ROsDH9UOU="
|
||||
@@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: google-oauth-secret
|
||||
namespace: team1tier-healthsync-ns
|
||||
type: Opaque
|
||||
stringData:
|
||||
GOOGLE_OAUTH_CLIENT_ID: "198383870460-s1s72vgu91nq9qvg5dai28vafj7mlag1.apps.googleusercontent.com"
|
||||
GOOGLE_OAUTH_CLIENT_SECRET: "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"
|
||||
GOOGLE_OAUTH_JAVASCRIPT_ORIGINS: "http://team1tier.20.214.196.128.nip.io"
|
||||
GOOGLE_OAUTH_SCOPE: "openid email profile"
|
||||
GOOGLE_TOKEN_VERIFY_URL: "https://oauth2.googleapis.com/tokeninfo"
|
||||
GOOGLE_USERINFO_URL: "https://www.googleapis.com/oauth2/v2/userinfo"
|
||||
@@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: intelligence-secret
|
||||
namespace: team1tier-healthsync-ns
|
||||
type: Opaque
|
||||
stringData:
|
||||
CLAUDE_API_KEY: "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"
|
||||
CLAUDE_API_URL: "https://api.anthropic.com/v1/messages"
|
||||
CLAUDE_MODEL: "claude-3-sonnet-20240229"
|
||||
CLAUDE_MAX_TOKENS: "1024"
|
||||
@@ -0,0 +1,8 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: servicebus-secret
|
||||
namespace: team1tier-healthsync-ns
|
||||
type: Opaque
|
||||
stringData:
|
||||
SERVICE_BUS_CONNECTION_STRING: "Endpoint=sb://sb-healthsync.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=Zur5rLIi8MNQ8sk3T/TvsdVu+i02bbxaE+ASbCAXvZI="
|
||||
@@ -0,0 +1,89 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: api-gateway
|
||||
namespace: team1tier-healthsync-ns
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 8080
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: api-gateway
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: user-service
|
||||
namespace: team1tier-healthsync-ns
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 8081
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: user-service
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: health-service
|
||||
namespace: team1tier-healthsync-ns
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 8082
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: health-service
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: intelligence-service
|
||||
namespace: team1tier-healthsync-ns
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 8083
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: intelligence-service
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: goal-service
|
||||
namespace: team1tier-healthsync-ns
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 8084
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: goal-service
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: motivator-service
|
||||
namespace: team1tier-healthsync-ns
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 8085
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: motivator-service
|
||||
Reference in New Issue
Block a user