diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bf0a71..f9d9549 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.8.20 (2022-09-20) + +* Add new setting `features.ingress.pathSuffix` + ## 0.8.19 (2022-07-31) * Fix broken env variables for imgproxy formats diff --git a/Readme.md b/Readme.md index 78c46d3..5d96c6a 100644 --- a/Readme.md +++ b/Readme.md @@ -344,6 +344,7 @@ Deployment specific options. |**resources.ingress.enabled**|When true, enables ingress resource for imgproxy|`false`| |**resources.ingress.health.whitelist**|Comma separated string of CIDR addresses that are allowed to access `/health` url of imgproxy|| |**resources.ingress.hosts**|Hostnames for the ingress resource to use|`["example.com"]`| +|**resources.ingress.pathSuffix**|Suffix to be added to path prefix, for example wildcard '*' for AWS balancer|| |**resources.ingress.tls**|TLS config array|| |**resources.ingress.tls[].hosts**|Hostnames this tls secret is used for|`["example.com"]`| |**resources.ingress.tls[].secretName**|Name of the k8s Secret resource which stores crt & key for the ingress resource|| diff --git a/imgproxy/Chart.yaml b/imgproxy/Chart.yaml index a297103..01b43df 100644 --- a/imgproxy/Chart.yaml +++ b/imgproxy/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 description: A fast and secure standalone server for resizing and converting remote images. The main principles of imgproxy are simplicity, speed, and security. name: imgproxy icon: https://cdn.rawgit.com/imgproxy/imgproxy/master/logo.svg -version: 0.8.19 +version: 0.8.20 appVersion: 3.7.0 keywords: - imgproxy diff --git a/imgproxy/README.md b/imgproxy/README.md index 54970c1..e964b9d 100644 --- a/imgproxy/README.md +++ b/imgproxy/README.md @@ -402,6 +402,7 @@ Deployment specific options. |**resources.ingress.enabled**|When true, enables ingress resource for imgproxy|`false`| |**resources.ingress.health.whitelist**|Comma separated string of CIDR addresses that are allowed to access `/health` url of imgproxy|| |**resources.ingress.hosts**|Hostnames for the ingress resource to use|`["example.com"]`| +|**resources.ingress.pathSuffix**|Suffix to be added to path prefix, for example wildcard '*' for AWS balancer|| |**resources.ingress.pathType**|Set the pathType for ingress rules explicitly (use `Prefix` for AWS ELB Controllers)|`ImplementationSpecific`| |**resources.ingress.tls**|TLS config array|| |**resources.ingress.tls[].hosts**|Hostnames this tls secret is used for|`["example.com"]`| diff --git a/imgproxy/templates/_helpers.tpl b/imgproxy/templates/_helpers.tpl index 32f6493..8fb2ded 100644 --- a/imgproxy/templates/_helpers.tpl +++ b/imgproxy/templates/_helpers.tpl @@ -102,3 +102,10 @@ https://docs.aws.amazon.com/eks/latest/userguide/specify-service-account-role.ht {{- $custom := $.Values.resources.deployment.resources | default dict -}} {{- merge $custom $default | toYaml -}} {{- end -}} + +{{/* Combine ingress path from server.pathPrefix and ingress.pathSuffix */}} +{{- define "imgproxy.ingressPath" -}} +{{- $prefix := ($.Values.features.server.pathPrefix | default "" | trimSuffix "/") -}} +{{- $suffix := ($.Values.resources.ingress.pathSuffix | default "" | trimPrefix "/") -}} +{{- printf "%s/%s" $prefix $suffix -}} +{{- end -}} diff --git a/imgproxy/templates/ingress.yaml b/imgproxy/templates/ingress.yaml index 157f669..7cfb88a 100644 --- a/imgproxy/templates/ingress.yaml +++ b/imgproxy/templates/ingress.yaml @@ -40,7 +40,7 @@ spec: http: paths: {{- $name := include "imgproxy.fullname" $ }} - {{- $path := default "/" $.Values.features.server.pathPrefix }} + {{- $path := include "imgproxy.ingressPath" $ }} {{- if eq $apiVersion "networking.k8s.io/v1" }} - path: {{ $path | quote }} pathType: {{ $pathType | quote }} diff --git a/imgproxy/values.yaml b/imgproxy/values.yaml index 614dcdd..4694a66 100644 --- a/imgproxy/values.yaml +++ b/imgproxy/values.yaml @@ -158,6 +158,9 @@ resources: ingress: enabled: false + # Add this suffix to ingress host paths. For example, use '*' for AWS load balancer + # This is a shortcut for the issue: https://github.com/kubernetes-sigs/aws-load-balancer-controller/issues/667 + pathSuffix: # the custom name for the ingress resource className: health: