apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ .Values.web.appName }}
spec:
  replicas: {{ .Values.web.image.replicaCount }}
  selector:
    matchLabels:
      component: {{ .Values.web.appName }}
  template:
    metadata:
      labels:
        component: {{ .Values.web.appName }}
    spec:
      imagePullSecrets:
        - name: {{ .Values.web.image.pullSecretName }}
      containers:
        - name: {{ .Values.web.appName }}-{{ randAlphaNum 5 | lower}}
          image: {{ .Values.web.image.azureHubId }}/{{ .Values.web.image.name }}:{{ .Values.web.image.tag }}
          ports:
            - containerPort: {{ .Values.web.port }}
