Apps/RatingsApp/3b-ratings-web-deployment.yaml (41 lines of code) (raw):
apiVersion: apps/v1
kind: Deployment
metadata:
name: ratings-web
spec:
selector:
matchLabels:
app: ratings-web
template:
metadata:
labels:
app: ratings-web # the label for the pods and the deployments
spec:
serviceAccountName: svcrattingsapp
volumes:
- name: aks-tls-akv
csi:
driver: secrets-store.csi.k8s.io
readOnly: true
volumeAttributes:
secretProviderClass: "aks-tls-akv"
containers:
- name: ratings-web
image: <acr name>.azurecr.io/ratings-web:v1 # IMPORTANT: update with your own repository
imagePullPolicy: Always
ports:
- containerPort: 8080 # the application listens to this port
env:
- name: API # the application expects to connect to the API at this endpoint
value: http://ratings-api.ratingsapp.svc.cluster.local
resources:
requests: # minimum resources required
cpu: 250m
memory: 64Mi
limits: # maximum resources allocated
cpu: 500m
memory: 512Mi
volumeMounts:
- name: aks-tls-akv
mountPath: /mnt/secrets-store
readOnly: true