---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: {{ .Values.name }}
  labels:
    app: {{ .Values.name }}
  namespace: {{ .Values.namespace }}
spec:
  replicas: {{ .Values.replicas }}
  selector:
    matchLabels:
      app: {{ .Values.name }}
  template:
    metadata:
      annotations:
        iam.amazonaws.com/role: {{ .Values.assume_role }}
      labels:
        app: {{ .Values.name }}
    spec:
      containers:
        - name: {{ .Values.name }}
          image: {{ .Values.registry }}:{{ .Values.rev }}
          ports:
          - containerPort: 8000
          resources:
            requests:
              memory: "768Mi"
              cpu: "500m"
            limits:
              memory: "1024Mi"
              cpu: "1000m"
          env:
            - name: AWS_DEFAULT_REGION
              value: us-west-2
            - name: ENVIRONMENT
              value: {{ .Values.environment }}
            - name: MOZILLIANS_API_URL
              value: https://mozillians.org/api/v2/users/
            - name: SERVER_NAME
              value: {{ .Values.domain_name }}
            - name: DASHBOARD_GUNICORN_WORKERS
              value: "4"

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ .Values.name }}
  labels:
    app: {{ .Values.name }}
  namespace: {{ .Values.namespace }}
spec:
  replicas: {{ .Values.replicas }}
  selector:
    matchLabels:
      app: {{ .Values.name }}
  template:
    metadata:
      annotations:
        iam.amazonaws.com/role: {{ .Values.assume_role }}
      labels:
        app: {{ .Values.name }}
    spec:
      containers:
        - name: {{ .Values.name }}
          image: {{ .Values.registry }}:{{ .Values.rev }}
          ports:
          - containerPort: 8000
          resources:
            requests:
              memory: "768Mi"
              cpu: "500m"
            limits:
              memory: "1024Mi"
              cpu: "1000m"
          env:
            - name: AWS_DEFAULT_REGION
              value: us-west-2
            - name: ENVIRONMENT
              value: {{ .Values.environment }}
            - name: MOZILLIANS_API_URL
              value: https://mozillians.org/api/v2/users/
            - name: SERVER_NAME
              value: {{ .Values.domain_name }}
            - name: DASHBOARD_GUNICORN_WORKERS
              value: "4"

Migrate API version to latest
Migrate API version to latest
