golang.org/x/build@v0.0.0-20240506185731-218518f32b70/cmd/relui/deployment-prod.yaml (about) 1 # Copyright 2022 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: relui-deployment 10 spec: 11 selector: 12 matchLabels: 13 app: relui 14 strategy: 15 type: Recreate 16 template: 17 metadata: 18 labels: 19 app: relui 20 spec: 21 serviceAccountName: relui 22 containers: 23 - name: relui 24 image: gcr.io/symbolic-datum-552/relui:latest 25 imagePullPolicy: Always 26 command: 27 - "/usr/bin/tini" 28 - "--" 29 - "./relui" 30 - "--listen-https-selfsigned=:444" 31 - "--base-url=https://build.golang.org/releases" 32 # Define the site header and external service configuration. 33 - "--site-title=Go Releases" 34 - "--site-header-css=Site-header--production" 35 - "--sendgrid-api-key=secret:symbolic-datum-552/sendgrid-sendonly-api-key" 36 - "--announce-mail-from=announce@golang.org" 37 - "--announce-mail-to=golang-nuts@googlegroups.com" 38 - "--announce-mail-bcc=golang-announce@googlegroups.com, golang-dev@googlegroups.com" 39 - "--schedule-mail-from=nobody@golang.org" 40 - "--schedule-mail-to=go-builders-alerts@google.com" 41 - "--twitter-api-secret=secret:symbolic-datum-552/twitter-api-secret" 42 - "--mastodon-api-secret=secret:symbolic-datum-552/mastodon-api-secret" 43 - "--builder-master-key=secret:symbolic-datum-552/builder-master-key" 44 - "--github-token=secret:symbolic-datum-552/maintner-github-token" 45 - "--scratch-files-base=gs://golang-release-staging/relui-scratch" 46 - "--signed-files-base=gs://golang-release-staging/relui-scratch/relworker-scratch" 47 - "--serving-files-base=gs://golang" 48 - "--edge-cache-url=https://dl.google.com/go" 49 - "--website-upload-url=https://go.dev/dl/upload" 50 - "--cloud-build-project=symbolic-datum-552" 51 - "--cloud-build-account=projects/symbolic-datum-552/serviceAccounts/relui-prod@symbolic-datum-552.iam.gserviceaccount.com" 52 - "--swarming-url=https://chrome-swarming.appspot.com" 53 - "--swarming-account=relui-tasks@symbolic-datum-552.iam.gserviceaccount.com" 54 - "--swarming-pool=luci.golang.security-try-workers" 55 - "--swarming-realm=golang:security-try-workers" 56 readinessProbe: 57 httpGet: 58 path: /healthz 59 port: 444 60 scheme: HTTPS 61 ports: 62 - containerPort: 444 63 env: 64 - name: PGUSER 65 value: relui-prod@symbolic-datum-552.iam 66 - name: PGHOST 67 value: 127.0.0.1 68 - name: PGDATABASE 69 value: relui 70 resources: 71 requests: 72 cpu: "8" 73 memory: "8Gi" 74 - name: cloud-sql-proxy 75 # It is recommended to use the latest version of the Cloud SQL proxy 76 image: gcr.io/cloudsql-docker/gce-proxy:latest 77 command: 78 - "/cloud_sql_proxy" 79 # If connecting from a VPC-native GKE cluster, you can use the 80 # following flag to have the proxy connect over private IP 81 - "-ip_address_types=PRIVATE" 82 - "-enable_iam_login" 83 # Replace DB_PORT with the port the proxy should listen on 84 # Defaults: MySQL: 3306, Postgres: 5432, SQLServer: 1433 85 - "-instances=symbolic-datum-552:us-central1:relui-prod-01=tcp:5432" 86 securityContext: 87 # The default Cloud SQL proxy image runs as the 88 # "nonroot" user and group (uid: 65532) by default. 89 runAsNonRoot: true 90 # Resource configuration depends on an application's requirements. You 91 # should adjust the following values based on what your application 92 # needs. For details, see https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ 93 resources: 94 requests: 95 # The proxy's memory use scales linearly with the number of active 96 # connections. Fewer open connections will use less memory. Adjust 97 # this value based on your application's requirements. 98 memory: "2Gi" 99 # The proxy's CPU use scales linearly with the amount of IO between 100 # the database and the application. Adjust this value based on your 101 # application's requirements. 102 cpu: "1" 103 --- 104 apiVersion: v1 105 kind: ServiceAccount 106 metadata: 107 namespace: prod 108 name: relui 109 annotations: 110 iam.gke.io/gcp-service-account: relui-prod@symbolic-datum-552.iam.gserviceaccount.com 111 --- 112 apiVersion: v1 113 kind: Service 114 metadata: 115 namespace: prod 116 name: relui-internal 117 annotations: 118 cloud.google.com/backend-config: '{"default": "relui-iap-backend"}' 119 cloud.google.com/neg: '{"ingress": false}' 120 cloud.google.com/app-protocols: '{"https":"HTTP2"}' 121 spec: 122 ports: 123 - port: 444 124 targetPort: 444 125 name: https 126 selector: 127 app: relui 128 type: NodePort 129 --- 130 apiVersion: cloud.google.com/v1 131 kind: BackendConfig 132 metadata: 133 namespace: prod 134 name: relui-iap-backend 135 spec: 136 iap: 137 enabled: true 138 oauthclientCredentials: 139 secretName: iap-oauth 140 healthCheck: 141 timeoutSec: 10 142 checkIntervalSec: 15 143 type: HTTPS 144 requestPath: /healthz