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
|
2019-08-02 10:27:54 +02:00
|
|
|
- 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
|
2021-04-17 23:04:02 +02:00
|
|
|
type: NodePort
|
2019-06-20 13:07:42 +02:00
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
2021-09-29 20:16:33 +02:00
|
|
|
apiVersion: networking.k8s.io/v1
|
2019-06-20 13:07:42 +02:00
|
|
|
kind: Ingress
|
|
|
|
|
metadata:
|
|
|
|
|
name: nginx-s3-upload
|
|
|
|
|
annotations:
|
2021-04-17 23:04:02 +02:00
|
|
|
kubernetes.io/ingress.class: "alb"
|
|
|
|
|
alb.ingress.kubernetes.io/group.name: "unbound"
|
|
|
|
|
alb.ingress.kubernetes.io/scheme: internet-facing
|
|
|
|
|
alb.ingress.kubernetes.io/target-type: instance
|
2021-09-29 20:16:33 +02:00
|
|
|
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80},{"HTTPS": 443}]'
|
|
|
|
|
alb.ingress.kubernetes.io/ssl-redirect: "443"
|
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:
|
2021-09-29 20:16:33 +02:00
|
|
|
- path: /
|
|
|
|
|
pathType: Prefix
|
2021-04-17 23:04:02 +02:00
|
|
|
backend:
|
2021-09-29 20:16:33 +02:00
|
|
|
service:
|
|
|
|
|
name: nginx-s3-upload
|
|
|
|
|
port:
|
|
|
|
|
number: 80
|