blob: 3ce4e4ea9b7fe60ab8221cc551ee9c53c7e5569e [file] [log] [blame]
apiVersion: v1
kind: Service
metadata:
name: gitsync2-staging
labels:
app: gitsync2-staging
annotations:
beta.cloud.google.com/backend-config: '{"ports": {"8000":"skia-default-backendconfig"}}'
spec:
selector:
app: gitsync2-staging
type: NodePort
ports:
- port: 20000
name: metrics
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: gitsync2-staging
labels:
app: gitsync2-staging
spec:
replicas: 1
selector:
matchLabels:
app: gitsync2-staging # Label selector that determines which Pods belong to the Deployment
# Must match spec: template: metadata: labels
strategy:
type: RollingUpdate
template:
metadata:
labels:
app: gitsync2-staging # 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-staging
image: gcr.io/skia-public/gitsync:2019-09-25T18_26_39Z-borenet-ba7e1f0-clean
args:
- "--bt_instance=staging"
- "--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://skia.googlesource.com/skiabot-test.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: "1Gi"
cpu: 1
readinessProbe:
httpGet:
path: /healthz
port: 9091
initialDelaySeconds: 0
periodSeconds: 5
volumes:
- name: gitsync-sa
secret:
secretName: gitsync