| # Copyright 2018 Google Inc. All Rights Reserved. |
| apiVersion: apps/v1 |
| kind: Deployment |
| metadata: |
| labels: |
| app: frontend |
| annotations: |
| imagetag: $IMAGETAG |
| buildtag: "$TAG" |
| name: frontend |
| spec: |
| replicas: 16 |
| selector: |
| matchLabels: |
| app: frontend |
| strategy: |
| rollingUpdate: |
| maxSurge: 8 |
| maxUnavailable: 0 |
| type: RollingUpdate |
| selector: |
| matchLabels: |
| app: frontend |
| template: |
| metadata: |
| labels: |
| app: frontend |
| spec: |
| containers: |
| - command: |
| - /opt/goma/bin/frontend |
| - --trace-project-id=$PROJECT_ID |
| - -auth-addr=passthrough:///auth-server:5050 |
| - >- |
| --backend-config=local < |
| exec_addr: "passthrough:///exec-server:5050" |
| file_addr: "passthrough:///file-server:5050" |
| execlog_addr: "passthrough:///execlog-server:5050" |
| enable_bytestream: true |
| trace_option < |
| cluster: "$CLUSTER" |
| > |
| > |
| - --gport=5050 |
| - --port=80 |
| name: frontend |
| image: gcr.io/$CONTAINER_PROJECT_ID/frontend:$IMAGETAG |
| ports: |
| - containerPort: 5050 |
| protocol: TCP |
| - containerPort: 8081 |
| protocol: TCP |
| - containerPort: 80 |
| protocol: TCP |
| resources: |
| limits: |
| cpu: 800m |
| memory: 1024Mi |
| requests: |
| cpu: 400m |
| memory: 512Mi |
| # following could be configured by PodPreset? |
| livenessProbe: |
| httpGet: |
| path: /healthz |
| port: 8081 |
| scheme: HTTP |
| failureThreshold: 20 |
| timeoutSeconds: 5 |
| initialDelaySeconds: 15 |
| periodSeconds: 15 |
| readinessProbe: |
| httpGet: |
| path: /healthz |
| port: 8081 |
| scheme: HTTP |
| failureThreshold: 4 |
| timeoutSeconds: 5 |
| initialDelaySeconds: 15 |
| periodSeconds: 15 |
| - name: esp |
| image: gcr.io/endpoints-release/endpoints-runtime:1 |
| args: [ |
| "--ssl_port=9000", |
| "--service=$CLUSTER.endpoints.$PROJECT_ID.cloud.goog", |
| "--rollout_strategy=managed", |
| "--backend=grpc://127.0.0.1:5050", |
| "--healthz= ", # for / |
| ] |
| volumeMounts: |
| - mountPath: /etc/nginx/ssl |
| name: nginx-ssl |
| readOnly: true |
| - mountPath: /var/lib/nginx/extra |
| name: nginx-extra-conf |
| readOnly: true |
| ports: |
| - containerPort: 9000 |
| protocol: TCP |
| resources: |
| limits: |
| cpu: 100m |
| memory: 128Mi |
| requests: |
| cpu: 50m |
| memory: 64Mi |
| terminationGracePeriodSeconds: 300 |
| volumes: |
| - name: nginx-ssl |
| secret: |
| secretName: nginx-ssl |
| - name: nginx-extra-conf |
| configMap: |
| defaultMode: 420 |
| name: nginx-extra-conf |