carts/manifests/manifest-carts.yaml

89 lines
2.1 KiB
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: carts
namespace: sockshop-hardening
spec:
replicas: 1
selector:
matchLabels:
app: carts
template:
metadata:
labels:
app: carts
version: v1
deployment: carts
spec:
containers:
- name: carts
image: docker.io/keptnexamples/carts:0.13.1
env:
- name: JAVA_OPTS
value: -Xms128m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=128m -XX:+UseG1GC -Djava.security.egd=file:/dev/urandom
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: "metadata.name"
- name: KUBERNETES_NAMESPACE
valueFrom:
fieldRef:
fieldPath: "metadata.namespace"
- name: DEPLOYMENT_NAME
valueFrom:
fieldRef:
fieldPath: "metadata.labels['deployment']"
- name: CONTAINER_IMAGE
value: docker.io/keptnexamples/carts:0.13.1
- name: DT_CUSTOM_PROP
value: "keptn_stage=hardening keptn_project=sockshop keptn_service=carts"
resources:
limits:
cpu: 500m
memory: 1024Mi
requests:
cpu: 400m
memory: 768Mi
ports:
- containerPort: 8080
volumeMounts:
- mountPath: /tmp
name: tmp-volume
livenessProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 60
periodSeconds: 10
timeoutSeconds: 15
readinessProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 60
periodSeconds: 10
timeoutSeconds: 15
volumes:
- name: tmp-volume
emptyDir:
medium: Memory
nodeSelector:
beta.kubernetes.io/os: linux
---
apiVersion: v1
kind: Service
metadata:
name: carts
labels:
app: carts
namespace: sockshop-hardening
spec:
ports:
- name: http
port: 80
targetPort: 8080
selector:
app: carts
type: LoadBalancer