160 lines
4.2 KiB
YAML
160 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: SG9zdD0xOTIuMTY4LjEuMTcwO0RhdGFiYXNlPXNob3AtZGV2O1VzZXJuYW1lPXNob3AtZGV2LXVzZXI7UGFzc3dvcmQ9a1ZWbW9XS0ozeHpnUVg7UGVyc2lzdCBTZWN1cml0eSBJbmZvPVRydWU=
|
|
connection-string-quartz: SG9zdD0xOTIuMTY4LjEuMTcwO0RhdGFiYXNlPXNjaGVkdWxlci1kZXY7VXNlcm5hbWU9c2NoZWR1bGVyLWRldi11c2VyO1Bhc3N3b3JkPWtWVm1vV0tKM3h6Z1FYO1BlcnNpc3QgU2VjdXJpdHkgSW5mbz1UcnVl
|
|
aspire-apikey: bWMzRzYzSzJqNVpPRXNpMEFqTW9qTFRYbTFLRVpGY3R6SUlqU3dEaVRHdXQ4cUdTa1B1V3d4R1AxUmJzY0pVbw==
|
|
---
|
|
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: 2
|
|
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
|
|
imagePullPolicy: Always
|
|
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: connection-string-quartz
|
|
- name: ConnectionStrings__PostgresShop
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: shop-secrets
|
|
key: connection-string
|
|
- 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: {} |