apiVersion: apps/v1
kind: Deployment
metadata:
  name: as400api
  labels:
    app: as400api
spec:
  replicas: 1
  selector:
    matchLabels:
      app: as400api
  template:
    metadata:
      labels:
        app: as400api
    spec:
      containers:
        - name: as400api
          image: as400api:latest
          imagePullPolicy: IfNotPresent
          ports:
            - name: http
              containerPort: 8080
          envFrom:
            - configMapRef:
                name: as400api-config
            - secretRef:
                name: as400api-secrets
          readinessProbe:
            httpGet:
              path: /api/v1/health
              port: http
            initialDelaySeconds: 10
            periodSeconds: 10
          livenessProbe:
            httpGet:
              path: /api/v1/health
              port: http
            initialDelaySeconds: 30
            periodSeconds: 30
          resources:
            requests:
              cpu: "100m"
              memory: "256Mi"
            limits:
              cpu: "500m"
              memory: "512Mi"
