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/k8s/deploy.yaml
T

96 lines
2.1 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
2019-11-28 22:46:45 +01:00
name: nginx-s3-upload
2019-06-20 13:07:42 +02:00
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
2019-06-20 13:57:45 +02:00
resources:
requests:
memory: 200Mi
limits:
memory: 300Mi
2019-06-20 13:07:42 +02:00
readinessProbe:
httpGet:
path: /healthcheck
port: 80
initialDelaySeconds: 5
2019-06-28 16:07:04 +02:00
periodSeconds: 6
2019-06-20 13:07:42 +02:00
timeoutSeconds: 5
2019-06-28 16:07:04 +02:00
imagePullPolicy: Always
2019-08-02 10:32:37 +02:00
image: registry.gitlab.com/unboundsoftware/nginx-s3-upload:${COMMIT}
2019-06-20 13:07:42 +02:00
env:
- name: S3_BUCKET_NAME
2019-06-28 16:07:04 +02:00
value: upload.unbound.se
- name: AWS_REGION
value: eu-west-1
- name: RETURN_URL
value: uploads.unbound.se
2019-06-20 13:07:42 +02:00
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
---
2020-10-02 09:37:53 +02:00
apiVersion: networking.k8s.io/v1beta1
2019-06-20 13:07:42 +02:00
kind: Ingress
metadata:
name: nginx-s3-upload
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/enable-cors: "true"
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
2019-06-20 13:07:42 +02:00
spec:
rules:
2019-06-28 16:07:04 +02:00
- host: 'upload.unbound.se'
2019-06-20 13:07:42 +02:00
http:
paths:
- backend:
serviceName: nginx-s3-upload
servicePort: 80
path: /