| # ############################################## |
| # |
| # Traceserver |
| # |
| # ############################################## |
| kind: Service |
| apiVersion: v1 |
| metadata: |
| name: gold-{{.INSTANCE_ID}}-traceservice |
| labels: |
| app: gold-{{.INSTANCE_ID}} |
| spec: |
| ports: |
| - name: grpc |
| port: 9090 |
| - name: http-ready |
| port: 9091 |
| - name: prometheus |
| port: 20000 |
| selector: |
| app: gold-{{.INSTANCE_ID}}-traceserver |
| --- |
| apiVersion: apps/v1 |
| kind: StatefulSet |
| metadata: |
| name: gold-{{.INSTANCE_ID}}-traceserver |
| spec: |
| selector: |
| matchLabels: |
| app: gold-{{.INSTANCE_ID}}-traceserver # Label selector that determines which Pods belong to the StatefulSet |
| # Must match spec: template: metadata: labels |
| serviceName: "gold-{{.INSTANCE_ID}}-traceserver" |
| replicas: 1 |
| updateStrategy: |
| type: RollingUpdate |
| template: |
| metadata: |
| labels: |
| app: gold-{{.INSTANCE_ID}}-traceserver # 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: gold-traceserver |
| image: {{.TRACESERVER_IMAGE_URL}} |
| args: |
| - "--db_file=/mnt/traceserver/traces.db" |
| - "--http_port=:9091" |
| - "--logtostderr" |
| - "--no_cloud_log" |
| - "--port=:9090" |
| - "--prom_port=:20000" |
| ports: |
| - containerPort: 9090 |
| - containerPort: 9091 |
| - containerPort: 20000 |
| volumeMounts: |
| - name: gold-{{.INSTANCE_ID}}-traceserver-storage-volume |
| mountPath: /mnt/traceserver |
| resources: |
| limits: |
| memory: "500Mi" |
| cpu: "500m" |
| readinessProbe: |
| httpGet: |
| path: /ready |
| port: 9091 |
| initialDelaySeconds: 30 |
| periodSeconds: 10 |
| volumeClaimTemplates: |
| - metadata: |
| name: gold-{{.INSTANCE_ID}}-traceserver-storage-volume |
| spec: |
| accessModes: [ "ReadWriteOnce" ] |
| resources: |
| requests: |
| storage: 20Gi |
| --- |
| # ############################################## |
| # |
| # Ingestion |
| # |
| # ############################################## |
| apiVersion: apps/v1 |
| kind: StatefulSet |
| metadata: |
| name: gold-{{.INSTANCE_ID}}-ingestion |
| spec: |
| serviceName: "gold-{{.INSTANCE_ID}}-ingestion" |
| replicas: 1 |
| selector: |
| matchLabels: |
| app: gold-{{.INSTANCE_ID}}-ingestion # Label selector that determines which Pods belong to the StatefulSet |
| # Must match spec: template: metadata: labels |
| updateStrategy: |
| type: RollingUpdate |
| template: |
| metadata: |
| labels: |
| app: gold-{{.INSTANCE_ID}}-ingestion # 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: gold-ingestion |
| image: {{.INGESTION_IMAGE_URL}} |
| args: |
| - "--config_filename=/etc/gold-{{.INSTANCE_ID}}-ingestion/ingestion-config.json5" |
| - "--ds_namespace=gold-{{.INSTANCE_ID}}" |
| - "--http_port=:9091" |
| - "--logtostderr" |
| - "--no_cloud_log" |
| - "--project_id=skia-public" |
| - "--prom_port=:20000" |
| - "--service_account_file=/etc/gold-config/service-account.json" |
| ports: |
| - containerPort: 9091 |
| name: http-health |
| volumeMounts: |
| - name: gold-{{.INSTANCE_ID}}-ingestion-config-volume |
| mountPath: /etc/gold-{{.INSTANCE_ID}}-ingestion |
| - name: gold-{{.INSTANCE_ID}}-ingestion-storage-volume |
| mountPath: /data |
| - name: gold-service-account-secrets |
| mountPath: /etc/gold-config/ |
| resources: |
| limits: |
| memory: "2Gi" |
| cpu: 1 |
| readinessProbe: |
| httpGet: |
| path: /ready |
| port: 9091 |
| initialDelaySeconds: 30 |
| periodSeconds: 10 |
| volumes: |
| - name: gold-{{.INSTANCE_ID}}-ingestion-config-volume |
| configMap: |
| defaultMode: 420 |
| name: gold-{{.INSTANCE_ID}}-ingestion-config |
| - name: gold-service-account-secrets |
| secret: |
| secretName: gold-service-account-secrets |
| volumeClaimTemplates: |
| - metadata: |
| name: gold-{{.INSTANCE_ID}}-ingestion-storage-volume |
| spec: |
| accessModes: [ "ReadWriteOnce" ] |
| resources: |
| requests: |
| storage: 20Gi |
| --- |
| # ############################################## |
| # |
| # Skiacorrectness |
| # |
| # ############################################## |
| apiVersion: v1 |
| kind: Service |
| metadata: |
| name: gold-{{.INSTANCE_ID}}-skiacorrectness |
| spec: |
| ports: |
| - name: metrics |
| port: 20000 |
| - name: http |
| port: 8000 |
| selector: |
| app: gold-{{.INSTANCE_ID}}-skiacorrectness |
| type: NodePort |
| --- |
| apiVersion: apps/v1 |
| kind: StatefulSet |
| metadata: |
| name: gold-{{.INSTANCE_ID}}-skiacorrectness |
| spec: |
| serviceName: "gold-{{.INSTANCE_ID}}-skiacorrectness" |
| replicas: 1 |
| selector: |
| matchLabels: |
| app: gold-{{.INSTANCE_ID}}-skiacorrectness # Label selector that determines which Pods belong to the StatefulSet |
| # Must match spec: template: metadata: labels |
| updateStrategy: |
| type: RollingUpdate |
| template: |
| metadata: |
| labels: |
| app: gold-{{.INSTANCE_ID}}-skiacorrectness |
| annotations: |
| prometheus.io.scrape: "true" |
| prometheus.io.port: "20000" |
| spec: |
| automountServiceAccountToken: false |
| securityContext: |
| runAsUser: 2000 # aka skia |
| fsGroup: 2000 # aka skia |
| containers: |
| - name: gold-skiacorrectness |
| image: {{.CORRECTNESS_IMAGE_URL}} |
| args: |
| - "--logtostderr=true" |
| - "--app_title={{.APP_TITLE}}" |
| - "--baseline_gs_path=skia-gold-{{.INSTANCE_ID}}/baselines" |
| - "--cache_size=0" |
| - "--default_corpus={{.DEFAULT_CORPUS}}" |
| - "--ds_namespace=gold-{{.INSTANCE_ID}}" |
| - "--event_topic=gold-{{.INSTANCE_ID}}-eventbus" |
| - "--force_login={{.FORCE_LOGIN}}" |
| - "--gerrit_url={{.GERRIT_URL}}" |
| - "--git_repo_dir=/data/{{.INSTANCE_ID}}-repo" |
| - "--git_repo_url={{.REPO_URL}}" |
| - "--gs_buckets=skia-gold-{{.INSTANCE_ID}}" |
| - "--hashes_gs_path=skia-gold-{{.INSTANCE_ID}}/hash_files/gold-{{.INSTANCE_ID}}-hashes.txt" |
| - "--image_dir=/data/imagediffs" |
| - "--n_commits={{.N_COMMITS}}" |
| - "--no_cloud_log=true" |
| - "--port=:8000" |
| - "--project_id={{.PROJECT_ID}}" |
| - "--prom_port=:20000" |
| - "--public_whitelist={{.WHITELIST}}" |
| - "--redirect_url={{.REDIRECT_URL}}" |
| - "--resources_dir=/usr/local/share/skiacorrectness/frontend" |
| - "--service_account_file=/etc/gold-config/service-account.json" |
| - "--site_url=https://{{.INSTANCE_ID}}-gold.skia.org" |
| - "--show_bot_progress={{.SHOW_BOT_PROGRESS}}" |
| - "--storage_dir=/data/data-store" |
| - "--trace_service=gold-{{.INSTANCE_ID}}-traceservice:9090" |
| ports: |
| - containerPort: 8000 |
| name: http |
| - containerPort: 20000 |
| name: prom |
| volumeMounts: |
| - name: gold-{{.INSTANCE_ID}}-skiacorrectness-storage-volume |
| mountPath: /data |
| - name: gold-service-account-secrets |
| mountPath: /etc/gold-config/ |
| - name: skia-org-legacy-login-secrets |
| mountPath: /etc/skia.org/ |
| resources: |
| requests: |
| memory: "8Gi" |
| cpu: "2" |
| readinessProbe: |
| httpGet: |
| path: /ready |
| port: 8000 |
| initialDelaySeconds: 45 |
| periodSeconds: 15 |
| volumes: |
| - name: gold-service-account-secrets |
| secret: |
| secretName: gold-service-account-secrets |
| - name: skia-org-legacy-login-secrets |
| secret: |
| secretName: skia-org-legacy-login-secrets |
| |
| volumeClaimTemplates: |
| - metadata: |
| name: gold-{{.INSTANCE_ID}}-skiacorrectness-storage-volume |
| spec: |
| accessModes: [ "ReadWriteOnce" ] |
| resources: |
| requests: |
| storage: 100Gi |