Skip to content

Commit

Permalink
new annotations for disabling buffering
Browse files Browse the repository at this point in the history
  • Loading branch information
NorseGaud committed Dec 14, 2023
1 parent 776109d commit 8ebbb5b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/anka-build-cloud/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
type: application
version: 0.5.2
version: 0.6.0
apiVersion: v2
name: anka-build-cloud
appVersion: "1.40.0"
Expand Down
7 changes: 7 additions & 0 deletions charts/anka-build-cloud/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- Our recommended (and default) approach is to use the [`aws-load-balancer-controller`](https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.4/deploy/installation/) to create a NodePort and then ALB in AWS with a specific hostname. Pods must also have IPs from the VPC subnets. We configure [`amazon-vpc-cni-k8s`](https://github.com/aws/amazon-vpc-cni-k8s) plugin for this purpose in our kops deployment.
- By default local-storage is used for the Registry and ETCD. If the service pods are placed on a different kubernetes node, data will be orphaned on the previous and Anka VM Templates, Instances, etc will seem missing and be orphaned. This is not a good idea unless you only have a single node kubernetes cluster. For the registry: EFS is available as an alternative (see the comments below in the yaml and section "Using EFS") which can be cross-az. For ETCD, since it's sensitive to disk speed, you can set up a cluster with [Bitnami's ETCD Helm Chart](https://bitnami.com/stack/etcd/helm) which spans the entire cluster and prevents this.
- The kubernetes ingress-nginx by default will have proxy-buffering and other configurations that can cause problems with large file transfers. We set several annotations like `nginx.ingress.kubernetes.io/proxy-buffering: "off"` to solve this in the Ingress service definitions for the registry, but you may need to set your own versions of these if not using `ingress-nginx` (which is often confused with `nginx-ingress-controller`).

## Usage

Expand Down Expand Up @@ -202,3 +203,9 @@ provisioner: efs.csi.aws.com
EOF
kubectl apply -f ./efs-storageclass.yaml
```
---
## ChangeLog
- 0.6.0: Updated annotations for `nginx.ingress.kubernetes.io`` to support disabling buffering and large transfers.
4 changes: 2 additions & 2 deletions charts/anka-build-cloud/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ metadata:
nginx.ingress.kubernetes.io/auth-tls-pass-certificate-to-upstream: "true"
nginx.ingress.kubernetes.io/auth-tls-verify-client: "optional"
{{- end }}
nginx.ingress.kubernetes.io/client-max-body-size: "0"
nginx.ingress.kubernetes.io/proxy-body-size: "0"
nginx.ingress.kubernetes.io/proxy-max-temp-file-size: "0"
nginx.ingress.kubernetes.io/proxy-buffering: "off"
nginx.ingress.kubernetes.io/proxy-request-buffering: "off"
external-dns.alpha.kubernetes.io/hostname: {{ .Values.controller.ingressNginxHostname }}
spec:
ingressClassName: {{ .Values.controller.ingressNginxClassName }}
Expand Down Expand Up @@ -154,10 +154,10 @@ metadata:
nginx.ingress.kubernetes.io/auth-tls-pass-certificate-to-upstream: "true"
nginx.ingress.kubernetes.io/auth-tls-verify-client: "optional"
{{- end }}
nginx.ingress.kubernetes.io/client-max-body-size: "0"
nginx.ingress.kubernetes.io/proxy-body-size: "0"
nginx.ingress.kubernetes.io/proxy-max-temp-file-size: "0"
nginx.ingress.kubernetes.io/proxy-buffering: "off"
nginx.ingress.kubernetes.io/proxy-request-buffering: "off"
external-dns.alpha.kubernetes.io/hostname: {{ .Values.registry.ingressNginxHostname }}
spec:
ingressClassName: {{ .Values.registry.ingressNginxClassName }}
Expand Down

0 comments on commit 8ebbb5b

Please sign in to comment.