apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    litmuschaos.io/chaos: "true"
  labels:
    app: sock-shop
    name: front-end
  name: front-end
  namespace: sock-shop
spec:
  replicas: 1
  selector:
    matchLabels:
      app: sock-shop
      name: front-end
  template:
    metadata:
      labels:
        app: sock-shop
        name: front-end
    spec:
      containers:
      - image: weaveworksdemos/front-end:0.3.12
        imagePullPolicy: IfNotPresent
        name: front-end
        ports:
        - containerPort: 8079
          protocol: TCP
        resources:
          requests:
            cpu: 100m
            memory: 100Mi
        livenessProbe:
          httpGet:
            path: /
            port: 8079
          initialDelaySeconds: 300
          periodSeconds: 3
        readinessProbe:
          httpGet:
            path: /
            port: 8079
          initialDelaySeconds: 30
          periodSeconds: 3
        securityContext:
          capabilities:
            drop:
            - all
          readOnlyRootFilesystem: true
          runAsNonRoot: true
          runAsUser: 10001
---
apiVersion: v1
kind: Service
metadata:
  name: front-end
  labels:
    name: front-end
  namespace: sock-shop
spec:
  type: LoadBalancer
  ports:
  - port: 80
    targetPort: 8079
    nodePort: 30001
  selector:
    name: front-end

