apiVersion: v1
kind: ReplicationController
metadata:
  name: awsecr-creds
  namespace: kube-system
  labels:
    version: v1.2
spec:
  replicas: 1
  selector:
    name: awsecr-creds
    version: v1.2
  template:
    metadata:
      labels:
        name: awsecr-creds
        version: v1.2
    spec:
      containers:
      - image: upmcenterprises/awsecr-creds:1.2
        name: awsecr-creds
        imagePullPolicy: Always
        env:
          - name: AWS_ACCESS_KEY_ID
            valueFrom:
              secretKeyRef:
                name: awsecr-creds
                key: AWS_ACCESS_KEY_ID
          - name: AWS_SECRET_ACCESS_KEY
            valueFrom:
              secretKeyRef:
                name: awsecr-creds
                key: AWS_SECRET_ACCESS_KEY
          - name: awsaccount
            valueFrom:
              secretKeyRef:
                name: awsecr-creds
                key: aws-account
