blob: c01f5c3de545fe935dd6a5b1cb88039df56098d3 [file] [log] [blame]
apiVersion: v1
kind: Service
metadata:
labels:
app: ctfe
name: ctfe
annotations:
beta.cloud.google.com/backend-config: '{"ports": {"8000":"skia-default-backendconfig"}}'
skia.org.domain: ct.skia.org
spec:
ports:
- name: metrics
port: 20000
- name: http
port: 8000
- name: internal-http
port: 9000
selector:
app: ctfe
type: NodePort
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: ctfe
spec:
replicas: 1
strategy:
type: RollingUpdate
template:
metadata:
labels:
app: ctfe
annotations:
prometheus.io.scrape: "true"
prometheus.io.port: "20000"
spec:
automountServiceAccountToken: false
securityContext:
runAsUser: 2000 # aka skia
fsGroup: 2000 # aka skia
containers:
- name: ctfe
image: gcr.io/skia-public/ctfe:2019-09-25T00_35_23Z-rmistry-865fd45-clean
args:
- "--namespace=cluster-telemetry"
- "--project_name=skia-public"
- "--host=ct.skia.org"
- "--logtostderr"
- "--port=:8000"
- "--internal_port=:9000"
- "--prom_port=:20000"
- "--resources_dir=/usr/local/share/ctfe/"
- "--email_client_secret_file=/etc/ct-email-secrets/client_secret.json"
- "--email_token_cache_file=/etc/ct-email-secrets/client_token.json"
ports:
- containerPort: 20000
- containerPort: 8000
- containerPort: 9000
volumeMounts:
- name: ct-email-secrets
mountPath: /etc/ct-email-secrets
- name: skia-ctfe-sa
mountPath: /var/secrets/google
- name: skia-org-legacy-login-secrets
mountPath: /etc/skia.org/
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /var/secrets/google/key.json
resources:
requests:
memory: "10Mi"
cpu: "10m"
readinessProbe:
httpGet:
path: /healthz
port: 8000
initialDelaySeconds: 1
periodSeconds: 3
failureThreshold: 10
volumes:
- name: ct-email-secrets
secret:
secretName: ct-email-secrets
- name: skia-ctfe-sa
secret:
secretName: skia-ctfe
- name: skia-org-legacy-login-secrets
secret:
secretName: skia-org-legacy-login-secrets