apiVersion: apps/v1
kind: Deployment
metadata:
  name: kvazaric-frontend
  labels:
    app: kvazaric-frontend
    app.kubernetes.io/component: "kvazaric-frontend"
spec:
  replicas: 1
  selector:
    matchLabels:
      app: kvazaric-frontend
      app.kubernetes.io/component: "kvazaric-frontend"
  template:
    metadata:
      labels:
        app: kvazaric-frontend
        app.kubernetes.io/component: "kvazaric-frontend"
      annotations:
        vault.hashicorp.com/agent-inject: "true"
        vault.hashicorp.com/agent-inject-secret-env: demo-app/kvazaric-frontend
        vault.hashicorp.com/agent-inject-template-env: |
          {{- with secret "demo-app/kvazaric-frontend" -}}
          {{- range $key, $value := .Data.data }}
          export {{ $key }}={{ $value }}
          {{- end }}
          {{- end }}
        vault.hashicorp.com/auth-path: auth/kubernetes-local
        vault.hashicorp.com/role: demo-app
    spec:
      imagePullSecrets:
        - name: docker
      serviceAccountName: demo-app
      containers:
        - name: kvazaric-frontend
          image: harbor.disk.lt.t1.cloud/demo-app/frontend:dev-8d74ed10
          imagePullPolicy: Always
          ports:
            - containerPort: 3000
          resources:
            limits:
              cpu: 100m
              memory: 100Mi
            requests:
              cpu: 50m
              memory: 50Mi
