blob: 1a04fa868eb4bc6a184eb4ba78249fabcca5dc09 [file] [log] [blame]
apiVersion: v1
kind: Service
metadata:
name: gitsync2
labels:
app: gitsync2
annotations:
beta.cloud.google.com/backend-config: '{"ports": {"8000":"skia-default-backendconfig"}}'
spec:
selector:
app: gitsync2
type: NodePort
ports:
- port: 20000
name: metrics
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: gitsync2
labels:
app: gitsync2
spec:
replicas: 1
selector:
matchLabels:
app: gitsync2 # Label selector that determines which Pods belong to the Deployment
# Must match spec: template: metadata: labels
strategy:
type: RollingUpdate
template:
metadata:
labels:
app: gitsync2 # Pod template's label selector
annotations:
prometheus.io.scrape: "true"
prometheus.io.port: "20000"
spec:
automountServiceAccountToken: false
securityContext:
runAsUser: 2000 # aka skia
fsGroup: 2000 # aka skia
containers:
- name: gitsync2
image: gcr.io/skia-public/gitsync:2019-09-25T18_26_39Z-borenet-ba7e1f0-clean
args:
- "--bt_instance=production"
- "--bt_table=git-repos2"
- "--bt_write_goroutines=100"
- "--gcs_bucket=skia-gitsync"
- "--gcs_path=git-repo-ingestion"
- "--http_port=:9091"
- "--logtostderr"
- "--project=skia-public"
- "--prom_port=:20000"
- "--refresh=5s"
- "--repo_url=https://chromium.googlesource.com/chromium/src"
- "--repo_url=https://github.com/flutter/engine"
- "--repo_url=https://github.com/flutter/flutter"
- "--repo_url=https://pdfium.googlesource.com/pdfium"
- "--repo_url=https://skia.googlesource.com/buildbot.git"
- "--repo_url=https://skia.googlesource.com/lottie-ci.git"
- "--repo_url=https://skia.googlesource.com/perf-buildid/android-master"
- "--repo_url=https://skia.googlesource.com/perf-ct"
- "--repo_url=https://skia.googlesource.com/skcms.git"
- "--repo_url=https://skia.googlesource.com/skia.git"
- "--mirror=https://github.com/flutter/engine=https://chromium.googlesource.com/external/github.com/flutter/engine.git"
- "--mirror=https://github.com/flutter/flutter=https://chromium.googlesource.com/external/github.com/flutter/flutter.git"
ports:
- containerPort: 9091
name: http-health
- containerPort: 20000
name: metrics
volumeMounts:
- name: gitsync-sa
mountPath: /var/secrets/google
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /var/secrets/google/key.json
resources:
limits:
memory: "12Gi"
cpu: 4
readinessProbe:
httpGet:
path: /healthz
port: 9091
initialDelaySeconds: 0
periodSeconds: 5
volumes:
- name: gitsync-sa
secret:
secretName: gitsync