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 resources: requests: memory: 200Mi limits: memory: 300Mi readinessProbe: httpGet: path: /healthcheck port: 80 initialDelaySeconds: 5 periodSeconds: 6 timeoutSeconds: 5 imagePullPolicy: Always image: registry.gitlab.com/paidit-se/nginx-s3-upload:${COMMIT} env: - name: S3_BUCKET_NAME value: upload.unbound.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.unbound.se' http: paths: - backend: serviceName: nginx-s3-upload servicePort: 80 path: /