apiVersion: apps/v1
kind: Deployment
metadata:
    name: sa-webapp
    labels:
        app: sa
        component: webapp
spec:
    selector:
        matchLabels:
            app: sa
            component: webapp
    replicas: 2
    minReadySeconds: 15
    strategy:
        type: RollingUpdate
        rollingUpdate:
            maxUnavailable: 1
            maxSurge: 1
    template:
        metadata:
            labels:
                app: sa
                component: webapp
        spec:
            containers:
                - image: rinormaloku/sentiment-analysis-web-app:feedback
                  imagePullPolicy: Always
                  name: sa-webapp
                  env:
                      - name: SA_LOGIC_API_URL
                        value: "http://sa-logic"
                  ports:
                      - containerPort: 8080
