apiVersion: apps/v1
kind: Deployment
metadata:
  name: nominatim-api
  namespace: business-service
  labels:
    app: nominatim-api
spec:
  replicas: 2
  selector:
    matchLabels:
      app: nominatim-api
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 3
      maxUnavailable: 1
  template:
    metadata:
      labels:
        app: nominatim-api
        date: DATE_DEPLOYMENT
    spec:
      containers:
      - name: nominatim-api
        image: registry.computaceae-it.tech/cit-nominatim-api
        imagePullPolicy: Always
        command: ["sh"]
        args: ["/app/startapache.sh"]
        resources:
          requests:
            cpu: 100m
            memory: 15Mi
          limits:
            cpu: 500m
            memory: 500Mi
        ports:
        - name: http
          containerPort: 8080
          protocol: TCP
#        startupProbe:
#          initialDelaySeconds: 30
#          failureThreshold: 3
#          periodSeconds: 10
#          httpGet:
#            path: /
#            port: 8080
#        livenessProbe:
#          periodSeconds: 30
#          failureThreshold: 3
#          timeoutSeconds: 3
#          httpGet:
#            path: /
#            port: 8080
            
