| apiVersion: v1 |
| kind: Service |
| metadata: |
| name: task-scheduler-staging |
| labels: |
| app: task-scheduler-staging |
| annotations: |
| beta.cloud.google.com/backend-config: '{"ports": {"8000":"skia-default-backendconfig"}}' |
| skia.org.domain: task-scheduler-staging.skia.org |
| spec: |
| selector: |
| app: task-scheduler-staging |
| type: NodePort |
| ports: |
| - port: 8000 |
| name: http |
| - port: 20000 |
| name: metrics |
| --- |
| apiVersion: apps/v1beta1 |
| kind: StatefulSet |
| metadata: |
| name: task-scheduler-staging |
| labels: |
| app: task-scheduler-staging |
| spec: |
| replicas: 1 |
| selector: |
| matchLabels: |
| app: task-scheduler-staging |
| updateStrategy: |
| type: RollingUpdate |
| serviceName: "task-scheduler-staging" |
| template: |
| metadata: |
| labels: |
| app: task-scheduler-staging |
| annotations: |
| prometheus.io.scrape: "true" |
| prometheus.io.port: "20000" |
| spec: |
| securityContext: |
| runAsUser: 2000 # aka skia |
| fsGroup: 2000 # aka skia |
| automountServiceAccountToken: false |
| containers: |
| - name: task-scheduler-staging |
| image: gcr.io/skia-public/task-scheduler:2019-10-07T16_48_32Z-benjaminwagner-d0cec75-clean |
| args: |
| - "--bigtable_project=skia-public" |
| - "--bigtable_instance=staging" |
| - "--host=task-scheduler-staging.skia.org" |
| - "--firestore_instance=staging" |
| - "--isolate_server=https://isolateserver-dev.appspot.com" |
| - "--logtostderr" |
| - "--pool=Skia" |
| - "--pubsub_topic=swarming-tasks-staging" |
| - "--pubsub_subscriber=task-scheduler-staging" |
| - "--recipes_cfg=/usr/local/share/task-scheduler/recipes.cfg" |
| - "--repo=https://skia.googlesource.com/skiabot-test.git" |
| - "--resources_dir=/usr/local/share/task-scheduler/" |
| - "--swarming_server=chromium-swarm-dev.appspot.com" |
| - "--tryjob_bucket=skia.testing" |
| - "--workdir=/mnt/task-scheduler" |
| ports: |
| - containerPort: 8000 |
| - containerPort: 20000 |
| volumeMounts: |
| - name: task-scheduler-staging-storage |
| mountPath: /mnt/task-scheduler |
| - name: skia-task-scheduler-sa |
| mountPath: /var/secrets/google |
| - name: skia-public-auth |
| mountPath: /var/secrets/skia-public-auth |
| - name: skia-org-legacy-login-secrets |
| mountPath: /etc/skia.org/ |
| env: |
| - name: GOOGLE_APPLICATION_CREDENTIALS |
| value: /var/secrets/google/key.json |
| resources: |
| limits: |
| memory: "12Gi" |
| cpu: 2 |
| readinessProbe: |
| httpGet: |
| path: /healthz |
| port: 8000 |
| initialDelaySeconds: 30 |
| periodSeconds: 3 |
| volumes: |
| - name: skia-task-scheduler-sa |
| secret: |
| secretName: task-scheduler |
| - name: skia-public-auth |
| secret: |
| secretName: skia-public-auth |
| - name: skia-org-legacy-login-secrets |
| secret: |
| secretName: skia-org-legacy-login-secrets |
| volumeClaimTemplates: |
| - metadata: |
| name: task-scheduler-staging-storage |
| spec: |
| storageClassName: ssd-disk |
| accessModes: [ "ReadWriteOnce" ] |
| resources: |
| requests: |
| storage: 200Gi |