apiVersion: apps/v1
kind: Deployment
metadata:
  name: portals
  labels:
    app: portals
spec:
  replicas: 1
  selector:
    matchLabels:
      app: portals
  template:
    metadata:
      labels:
        app: portals
    spec:
      serviceAccountName: portals-serviceaccount
      containers:
        - image: registry.example.com/cryb/portals:latest
          name: portals
          imagePullPolicy: Always
          envFrom:
            - secretRef:
                name: portals-env-secret
          env:
            - name: K8S_POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
          ports:
            - containerPort: 1337
              name: http-server
      imagePullSecrets:
        - name: registry-regcred-portals
