apiVersion: apps/v1
kind: Deployment
metadata:
  name: techtrends-deploy
  labels:
    app: techtrends-app
  namespace: sandbox
spec:
  replicas: 1
  selector:
    matchLabels:
      app: techtrends-app
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: techtrends-app
    spec:
      containers:
      - name: techtrends
        image: apthagowda/techtrends:latest
        imagePullPolicy: IfNotPresent
        resources:
          requests:
            cpu: 250m
            memory: 64Mi
          limits:
            cpu: 500m
            memory: 128Mi
        ports:
        - containerPort: 3111
        livenessProbe:
          httpGet:
            path: /healthz
            port: 3111
          initialDelaySeconds: 3
          periodSeconds: 5
        readinessProbe:
          httpGet:
            path: /healthz
            port: 3111
          initialDelaySeconds: 3
          periodSeconds: 5
