apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: techtrends
  name: techtrends
  namespace: sandbox
spec:
  replicas: 1
  selector:
    matchLabels:
      app: techtrends
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25% 
  template:
    metadata:
      labels:
        app: techtrends
    spec:
      containers:
        - image: carloshvp/techtrends:latest
          name: techtrends
          resources:
            requests:
              memory: 64Mi
              cpu: 250m
            limits:
              memory: 128Mi
              cpu: 500m
          ports:
            - containerPort: 3111
              protocol: TCP
          livenessProbe:
            httpGet:
              path: /healthz
              port: 3111
          readinessProbe:
            httpGet:
              path: /healthz
              port: 3111 