apiVersion: apps/v1
kind: Deployment
metadata:
  name: proxy-admin
spec:
  selector:
    matchLabels:
      service: proxy-admin
  template:
    metadata:
      labels:
        service: proxy-admin
    spec:
      serviceAccountName: barretthousen-service
      containers:
        - name: proxy-admin
          image: barretthousen/service-proxy-admin:latest
          imagePullPolicy: Always
          ports:
            - containerPort: 80
              name: http
          command:
            - /opt/proxy-admin
          resources:
            limits:
              memory: "128Mi"
              cpu: "250m"
          volumeMounts:
            - name: proxy-admin-config
              mountPath: /config/
      volumes:
        - name: proxy-admin-config
          secret:
            secretName: proxy-admin-config
---
apiVersion: v1
kind: Service
metadata:
  name: proxy-admin
spec:
  selector:
    service: proxy-admin
  ports:
    - port: 80
      targetPort: 80
---
apiVersion: v1
kind: Secret
metadata:
  name: proxy-admin-config
stringData:
  config.yaml: |
    log_level: 2
    port: 80
    endpoints:
      runner: runner:5001
      auth: auth:5001
