Skip to content

Commit

Permalink
Undeleting deploy template
Browse files Browse the repository at this point in the history
  • Loading branch information
zwolf committed Jun 4, 2024
1 parent de7bc99 commit ad9682b
Showing 1 changed file with 120 additions and 0 deletions.
120 changes: 120 additions & 0 deletions kubernetes/deployment-production.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: aggregation-caesar
labels:
app: aggregation-caesar
spec:
selector:
matchLabels:
app: aggregation-caesar
template:
metadata:
labels:
app: aggregation-caesar
spec:
containers:
- name: aggregation-caesar-app
image: ghcr.io/zooniverse/aggregation-for-caesar:__IMAGE_TAG__
ports:
- containerPort: 80
resources:
requests:
memory: "500Mi"
cpu: "500m"
limits:
memory: "1000Mi"
cpu: "1000m"
startupProbe:
httpGet:
path: /
port: 80
# wait 6 * 10 seconds(default periodSeconds) for the container to start
# after this succeeds once the liveness probe takes over
failureThreshold: 6
livenessProbe:
httpGet:
path: /
port: 80
# allow a longer response time than 1s
timeoutSeconds: 10
readinessProbe:
httpGet:
path: /
port: 80
# start checking for readiness after 20s (to serve traffic)
initialDelaySeconds: 20
# allow a longer response time than 1s
timeoutSeconds: 10
env:
- name: FLASK_ENV
value: production
- name: PANOPTES_URL
value: https://panoptes.zooniverse.org/
- name: PANOPTES_CLIENT_ID
valueFrom:
secretKeyRef:
name: aggregation-for-caesar-environment
key: PANOPTES_CLIENT_ID
- name: PANOPTES_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: aggregation-for-caesar-environment
key: PANOPTES_CLIENT_SECRET
- name: MAST_AUTH_TOKEN
valueFrom:
secretKeyRef:
name: aggregation-for-caesar-environment
key: MAST_AUTH_TOKEN
- name: MAST_PROD_TOKEN
valueFrom:
secretKeyRef:
name: aggregation-for-caesar-environment
key: MAST_PROD_TOKEN
- name: SENTRY_DSN
valueFrom:
secretKeyRef:
name: aggregation-for-caesar-environment
key: SENTRY_DSN
- name: NEW_RELIC_LICENSE_KEY
valueFrom:
secretKeyRef:
name: aggregation-for-caesar-environment
key: NEW_RELIC_LICENSE_KEY
- name: NEW_RELIC_APP_NAME
value: 'Aggregation Caesar'
---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: aggregation-caesar
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: aggregation-caesar
minReplicas: 2
maxReplicas: 3
targetCPUUtilizationPercentage: 80
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: aggregation-caesar
spec:
minAvailable: 50%
selector:
matchLabels:
app: aggregation-caesar
---
apiVersion: v1
kind: Service
metadata:
name: aggregation-caesar
spec:
selector:
app: aggregation-caesar
ports:
- protocol: TCP
port: 80
targetPort: 80

0 comments on commit ad9682b

Please sign in to comment.