81 lines
1.6 KiB
YAML

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:20250619062526
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