blob: 0923def223726ab8655db8190f8564352d18b028 [file] [log] [blame]
apiVersion: v1
kind: Service
metadata:
labels:
app: repo-sync
name: repo-sync
spec:
ports:
- name: metrics
port: 20000
selector:
app: repo-sync
type: NodePort
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: repo-sync
spec:
replicas: 1
template:
metadata:
labels:
app: repo-sync
annotations:
prometheus.io.scrape: "true"
prometheus.io.port: "20000"
spec:
automountServiceAccountToken: false
securityContext:
runAsUser: 2000 # aka skia
fsGroup: 2000 # aka skia
containers:
- name: repo-sync
image: gcr.io/skia-public/repo-sync:2018-10-10T20_19_07Z-jcgregorio-d0606ff-clean
args:
- "--logtostderr"
- "--prom_port=:20000"
- "--source=https://skia.googlesource.com/skia"
- "--destination=skia"
ports:
- containerPort: 20000
volumeMounts:
- name: skia-repo-sync-sa
mountPath: /var/secrets/google
env:
- name: CLOUDSDK_AUTH_CREDENTIAL_FILE_OVERRIDE
value: /var/secrets/google/key.json
resources:
requests:
memory: "200Mi"
cpu: "10m"
readinessProbe:
httpGet:
path: /metrics
port: 20000
initialDelaySeconds: 1
periodSeconds: 3
volumes:
- name: skia-repo-sync-sa
secret:
secretName: repo-sync