mirror of
https://github.com/won-ktds/smarketing-manifest.git
synced 2025-12-06 16:26:24 +00:00
Initial manifest files for smarketing services
This commit is contained in:
parent
aeb5844998
commit
8694e4e0e0
22
smarketing/common/common-config.yaml
Normal file
22
smarketing/common/common-config.yaml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: common-config
|
||||||
|
namespace: smarketing
|
||||||
|
data:
|
||||||
|
ALLOWED_ORIGINS: "http://20.249.154.194"
|
||||||
|
JPA_DDL_AUTO: "update"
|
||||||
|
JPA_SHOW_SQL: "true"
|
||||||
|
MANAGEMENT_ENDPOINTS_WEB_EXPOSURE_INCLUDE: "*"
|
||||||
|
MANAGEMENT_ENDPOINT_HEALTH_SHOW_DETAILS: "always"
|
||||||
|
MANAGEMENT_ENDPOINT_HEALTH_ENABLED: "true"
|
||||||
|
MANAGEMENT_ENDPOINTS_WEB_BASE_PATH: "/actuator"
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: common-secret
|
||||||
|
namespace: smarketing
|
||||||
|
stringData:
|
||||||
|
JWT_SECRET_KEY: "8O2HQ13etL2BWZvYOiWsJ5uWFoLi6NBUG8divYVoCgtHVvlk3dqRksMl16toztDUeBTSIuOOPvHIrYq11G2BwQ"
|
||||||
|
type: Opaque
|
||||||
41
smarketing/common/ingress.yaml
Normal file
41
smarketing/common/ingress.yaml
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: smarketing-ingress
|
||||||
|
namespace: smarketing
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: nginx
|
||||||
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
|
rules:
|
||||||
|
- host: smarketing.20.249.184.228.nip.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /api/auth
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: member
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
|
- path: /api/store
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: store
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
|
- path: /api/content
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: marketing-content
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
|
- path: /api/recommend
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: ai-recommend
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
@ -0,0 +1,80 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: ai-recommend-config
|
||||||
|
namespace: smarketing
|
||||||
|
data:
|
||||||
|
SERVER_PORT: "8084"
|
||||||
|
POSTGRES_HOST: "psql-digitalgarage-02.postgres.database.azure.com"
|
||||||
|
POSTGRES_PORT: "5432"
|
||||||
|
POSTGRES_DB: "AiRecommendationDB"
|
||||||
|
REDIS_HOST: "redis-digitalgarage-02.redis.cache.windows.net"
|
||||||
|
REDIS_PORT: "6380"
|
||||||
|
JPA_DDL_AUTO: "create-drop"
|
||||||
|
JPA_SHOW_SQL: "true"
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: ai-recommend-secret
|
||||||
|
namespace: smarketing
|
||||||
|
stringData:
|
||||||
|
POSTGRES_USER: "pgadmin"
|
||||||
|
POSTGRES_PASSWORD: "DG_Won!"
|
||||||
|
REDIS_PASSWORD: "bOpPbvYhUF8toxgHDfOJlG62HTtgX2AwxAzCaDajg2w="
|
||||||
|
type: Opaque
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: ai-recommend
|
||||||
|
namespace: smarketing
|
||||||
|
labels:
|
||||||
|
app: ai-recommend
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: ai-recommend
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: ai-recommend
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: acr-secret
|
||||||
|
containers:
|
||||||
|
- name: ai-recommend
|
||||||
|
image: acrdigitalgarage02.azurecr.io/smarketing/ai-recommend:latest
|
||||||
|
imagePullPolicy: Always
|
||||||
|
ports:
|
||||||
|
- containerPort: 8084
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 128Mi
|
||||||
|
limits:
|
||||||
|
cpu: 500m
|
||||||
|
memory: 512Mi
|
||||||
|
envFrom:
|
||||||
|
- configMapRef:
|
||||||
|
name: common-config
|
||||||
|
- configMapRef:
|
||||||
|
name: ai-recommend-config
|
||||||
|
- secretRef:
|
||||||
|
name: common-secret
|
||||||
|
- secretRef:
|
||||||
|
name: ai-recommend-secret
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: ai-recommend
|
||||||
|
namespace: smarketing
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: ai-recommend
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: 8084
|
||||||
|
type: ClusterIP
|
||||||
@ -0,0 +1,80 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: marketing-content-config
|
||||||
|
namespace: smarketing
|
||||||
|
data:
|
||||||
|
SERVER_PORT: "8083"
|
||||||
|
POSTGRES_HOST: "psql-digitalgarage-02.postgres.database.azure.com"
|
||||||
|
POSTGRES_PORT: "5432"
|
||||||
|
POSTGRES_DB: "MarketingContentDB"
|
||||||
|
REDIS_HOST: "redis-digitalgarage-02.redis.cache.windows.net"
|
||||||
|
REDIS_PORT: "6380"
|
||||||
|
JPA_DDL_AUTO: "create-drop"
|
||||||
|
JPA_SHOW_SQL: "true"
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: marketing-content-secret
|
||||||
|
namespace: smarketing
|
||||||
|
stringData:
|
||||||
|
POSTGRES_USER: "pgadmin"
|
||||||
|
POSTGRES_PASSWORD: "DG_Won!"
|
||||||
|
REDIS_PASSWORD: "bOpPbvYhUF8toxgHDfOJlG62HTtgX2AwxAzCaDajg2w="
|
||||||
|
type: Opaque
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: marketing-content
|
||||||
|
namespace: smarketing
|
||||||
|
labels:
|
||||||
|
app: marketing-content
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: marketing-content
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: marketing-content
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: acr-secret
|
||||||
|
containers:
|
||||||
|
- name: marketing-content
|
||||||
|
image: acrdigitalgarage02.azurecr.io/smarketing/marketing-content:latest
|
||||||
|
imagePullPolicy: Always
|
||||||
|
ports:
|
||||||
|
- containerPort: 8083
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 128Mi
|
||||||
|
limits:
|
||||||
|
cpu: 500m
|
||||||
|
memory: 512Mi
|
||||||
|
envFrom:
|
||||||
|
- configMapRef:
|
||||||
|
name: common-config
|
||||||
|
- configMapRef:
|
||||||
|
name: marketing-content-config
|
||||||
|
- secretRef:
|
||||||
|
name: common-secret
|
||||||
|
- secretRef:
|
||||||
|
name: marketing-content-secret
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: marketing-content
|
||||||
|
namespace: smarketing
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: marketing-content
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: 8083
|
||||||
|
type: ClusterIP
|
||||||
82
smarketing/deployments/member/member-deployment.yaml
Normal file
82
smarketing/deployments/member/member-deployment.yaml
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: member-config
|
||||||
|
namespace: smarketing
|
||||||
|
data:
|
||||||
|
SERVER_PORT: "8081"
|
||||||
|
POSTGRES_HOST: "psql-digitalgarage-02.postgres.database.azure.com"
|
||||||
|
POSTGRES_PORT: "5432"
|
||||||
|
POSTGRES_DB: "MemberDB"
|
||||||
|
REDIS_HOST: "redis-digitalgarage-02.redis.cache.windows.net"
|
||||||
|
REDIS_PORT: "6380"
|
||||||
|
JPA_DDL_AUTO: "create-drop"
|
||||||
|
JPA_SHOW_SQL: "true"
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: member-secret
|
||||||
|
namespace: smarketing
|
||||||
|
stringData:
|
||||||
|
JWT_ACCESS_TOKEN_VALIDITY: "3600000"
|
||||||
|
JWT_REFRESH_TOKEN_VALIDITY: "86400000"
|
||||||
|
POSTGRES_USER: "pgadmin"
|
||||||
|
POSTGRES_PASSWORD: "DG_Won!"
|
||||||
|
REDIS_PASSWORD: "bOpPbvYhUF8toxgHDfOJlG62HTtgX2AwxAzCaDajg2w="
|
||||||
|
type: Opaque
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: member
|
||||||
|
namespace: smarketing
|
||||||
|
labels:
|
||||||
|
app: member
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: member
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: member
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: acr-secret
|
||||||
|
containers:
|
||||||
|
- name: member
|
||||||
|
image: acrdigitalgarage02.azurecr.io/smarketing/member:latest
|
||||||
|
imagePullPolicy: Always
|
||||||
|
ports:
|
||||||
|
- containerPort: 8081
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 128Mi
|
||||||
|
limits:
|
||||||
|
cpu: 500m
|
||||||
|
memory: 512Mi
|
||||||
|
envFrom:
|
||||||
|
- configMapRef:
|
||||||
|
name: common-config
|
||||||
|
- configMapRef:
|
||||||
|
name: member-config
|
||||||
|
- secretRef:
|
||||||
|
name: common-secret
|
||||||
|
- secretRef:
|
||||||
|
name: member-secret
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: member
|
||||||
|
namespace: smarketing
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: member
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: 8081
|
||||||
|
type: ClusterIP
|
||||||
80
smarketing/deployments/store/store-deployment.yaml
Normal file
80
smarketing/deployments/store/store-deployment.yaml
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: store-config
|
||||||
|
namespace: smarketing
|
||||||
|
data:
|
||||||
|
SERVER_PORT: "8082"
|
||||||
|
POSTGRES_HOST: "psql-digitalgarage-02.postgres.database.azure.com"
|
||||||
|
POSTGRES_PORT: "5432"
|
||||||
|
POSTGRES_DB: "StoreDB"
|
||||||
|
REDIS_HOST: "redis-digitalgarage-02.redis.cache.windows.net"
|
||||||
|
REDIS_PORT: "6380"
|
||||||
|
JPA_DDL_AUTO: "create-drop"
|
||||||
|
JPA_SHOW_SQL: "true"
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: store-secret
|
||||||
|
namespace: smarketing
|
||||||
|
stringData:
|
||||||
|
POSTGRES_USER: "pgadmin"
|
||||||
|
POSTGRES_PASSWORD: "DG_Won!"
|
||||||
|
REDIS_PASSWORD: "bOpPbvYhUF8toxgHDfOJlG62HTtgX2AwxAzCaDajg2w="
|
||||||
|
type: Opaque
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: store
|
||||||
|
namespace: smarketing
|
||||||
|
labels:
|
||||||
|
app: store
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: store
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: store
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: acr-secret
|
||||||
|
containers:
|
||||||
|
- name: store
|
||||||
|
image: acrdigitalgarage02.azurecr.io/smarketing/store:latest
|
||||||
|
imagePullPolicy: Always
|
||||||
|
ports:
|
||||||
|
- containerPort: 8082
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 128Mi
|
||||||
|
limits:
|
||||||
|
cpu: 500m
|
||||||
|
memory: 512Mi
|
||||||
|
envFrom:
|
||||||
|
- configMapRef:
|
||||||
|
name: common-config
|
||||||
|
- configMapRef:
|
||||||
|
name: store-config
|
||||||
|
- secretRef:
|
||||||
|
name: common-secret
|
||||||
|
- secretRef:
|
||||||
|
name: store-secret
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: store
|
||||||
|
namespace: smarketing
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: store
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: 8082
|
||||||
|
type: ClusterIP
|
||||||
Loading…
x
Reference in New Issue
Block a user