golang.org/x/build@v0.0.0-20240506185731-218518f32b70/cmd/gomoteserver/deployment-prod.yaml (about)

     1  # Copyright 2023 The Go Authors. All rights reserved.
     2  # Use of this source code is governed by a BSD-style
     3  # license that can be found in the LICENSE file.
     4  
     5  apiVersion: apps/v1
     6  kind: Deployment
     7  metadata:
     8    namespace: prod
     9    name: gomoteserver-deployment
    10  spec:
    11    selector:
    12      matchLabels:
    13        app: gomoteserver
    14    template:
    15      metadata:
    16        labels:
    17          app: gomoteserver
    18      spec:
    19        serviceAccountName: gomoteserver
    20        containers:
    21        - name: gomoteserver
    22          image: gcr.io/symbolic-datum-552/gomoteserver:latest
    23          imagePullPolicy: Always
    24          command:
    25            - "/gomoteserver"
    26            - "-listen-http=:80"
    27            - "-listen-https-autocert=:443"
    28            - "-autocert-bucket=gomote-golang-org-autocert-cache"
    29            - "-listen-https-selfsigned=:444"
    30            - "-private-host-key=secret:symbolic-datum-552/gomoteserver-private-host-key"
    31            - "-public-host-key=secret:symbolic-datum-552/gomoteserver-public-host-key"
    32          ports:
    33          - containerPort: 80
    34          - containerPort: 443
    35          - containerPort: 444
    36          - containerPort: 2222 # ssh proxy port
    37          resources:
    38            requests:
    39              cpu: "2"
    40              memory: "16Gi"
    41            limits:
    42              cpu: "4"
    43              memory: "16Gi"
    44  ---
    45  apiVersion: v1
    46  kind: Service
    47  metadata:
    48    namespace: prod
    49    name: gomoteserver
    50  spec:
    51    ports:
    52      - port: 80
    53        targetPort: 80
    54        name: http
    55      - port: 443
    56        targetPort: 443
    57        name: https
    58      - port: 2222
    59        targetPort: 2222
    60        name: ssh
    61    selector:
    62      app: gomoteserver
    63    type: LoadBalancer
    64    loadBalancerIP: 35.232.178.214 # gomote-ssh-golang-org
    65    externalTrafficPolicy: Local
    66  ---
    67  apiVersion: v1
    68  kind: Service
    69  metadata:
    70    namespace: prod
    71    name: gomoteserver-internal-iap
    72    annotations:
    73      cloud.google.com/backend-config: '{"default": "gomoteserver-iap-backend"}'
    74      cloud.google.com/neg: '{"ingress": false}'
    75      cloud.google.com/app-protocols: '{"https":"HTTP2"}'
    76  spec:
    77    ports:
    78      - port: 444
    79        targetPort: 444
    80        name: https
    81    selector:
    82      app: gomoteserver
    83    type: NodePort
    84  ---
    85  apiVersion: v1
    86  kind: Service
    87  metadata:
    88    namespace: prod
    89    name: gomoteserver-internal
    90    annotations:
    91      cloud.google.com/neg: '{"ingress": false}'
    92      cloud.google.com/app-protocols: '{"https":"HTTP2"}'
    93  spec:
    94    ports:
    95      - port: 444
    96        targetPort: 444
    97        name: https
    98    selector:
    99      app: gomoteserver
   100    type: NodePort
   101  ---
   102  apiVersion: cloud.google.com/v1
   103  kind: BackendConfig
   104  metadata:
   105    namespace: prod
   106    name: gomoteserver-iap-backend
   107  spec:
   108    iap:
   109      enabled: true
   110      oauthclientCredentials:
   111        secretName: iap-oauth
   112    timeoutSec: 86400  # For long-running gomote RPCs. See https://go.dev/issue/56423.