apiVersion: apps/v1
kind: Deployment
metadata:
  name: udacity-cloud-devops-capstone
spec:
  selector:
    matchLabels:
      app: capstone
  strategy:
    rollingUpdate:
      maxSurge: 2
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: capstone
    spec:
      containers:
      - name: capstone
        image: khaledabdelhamid98/devops-capestone
        imagePullPolicy: Always
        resources:
          limits:
            memory: "128Mi"
            cpu: "500m"
        ports:
        - containerPort: 80
