This repository has been archived on 2026-03-07. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
nginx-s3-upload/deployment_files/deploy.yaml
T

86 lines
1.8 KiB
YAML
Raw Normal View History

2019-06-20 13:07:42 +02:00
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: nginx-s3-upload
name: nginx-s3-upload-deployment
annotations:
kubernetes.io/change-cause: "${TIMESTAMP} Deployed commit id: ${COMMIT}"
spec:
replicas: 2
selector:
matchLabels:
app: nginx-s3-upload
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
labels:
app: nginx-s3-upload
spec:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: "app"
operator: In
values:
- nginx-s3-upload
topologyKey: kubernetes.io/hostname
containers:
- name: nginx-s3-upload
readinessProbe:
httpGet:
path: /healthcheck
port: 80
initialDelaySeconds: 5
periodSeconds: 5
timeoutSeconds: 5
imagePullPolicy: IfNotPresent
image: registry.gitlab.com/paidit-se/nginx-s3-upload:${COMMIT}
env:
- name: S3_BUCKET_NAME
value: upload.paidit.se
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: nginx-s3-upload
spec:
ports:
- port: 80
protocol: TCP
targetPort: 80
selector:
app: nginx-s3-upload
type: ClusterIP
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: nginx-s3-upload
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/proxy-body-size: 1g
spec:
rules:
- host: 'upload.paidit.se'
http:
paths:
- backend:
serviceName: nginx-s3-upload
servicePort: 80
path: /