Initial commit

This commit is contained in:
2019-06-20 13:07:42 +02:00
commit 98cfbd61d4
8 changed files with 271 additions and 0 deletions
+85
View File
@@ -0,0 +1,85 @@
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: /