blob: d68c1421aaaba97700446a76c53da571b7d1333c [file] [log] [blame]
# Copyright 2018 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This file contans the definitions of the Analyzer Service's Deployment object
# (which includes an embedded defintion of its Pod object) and the
# Analyzer Service's Service object.
#
# The definitions contain some parameters (indicated by $$PARAMETER_NAME$$)
# that will be replaced by the script tools/container_util.py prior to being
# passed to "kubectl apply"
# The defintion of the Deployment and Pod
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
name: analyzer-service
labels:
name: analyzer-service
# Pod object
spec:
serviceName: analyzer-service
replicas: 2
updateStrategy:
type: RollingUpdate
template:
metadata:
name: analyzer-service
labels:
name: analyzer-service
spec:
containers:
- name: analyzer-service
# The URI of a Docker image in a Docker repository.
image: $$ANALYZER_SERVICE_IMAGE_URI$$
args:
- '-port'
- '6001'
- '-bigtable_project_name'
- $$BIGTABLE_PROJECT_NAME$$
- '-bigtable_instance_id'
- $$BIGTABLE_INSTANCE_ID$$
- '-private_key_pem_file'
# The directory path must match mountPath below.
- '/var/lib/cobalt/$$ANALYZER_PRIVATE_PEM_NAME$$'
# TODO(rudominer) Eventually remove this.
- '-logtostderr'
- '-v=3'
ports:
- containerPort: 6001
volumeMounts:
# This name must match the volumes.name below.
- name: analyzer-key-storage
mountPath: /var/lib/cobalt
readOnly: true
volumes:
- name: analyzer-key-storage
secret:
secretName: $$ANALYZER_PRIVATE_KEY_SECRET_NAME$$