apiVersion: v1
data:
  worker-ubuntu16-04.jsonnet: |
    local common = import 'common.libsonnet';

    {
      blobstore: common.blobstore,
      maximumMessageSizeBytes: common.maximumMessageSizeBytes,
      scheduler: { address: 'scheduler:8983' },
      httpListenAddress: common.httpListenAddress,
      maximumMemoryCachedDirectories: 1000,
      localBuildDirectory: {
        buildDirectoryPath: '/worker/build',
        cacheDirectoryPath: '/worker/cache',
        maximumCacheFileCount: 10000,
        maximumCacheSizeBytes: 1024 * 1024 * 1024,
        cacheReplacementPolicy: 'LEAST_RECENTLY_USED',
      },
      instanceName: 'remote-execution',
      runners: [{
        endpoint: { address: 'unix:///worker/runner' },
        concurrency: 8,
        platform: {
          properties: [
            { name: 'OSFamily', value: 'Linux' },
            { name: 'container-image', value: 'docker://marketplace.gcr.io/google/rbe-ubuntu16-04@sha256:b516a2d69537cb40a7c6a7d92d0008abb29fba8725243772bdaf2c83f1be2272' },
          ],
        },
        defaultExecutionTimeout: '1800s',
        maximumExecutionTimeout: '3600s',
        workerId: {
          'pod': std.extVar("POD_NAME"),
          'node': std.extVar("NODE_NAME")
        },
      }],
    }

kind: ConfigMap
metadata:
  name: worker-ubuntu16-04
  namespace: buildbarn
