blob: fe4d42a092b90b125dff01cae2c67ceda4a2e18a [file] [log] [blame]
apiVersion: v1
kind: Service
metadata:
labels:
app: power-controller
name: power-controller
annotations:
beta.cloud.google.com/backend-config: '{"ports": {"8000":"skia-default-backendconfig"}}'
skia.org.domain: power.skia.org
spec:
ports:
- name: metrics
port: 20000
- name: http
port: 8000
selector:
app: power-controller
type: NodePort
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: power-controller
spec:
replicas: 2
selector:
matchLabels:
app: power-controller
strategy:
type: RollingUpdate
template:
metadata:
labels:
app: power-controller
annotations:
prometheus.io.scrape: "true"
prometheus.io.port: "20000"
spec:
automountServiceAccountToken: false
securityContext:
runAsUser: 2000 # aka skia
fsGroup: 2000 # aka skia
containers:
- name: power-controller
image: gcr.io/skia-public/power-controller:2019-06-21T22_25_36Z-benjaminwagner-e5c2a52-clean
args:
- "--authorized_email=jumphost@skia-buildbots.google.com.iam.gserviceaccount.com"
- "--logtostderr"
- "--port=:8000"
- "--powercycle_config=/etc/powercycle/powercycle-internal-01.json5"
- "--powercycle_config=/etc/powercycle/powercycle-linux-01.json5"
- "--powercycle_config=/etc/powercycle/powercycle-rpi-01.json5"
- "--powercycle_config=/etc/powercycle/powercycle-win-02.json5"
- "--powercycle_config=/etc/powercycle/powercycle-win-03.json5"
- "--prom_port=:20000"
- "--resources_dir=/usr/local/share/power-controller/"
ports:
- containerPort: 8000
- containerPort: 20000
volumeMounts:
- name: skia-power-controller-sa
mountPath: /var/secrets/google
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /var/secrets/google/key.json
resources:
requests:
memory: "100M"
cpu: "500m"
limits:
memory: "10G"
cpu: "6"
readinessProbe:
httpGet:
path: /healthz
port: 8000
initialDelaySeconds: 1
periodSeconds: 10
volumes:
- name: skia-power-controller-sa
secret:
secretName: skia-power-controller