fleet/tools/ci/k8s-templates/branch-deployment.template
Zach Wasserman d624e099fb
Deprecate environment variable prefix (#301)
- Support both `FLEET_` and `KOLIDE_` prefixes.
- Add logging about deprecated `KOLIDE_` prefix.
- Update documentation and sample configs.
2021-02-11 15:36:58 -08:00

80 lines
2.2 KiB
Plaintext

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
# Fleet {{ .Name }} branch
name: fleet-{{ .Name }}
spec:
replicas: 1
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 0
maxSurge: 2
template:
metadata:
labels:
app: fleet-{{ .Name }}
spec:
imagePullSecrets:
- name: kolide-hub
containers:
- name: fleet-{{ .Name }}
image: kolide/fleet:{{ .RevShort }}
imagePullPolicy: Always
resources:
requests:
cpu: 250m
memory: 250Mi
limits:
cpu: 500m
memory: 500Mi
command:
- "/fleet"
- "serve"
env:
- name: FLEET_MYSQL_USERNAME
valueFrom:
secretKeyRef:
name: cloudsql.cloudmaster
key: username
- name: FLEET_SERVER_TLS
value: "false"
- name: FLEET_MYSQL_PASSWORD
valueFrom:
secretKeyRef:
name: cloudsql.cloudmaster
key: password
- name: FLEET_MYSQL_DATABASE
value: fleet_{{ .Name }}
- name: FLEET_REDIS_ADDRESS
value: redis-fleet-{{ .Name }}:6379
- name: FLEET_AUTH_JWT_KEY
value: changeme_fake_jwt_key
ports:
- containerPort: 8080
- name: cloudsql-proxy
image: b.gcr.io/cloudsql-docker/gce-proxy:1.05
command: ["/cloud_sql_proxy", "--dir=/cloudsql",
"-instances=kolide-ose-testing:us-east1:kolidepr01=tcp:3306",
"-credential_file=/secrets/cloudsql/credentials.json"]
volumeMounts:
- name: cloudsql-oauth-credentials
mountPath: /secrets/cloudsql
readOnly: true
- name: ssl-certs
mountPath: /etc/ssl/certs
resources:
requests:
cpu: 100m
memory: 250Mi
limits:
cpu: 500m
memory: 500Mi
volumes:
- name: cloudsql-oauth-credentials
secret:
secretName: cloudsql-oauth-credentials
- name: ssl-certs
hostPath:
path: /etc/ssl/certs