apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ .Values.appName }}
  namespace: {{ .Values.nameSpace }}
spec:
  selector:
    matchLabels:
      app: {{ .Values.appName }}
  template:
    metadata:
      labels:
        app: {{ .Values.appName }}
    spec:
      containers:
      - name: {{ .Values.appName }}
        image: "{{ .Values.appImage }}:{{ .Values.appVersion }}"
        ports:
        - containerPort: {{ .Values.containerPort }}
        volumeMounts:
        - mountPath: {{ .Values.containerVolumeMountPath }}
          name: {{ .Values.containerVolumeMountName }}
        resources:
          limits:
            memory: {{ .Values.appMemoryRequest }}
            cpu: {{ .Values.appCPURequest }}
          requests:
            cpu: {{ .Values.appCPULimit }}
            memory:  {{ .Values.appMemoryLimit }}
      volumes:
      - name: {{ .Values.containerVolumeMountName }}
        emptyDir: {}