Files
litecharmsshop/litecharms-shop-uat.yml
T
2026-05-09 17:11:43 +02:00

163 lines
4.2 KiB
YAML

---
apiVersion: v1
kind: Namespace
metadata:
name: litecharms-shop-uat
---
apiVersion: v1
kind: ConfigMap
metadata:
name: shop-config
namespace: litecharms-shop-uat
data:
ASPNETCORE_ENVIRONMENT: "Development"
ASPNETCORE_URLS: "http://0.0.0.0:8080"
Monitoring__Address: "http://aspire-dashboard-service.aspire.svc.cluster.local:18889"
Monitoring__ServiceName: "LiteCharms.Shop.Uat"
---
apiVersion: v1
kind: Secret
metadata:
name: shop-secrets
namespace: litecharms-shop-uat
type: Opaque
data:
connection-string: SG9zdD0xOTIuMTY4LjEuMTcwO0RhdGFiYXNlPWxlYWRnZW5lcmF0b3ItZGV2O1VzZXJuYW1lPWxlYWRnZW5lcmF0b3I7UGFzc3dvcmQ9S2VLNDRsczRQWHBuYms7UGVyc2lzdCBTZWN1cml0eSBJbmZvPVRydWU=
quartz-store: SG9zdD0xOTIuMTY4LjEuMTcwO0RhdGFiYXNlPXNjaGVkdWxlci1kZXY7VXNlcm5hbWU9c2NoZWR1bGVyLWRldi11c2VyO1Bhc3N3b3JkPWtWVm1vV0tKM3h6Z1FYO1BlcnNpc3QgU2VjdXJpdHkgSW5mbz1UcnVl
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: shop-data-pvc
namespace: litecharms-shop-uat
spec:
accessModes: ["ReadWriteMany"]
storageClassName: nfs-storage
resources:
requests:
storage: 2Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: litecharms-shop
namespace: litecharms-shop-uat
spec:
replicas: 1
selector:
matchLabels:
app: shop
template:
metadata:
labels:
app: shop
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: DoesNotExist
containers:
- name: shop
image: nexus.khongisa.co.za/litecharms-shop:latest
resources:
limits:
memory: "512Mi"
cpu: "500m"
requests:
memory: "256Mi"
cpu: "100m"
ports:
- containerPort: 8080
envFrom:
- configMapRef:
name: shop-config
env:
- name: ConnectionStrings__PostgresScheduler
valueFrom:
secretKeyRef:
name: shop-secrets
key: quartz-store
- name: ConnectionStrings__PostgresShop
valueFrom:
secretKeyRef:
name: shop-secrets
key: connection-string
- name: ConnectionStrings__DiscordShop
valueFrom:
secretKeyRef:
name: shop-secrets
key: discord-webhook
- name: Monitoring__Address
valueFrom:
configMapKeyRef:
name: shop-config
key: Monitoring__Address
- name: Monitoring__ServiceName
valueFrom:
configMapKeyRef:
name: shop-config
key: Monitoring__ServiceName
- name: Monitoring__ApiKey
valueFrom:
secretKeyRef:
name: shop-secrets
key: aspire-apikey
volumeMounts:
- name: data
mountPath: /app/wwwroot/content
resources:
livenessProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 5
periodSeconds: 10
readinessProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 3
periodSeconds: 5
volumes:
- name: data
persistentVolumeClaim:
claimName: shop-data-pvc
---
apiVersion: v1
kind: Service
metadata:
name: shop-service
namespace: litecharms-shop-uat
spec:
type: ClusterIP
selector:
app: shop
ports:
- name: http
protocol: TCP
port: 80
targetPort: 8080
---
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: shop-web-secure
namespace: litecharms-shop-uat
spec:
entryPoints:
- websecure
routes:
- match: Host(`shop.uat.khongisa.co.za`)
kind: Rule
services:
- name: shop-service
port: 80
sticky:
cookie:
name: "lp-sticky-session"
httpOnly: true
secure: true
tls: {}