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%
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: techtrends
    spec:
      containers:
      - image: vykhvan/techtrends:latest
        imagePullPolicy: IfNotPresent 
        name: techtrends
        ports:
        - containerPort: 3111
          protocol: TCP
        livenessProbe:
          httpGet:
            path: /healthz
            port: 3111
        readinessProbe:
          httpGet:
            path: /healthz
            port: 3111
        resources:
          requests:
            memory: "64Mi"
            cpu: "250m"
          limits:
            memory: "128Mi"
            cpu: "500m"
