deployments/checkout/deployment.yaml

51 lines
1.1 KiB
YAML

apiVersion: v1
kind: ServiceAccount
metadata:
name: checkout-sa
namespace: payments
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: checkout
namespace: payments
labels:
app: checkout
spec:
replicas: 1
selector:
matchLabels:
app: checkout
template:
metadata:
labels:
app: checkout
spec:
serviceAccountName: checkout-sa
containers:
- name: checkout
image: harbor.mxhunt.in/k8s-lab/checkout:b60ac40177b1124d7b7ad71aaa9655616b60cd13
env:
- name: PAYMENT_API_URL
value: "http://payment-api:8080/transactions"
resources:
requests:
memory: "64Mi"
cpu: "100m"
limits:
memory: "128Mi"
cpu: "200m"
securityContext:
runAsNonRoot: true
runAsUser: 1000
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
volumeMounts:
- name: tmp
mountPath: /tmp
volumes:
- name: tmp
emptyDir: {}
imagePullSecrets:
- name: harbor-secret