| # 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 Shuffler's Deployment object |
| # (which includes an embedded defintion of its Pod 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: shuffler |
| labels: |
| name: shuffler |
| # Pod object |
| spec: |
| serviceName: shuffler |
| replicas: 2 |
| updateStrategy: |
| type: RollingUpdate |
| template: |
| metadata: |
| name: shuffler |
| labels: |
| name: shuffler |
| spec: |
| containers: |
| - name: endpoint |
| image: gcr.io/endpoints-release/endpoints-runtime:1 |
| args: [ |
| '-S', '443', |
| '-s', '$$ENDPOINT_NAME$$', |
| '-v', '$$ENDPOINT_CONFIG_ID$$', |
| '-a', 'grpc://127.0.0.1:5000' |
| ] |
| ports: |
| - containerPort: 443 |
| volumeMounts: |
| - mountPath: /etc/nginx/ssl |
| # The name must match the volumes.name for |
| # shuffler-certificate-storage. |
| name: shuffler-certificate-storage |
| readOnly: true |
| - name: shuffler |
| # The URI of a Docker image in a Docker repository. |
| image: $$SHUFFLER_IMAGE_URI$$ |
| args: |
| - '-port' |
| - '5000' |
| - '-analyzer_uri' |
| # This must match the defintion of the "analyzer-service" Service |
| # in analyzer_service_deployment.yaml |
| - 'analyzer-service:6001' |
| - '-config_file' |
| # This is the path to where the file is copied in Dockerfile. |
| - '/etc/cobalt/shuffler_config.txt' |
| - '-db_dir' |
| # This path must match mountPath for shuffler-persistent-storage |
| # below. |
| - '/var/lib/cobalt/db' |
| - '-use_memstore=$$SHUFFLER_USE_MEMSTORE$$' |
| - '-private_key_pem_file' |
| # The directory path must match mountPath for shuffler-key-storage |
| # below. |
| - '/var/lib/cobalt/key/$$SHUFFLER_PRIVATE_PEM_NAME$$' |
| - '-danger_danger_delete_all_data_at_startup=$$DANGER_DANGER_DELETE_ALL_DATA_AT_STARTUP$$' |
| # TODO(rudominer) Eventually remove this. |
| - '-logtostderr' |
| - '-v=3' |
| ports: |
| - containerPort: 5000 |
| volumeMounts: |
| # This name must match the volumes.name for |
| # shuffler-persistent-storage below. |
| - name: shuffler-persistent-disk |
| mountPath: /var/lib/cobalt/db |
| # This name must match the volumes.name for shuffler-key-storage |
| # below. |
| - name: shuffler-key-storage |
| mountPath: /var/lib/cobalt/key |
| readOnly: true |
| volumes: |
| - name: shuffler-key-storage |
| secret: |
| secretName: $$SHUFFLER_PRIVATE_KEY_SECRET_NAME$$ |
| - name: shuffler-certificate-storage |
| secret: |
| secretName: $$SHUFFLER_CERTIFICATE_SECRET_NAME$$ |
| volumeClaimTemplates: |
| - metadata: |
| name: shuffler-persistent-disk |
| spec: |
| accessModes: |
| - ReadWriteOnce |
| storageClassName: standard |
| resources: |
| requests: |
| storage: 10Gi |