apiVersion: "apps/v1"
kind: "Deployment"
metadata:
  labels:
    app.kubernetes.io/name: "{{ .Release.Name }}"
  name: "{{ .Release.Name }}"
spec:
  minReadySeconds: 60
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: "{{ .Release.Name }}"
  strategy:
    type: "RollingUpdate"
  template:
    metadata:
      labels:
        app.kubernetes.io/name: "{{ .Release.Name }}"
    spec:
      serviceAccountName: "{{ .Release.Name }}"
      containers:
        - name: "{{ .Release.Name }}"
          image: "{{ .Values.image.registry }}/{{ .Values.image.organization }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}"
          imagePullPolicy: "IfNotPresent"
          securityContext:
            readOnlyRootFilesystem: true
            runAsNonRoot: true
            runAsUser: 1000
          resources:
            limits:
              cpu: "100m"
              memory: "50Mi"
            requests:
              cpu: "10m"
              memory: "50Mi"
      restartPolicy: "Always"
