netflux-kubernetes/deploy/base/deploy-elon-staging.yaml

79 lines
2.2 KiB
YAML
Raw Normal View History

2022-05-25 05:09:29 +00:00
apiVersion: apps/v1
kind: Deployment
metadata:
name: elon-staging
labels:
app.kubernetes.io/name: elon-staging
app.kubernetes.io/instance: elon-staging
spec:
selector:
matchLabels:
app.kubernetes.io/name: elon-staging
app.kubernetes.io/instance: elon-staging
template:
metadata:
labels:
app.kubernetes.io/name: elon-staging
app.kubernetes.io/instance: elon-staging
spec:
containers:
- image: netfluxio/elon:latest
imagePullPolicy: Always
name: elon-staging
ports:
- name: http
protocol: TCP
containerPort: 8000
env:
- name: ELON_TWITTER_AUTHORIZE_URL
value: https://twitter.com/i/oauth2/authorize
- name: ELON_TWITTER_TOKEN_URL
value: https://api.twitter.com/2/oauth2/token
- name: ELON_DATABASE_URL
valueFrom:
secretKeyRef:
name: elon-staging-credentials
key: database-url
- name: ELON_SESSION_KEY
valueFrom:
secretKeyRef:
name: elon-staging-credentials
key: session-key
- name: ELON_TWITTER_CLIENT_ID
valueFrom:
secretKeyRef:
name: elon-staging-credentials
key: twitter-client-id
- name: ELON_TWITTER_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: elon-staging-credentials
key: twitter-client-secret
- name: ELON_TWITTER_CALLBACK_URL
valueFrom:
secretKeyRef:
name: elon-staging-credentials
key: twitter-callback-url
- name: ELON_TWITTER_BEARER_TOKEN
valueFrom:
secretKeyRef:
name: elon-staging-credentials
key: twitter-bearer-token
resources:
requests:
memory: "16Mi"
cpu: "20m"
limits:
memory: "32Mi"
cpu: "50m"
livenessProbe:
failureThreshold: 10
httpGet:
path: /
port: 8000
scheme: HTTP
initialDelaySeconds: 30
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 10