kind: Deployment
apiVersion: apps/v1
metadata:
  name: scopelens-website-deployment
  labels:
    app: website
    version: v1
spec:
  replicas: 1
  selector:
    matchLabels:
      app: website
      version: v1
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: website
        version: v1
    spec:
      #serviceAccountName: scopelens-website-account
      containers:
        - name: scopelens-website
          image: <WEBSITE-IMAGE> # please read Dockerfile under website
          imagePullPolicy: Always
          ports:
            - name: http
              containerPort: 80
          resources:
            requests:
              memory: 256Mi
            limits:
              memory: 512Mi
          env:
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  apiVersion: v1
                  fieldPath: metadata.name
            - name: POD_NAMESPACE
              valueFrom:
                fieldRef:
                  apiVersion: v1
                  fieldPath: metadata.namespace
            - name: INSTANCE_IP
              valueFrom:
                fieldRef:
                  apiVersion: v1
                  fieldPath: status.podIP
          #securityContext:
          #  runAsUser: 1000
          volumeMounts:
            - name: website-config
              mountPath: /etc/nginx/nginx.conf
              subPath: nginx.conf
      volumes:
        - name: website-config
          configMap:
            name: scopelens-website-config