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,
      instanceName: 'remote-execution',
      browserUrl: common.browserUrl,
      buildDirectories: [{
        native: {
          buildDirectoryPath: '/worker/build',
          cacheDirectoryPath: '/worker/cache',
          maximumCacheFileCount: 10000,
          maximumCacheSizeBytes: 1024 * 1024 * 1024,
          cacheReplacementPolicy: 'LEAST_RECENTLY_USED',
        },
        runners: [{
          endpoint: { address: 'unix:///worker/runner' },
          concurrency: 1,
          platform: {
            properties: [
              { name: 'OSFamily', value: 'Linux' },
              { name: 'container-image', value: 'docker://l.gcr.io/google/rbe-ubuntu16-04@sha256:f6568d8168b14aafd1b707019927a63c2d37113a03bcee188218f99bd0327ea1' },
            ],
          },
          defaultExecutionTimeout: '1800s',
          maximumExecutionTimeout: '3600s',
          workerId: {
            'pod': std.extVar("POD_NAME"),
            'node': std.extVar("NODE_NAME")
          },
        }],
      }],
    }

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