Skip to content

Commit

Permalink
Merge pull request #115 from imgproxy/v0.8.24
Browse files Browse the repository at this point in the history
Support imgproxy v3.12
  • Loading branch information
nepalez authored Jan 5, 2023
2 parents f3d2014 + 11a616c commit a0f8234
Show file tree
Hide file tree
Showing 8 changed files with 126 additions and 15 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 0.8.24 (2023-01-05)

* Support imgproxy v3.12.0
* Fix issue #102 (enable autoscaling/v2 api)
* Allow templating of ingress annotations

## 0.8.23 (2022-10-19)

* Support imgproxy v3.9.0
Expand Down
19 changes: 16 additions & 3 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ The above command installs a specified version of imgproxy.
| **features.server.readTimeout** |the maximum duration (in seconds) for reading the entire image request, including the body|`10`|
| **features.server.writeTimeout** |the maximum duration (in seconds) for writing the response|`10`|
| **features.server.keepAliveTimeout** |the maximum duration (in seconds) to wait for the next request before closing the connection. When set to 0, keep-alive is disabled|`10`|
| **features.server.clientKeepAliveTimeout** |the maximum duration (in seconds) to wait for the next request before closing the HTTP client connection. The HTTP client is used to download source images. When set to 0, keep-alive is disabled.|`90`|
| **features.server.downloadTimeout** |the maximum duration (in seconds) for downloading the source image|`5`|
| **features.server.concurrency** |the maximum number of image requests to be processed simultaneously|`double number of CPU cores`|
| **features.server.maxClients** |the maximum number of simultaneous active connections|`concurrency * 10`|
Expand All @@ -115,6 +116,7 @@ The above command installs a specified version of imgproxy.
|**features.security.maxSrcResolution**|the maximum resolution of the source image, in megapixels.|`16.8`|
|**features.security.maxSrcFileSize**|the maximum size of the source image, in bytes.|`0` (disabled)|
|**features.security.maxAnimationFrames**|the maximum of animated image frames to being processed.|`1`|
|**features.security.maxAnimationFrameResolution**|The maximum resolution of the animated source image frame, in megapixels.|`0`|
|**features.security.maxSvgCheckBytes**|the maximum number of bytes imgproxy will read to recognize SVG.|`32KB`|
|**features.security.allowOrigin**|when set, enables CORS headers with provided origin. CORS headers are disabled by default.|`false`|
|**features.security.allowedSources**|whitelist of source image URLs prefixes divided by comma. When blank, imgproxy allows all source image URLs.||
Expand All @@ -126,7 +128,7 @@ The above command installs a specified version of imgproxy.
|Value|Description|Default|
|-----|-----------|-------|
|**features.compression.quality**|quality of the resulting image, percentage|`80`|
|**features.compression.formatQuality**|default quality of the resulting image per format, comma divided.||
|**features.compression.formatQuality**|default quality of the resulting image per format, comma divided.|`avif=65`|
|**features.compression.gzipCompression**|GZip compression level|`5`|
|**features.compression.jpegProgressive**|when true, enables progressive compression of JPEG|`false`|
|**features.compression.jpegNoSubsample**|`PRO:` when true, chrominance subsampling is disabled. This will improve quality at the cost of larger file size|`false`|
Expand All @@ -139,7 +141,8 @@ The above command installs a specified version of imgproxy.
|**features.compression.pngQuantizationColors**|maximum number of quantization palette entries. Should be between 2 and 256|`256`|
|**features.compression.gifOptimizeFrames**|`PRO:` when true, enables GIF frames optimization; this may produce a smaller result, but may increase compression time|`false`|
|**features.compression.gifOptimizeTransparency**|`PRO:` when true, enables GIF transparency optimization; this may produce a smaller result, but may increase compression time|`false`|
|**features.compression.avifSpeed**|controls the CPU effort spent improving compression (0-8).|`5`|
|**features.compression.webpCompression**|`PRO:` The compression method to use. Supported values are lossy, near_lossless, and lossless|`lossy`|
|**features.compression.avifSpeed**|controls the CPU effort spent improving compression (0-8).|`8`|

### Detection of WEBP/Avif Support by Browsers

Expand Down Expand Up @@ -196,7 +199,7 @@ The above command installs a specified version of imgproxy.

|Value| Description|Default|
|-----|-----------|------|
|**features.formats.preferred**| list of preferred formats, comma divided.|jpeg,png,gif,webp,avif,ico|
|**features.formats.preferred**| list of preferred formats, comma divided.|jpeg,png,gif|
|**features.formats.skipProcessing**|list of formats that imgproxy shouldn't process, comma-divided.||
|`DEPRECATED:`**features.skipProcessing.formats**|list of formats that imgproxy shouldn't process, comma-divided. ||

Expand Down Expand Up @@ -256,9 +259,19 @@ The above command installs a specified version of imgproxy.
|**features.openTelemetry.serverCert**|OpenTelemetry collector TLS certificate, PEM-encoded|``|
|**features.openTelemetry.clientCert**|OpenTelemetry client TLS certificate, PEM-encoded|``|
|**features.openTelemetry.clientKey**|OpenTelemetry client TLS key, PEM-encoded|``|
|**features.openTelemetry.grpcInsecure**|When true, imgproxy will use an insecure GRPC connection unless the collector TLS certificate is not provided.|`true`|
|**features.openTelemetry.propagators**|a list of OpenTelemetry text map propagators, comma divided. Supported propagators are `tracecontext`, `baggage`, `b3`, `b3multi`, `jaeger`, `xray`, and `ottrace`|``|
|**features.openTelemetry.traceIdGenerator**|OpenTelemetry trace ID generator. Supported generators are `xray` and `random`|`xray`|
|**features.openTelemetry.connectionTimeout**|the maximum duration (in seconds) for establishing a connection to the OpenTelemetry collector|`5`|

### Integration to Amazon CloudWatch (v3.12+)

|Value|Description|Default|
|-----|-----------|------|
|**features.amazonCloudWatch.serviceName**|The value of the ServiceName dimension which will be used in the metrics|``|
|**features.amazonCloudWatch.namespace**|The CloudWatch namespace for the metrics|``|
|**features.amazonCloudWatch.region**|The code of the AWS region to which the metrics should be sent|``|

### Integration to Datadog (v3+)

|Value|Description|Default|
Expand Down
4 changes: 2 additions & 2 deletions imgproxy/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ 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.23
appVersion: 3.9.0
version: 0.8.24
appVersion: 3.12.0
keywords:
- imgproxy
- image
Expand Down
19 changes: 16 additions & 3 deletions imgproxy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ The above command installs a specified version of imgproxy.
|**features.server.readTimeout**|the maximum duration (in seconds) for reading the entire image request, including the body|`10`|
|**features.server.writeTimeout**|the maximum duration (in seconds) for writing the response|`10`|
|**features.server.keepAliveTimeout**|the maximum duration (in seconds) to wait for the next request before closing the connection. When set to 0, keep-alive is disabled|`10`|
|**features.server.clientKeepAliveTimeout** |the maximum duration (in seconds) to wait for the next request before closing the HTTP client connection. The HTTP client is used to download source images. When set to 0, keep-alive is disabled.|`90`|
|**features.server.downloadTimeout**|the maximum duration (in seconds) for downloading the source image|`5`|
|**features.server.concurrency**|the maximum number of image requests to be processed simultaneously|`double number of CPU cores`|
|**features.server.requestsQueueSize**|he maximum number of image requests that can be put in the queue. Requests that exceed this limit are rejected with `429` HTTP status. When set to `0`, the requests queue is unlimited.|`0`|
Expand All @@ -117,6 +118,7 @@ The above command installs a specified version of imgproxy.
|**features.security.maxSrcResolution**|the maximum resolution of the source image, in megapixels.|`16.8`|
|**features.security.maxSrcFileSize**|the maximum size of the source image, in bytes.|`0` (disabled)|
|**features.security.maxAnimationFrames**|the maximum of animated image frames to being processed.|`1`|
|**features.security.maxAnimationFrameResolution**|The maximum resolution of the animated source image frame, in megapixels.|`0`|
|**features.security.maxSvgCheckBytes**|the maximum number of bytes imgproxy will read to recognize SVG.|`32KB`|
|**features.security.allowOrigin**|when set, enables CORS headers with provided origin. CORS headers are disabled by default.|`false`|
|**features.security.allowedSources**|whitelist of source image URLs prefixes divided by comma. When blank, imgproxy allows all source image URLs.||
Expand All @@ -136,7 +138,7 @@ The above command installs a specified version of imgproxy.
|Value|Description|Default|
|-----|-----------|-------|
|**features.compression.quality**|quality of the resulting image, percentage|`80`|
|**features.compression.formatQuality**|default quality of the resulting image per format, comma divided.||
|**features.compression.formatQuality**|default quality of the resulting image per format, comma divided.|`avif=65`|
|**features.compression.gzipCompression**|GZip compression level (removed in `v3`)|`5`|
|**features.compression.jpegProgressive**|when true, enables progressive compression of JPEG|`false`|
|**features.compression.jpegNoSubsample**|`PRO:` when true, chrominance subsampling is disabled. This will improve quality at the cost of larger file size|`false`|
Expand All @@ -149,7 +151,8 @@ The above command installs a specified version of imgproxy.
|**features.compression.pngQuantizationColors**|maximum number of quantization palette entries. Should be between 2 and 256|`256`|
|**features.compression.gifOptimizeFrames**|`PRO:` when true, enables GIF frames optimization; this may produce a smaller result, but may increase compression time|`false`|
|**features.compression.gifOptimizeTransparency**|`PRO:` when true, enables GIF transparency optimization; this may produce a smaller result, but may increase compression time|`false`|
|**features.compression.avifSpeed**|controls the CPU effort spent improving compression (0-8).|`5`|
|**features.compression.webpCompression**|`PRO:` The compression method to use. Supported values are lossy, near_lossless, and lossless|`lossy`|
|**features.compression.avifSpeed**|controls the CPU effort spent improving compression (0-8).|`8`|

### `PRO:` Resulting images quality calculation (v3+)

Expand Down Expand Up @@ -234,7 +237,7 @@ The above command installs a specified version of imgproxy.

|Value| Description|Default|
|-------------------------------------------------|------------------------------------------------------------------------------|-------|
|**features.formats.preferred**| list of preferred formats, comma divided.|jpeg,png,gif,webp,avif,ico|
|**features.formats.preferred**| list of preferred formats, comma divided.|jpeg,png,gif|
|**features.formats.skipProcessing**|list of formats that imgproxy shouldn't process, comma-divided.||
|`DEPRECATED:`**features.skipProcessing.formats**|list of formats that imgproxy shouldn't process, comma-divided. ||

Expand Down Expand Up @@ -293,9 +296,19 @@ The above command installs a specified version of imgproxy.
|**features.openTelemetry.serverCert**|OpenTelemetry collector TLS certificate, PEM-encoded|``|
|**features.openTelemetry.clientCert**|OpenTelemetry client TLS certificate, PEM-encoded|``|
|**features.openTelemetry.clientKey**|OpenTelemetry client TLS key, PEM-encoded|``|
|**features.openTelemetry.grpcInsecure**|When true, imgproxy will use an insecure GRPC connection unless the collector TLS certificate is not provided.|`true`|
|**features.openTelemetry.propagators**|a list of OpenTelemetry text map propagators, comma divided. Supported propagators are `tracecontext`, `baggage`, `b3`, `b3multi`, `jaeger`, `xray`, and `ottrace`|``|
|**features.openTelemetry.traceIdGenerator**|OpenTelemetry trace ID generator. Supported generators are `xray` and `random`|`xray`|
|**features.openTelemetry.connectionTimeout**|the maximum duration (in seconds) for establishing a connection to the OpenTelemetry collector|`5`|

### Integration to Amazon CloudWatch (v3.12+)

|Value|Description|Default|
|-----|-----------|------|
|**features.amazonCloudWatch.serviceName**|The value of the ServiceName dimension which will be used in the metrics|``|
|**features.amazonCloudWatch.namespace**|The CloudWatch namespace for the metrics|``|
|**features.amazonCloudWatch.region**|The code of the AWS region to which the metrics should be sent|``|

### Integration to Datadog (v3+)

|Value|Description|Default|
Expand Down
6 changes: 4 additions & 2 deletions imgproxy/templates/_versions.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@
{{- $kubeVersion := $.Capabilities.KubeVersion.Version }}
{{- $apiVersions := $.Capabilities.APIVersions }}

{{- if $kubeVersion | semverCompare ">=1.19.0-0" -}}
{{- "autoscaling/v2beta2" -}}
{{- if $kubeVersion | semverCompare ">=1.23.0-0" -}}
{{- "autoscaling/v2" -}}
{{- else if $kubeVersion | semverCompare ">=1.19.0-0" | and ($apiVersions.Has "autoscaling/v2") -}}
{{- "autoscaling/v2" -}}
{{- else if $kubeVersion | semverCompare ">=1.12.0-0" | and ($apiVersions.Has "autoscaling/v2beta2") -}}
{{- "autoscaling/v2beta2" -}}
{{- else if $apiVersions.Has "autoscaling/v2beta1" }}
Expand Down
28 changes: 28 additions & 0 deletions imgproxy/templates/env-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ data: {{- /* https://docs.imgproxy.net/#/configuration?id=url-signature */}}
{{- if .keepAliveTimeout }}
IMGPROXY_KEEP_ALIVE_TIMEOUT: {{ .keepAliveTimeout | toString | b64enc | quote }} # {{ .keepAliveTimeout }}
{{- end }}
{{- if .clientKeepAliveTimeout }}
IMGPROXY_CLIENT_KEEP_ALIVE_TIMEOUT: {{ .clientKeepAliveTimeout | toString | b64enc | quote }} # {{ .clientKeepAliveTimeout }}
{{- end }}
{{- if .downloadTimeout }}
IMGPROXY_DOWNLOAD_TIMEOUT: {{ .downloadTimeout | toString | b64enc | quote }} # {{ .downloadTimeout }}
{{- end }}
Expand Down Expand Up @@ -94,6 +97,9 @@ data: {{- /* https://docs.imgproxy.net/#/configuration?id=url-signature */}}
{{- if .maxAnimationFrames }}
IMGPROXY_MAX_ANIMATION_FRAMES: {{ .maxAnimationFrames | toString | b64enc | quote }} # {{ .maxAnimationFrames }}
{{- end }}
{{- if .maxAnimationFrameResolution }}
IMGPROXY_MAX_ANIMATION_FRAME_RESOLUTION: {{ .maxAnimationFrameResolution | toString | b64enc | quote }} # {{ .maxAnimationFrameResolution }}
{{- end }}
{{- if (.maxSvgCheckBytes | int | lt 0) }}
IMGPROXY_MAX_SVG_CHECK_BYTES: {{ .maxSvgCheckBytes | toString | b64enc | quote }} # {{ .maxSvgCheckBytes }}
{{- end }}
Expand Down Expand Up @@ -193,6 +199,9 @@ data: {{- /* https://docs.imgproxy.net/#/configuration?id=url-signature */}}
{{- if .gifOptimizeTransparency }}
IMGPROXY_GIF_OPTIMIZE_TRANSPARENCY: {{ "true" | b64enc | quote }} # {{ "true" }}
{{- end }}
{{- if .webpCompression }}
IMGPROXY_WEBP_COMPRESSION: {{ .webpCompression | toString | b64enc | quote }} # {{ .webpCompression }}
{{- end }}
{{- if .avifSpeed }}
{{- with atoi (toString .avifSpeed) }}
{{- if or (lt . 2) (gt . 8) }}
Expand Down Expand Up @@ -408,14 +417,33 @@ data: {{- /* https://docs.imgproxy.net/#/configuration?id=url-signature */}}
{{- if .clientKey }}
IMGPROXY_OPEN_TELEMETRY_CLIENT_KEY: {{ .clientKey | toString | b64enc | quote }} # {{ .clientKey }}
{{- end }}
{{- if (.grpcInsecure | toString | eq "false") }}
IMGPROXY_OPEN_TELEMETRY_GRPC_INSECURE: {{ "false" | b64enc | quote }} # false
{{- end }}
{{- if .propagators }}
IMGPROXY_OPEN_TELEMETRY_PROPAGATORS: {{ .propagators | toString | b64enc | quote }} # {{ .propagators }}
{{- end }}
{{- if .traceIdGenerator }}
IMGPROXY_OPEN_TELEMETRY_TRACE_ID_GENERATOR: {{ .traceIdGenerator | toString | b64enc | quote }} # {{ .traceIdGenerator }}
{{- end }}
{{- if .connectionTimeout }}
IMGPROXY_OPEN_TELEMETRY_CONNECTION_TIMEOUT: {{ .connectionTimeout | toString | b64enc | quote }} # {{ .connectionTimeout }}
{{- end }}
{{- end }}
{{- end }}

{{- /* https://docs.imgproxy.net/latest/cloud_watch?id=amazon-cloudwatch */}}
{{- with .Values.features.amazonCloudWatch }}
{{- if .serviceName }}
IMGPROXY_CLOUD_WATCH_SERVICE_NAME: {{ .serviceName | toString | b64enc | quote }} # {{ .serviceName }}
{{- if .namespace }}
IMGPROXY_CLOUD_WATCH_NAMESPACE: {{ .namespace | toString | b64enc | quote }} # {{ .namespace }}
{{- end }}
{{- if .region }}
IMGPROXY_CLOUD_WATCH_REGION: {{ .region | toString | b64enc | quote }} # {{ .region }}
{{- end }}
{{- end }}
{{- end }}

{{- /* https://docs.imgproxy.net/configuration?id=datadog-metrics */}}
{{- if (ge $.Values.image.tag "v3.0.0") }}
Expand Down
7 changes: 6 additions & 1 deletion imgproxy/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ metadata:
{{- end }}
{{- with .annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- $tp := typeOf . }}
{{- if eq $tp "string" }}
{{- tpl . $ | nindent 4 }}
{{- else }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
spec:
{{- if .className }}
Expand Down
Loading

0 comments on commit a0f8234

Please sign in to comment.