Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add max image size parameter #105

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ksoloway-nuro
Copy link

Adding AWS_MAX_IMAGE_SIZE parameter to limit size of uploads. Defaults to 10GB.

Copy link
Contributor

@oldgiova oldgiova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor adjustment needed

@@ -246,6 +246,7 @@ The following table lists the parameters for the `deployments` component and the
| `deployments.service.nodePort` | Node port for the service | `nil` |
| `deployments.env.DEPLOYMENTS_MIDDLEWARE` | Set the DEPLOYMENTS_MIDDLEWARE variable | `prod` |
| `deployments.env.DEPLOYMENTS_PRESIGN_SECRET` | Set the secret for generating signed url, must be a base64 encoded secret. | random value at start-up time |
| `deployments.env.DEPLOYMENTS_AWS_MAX_IMAGE_SIZE` | Set the max artifact image size in bytes. | `nil`, code defaults to 10GB |
Copy link
Contributor

@oldgiova oldgiova Jul 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| `deployments.env.DEPLOYMENTS_AWS_MAX_IMAGE_SIZE` | Set the max artifact image size in bytes. | `nil`, code defaults to 10GB |
| `deployments.env.DEPLOYMENTS_STORAGE_MAX_IMAGE_SIZE` | Set the max artifact image size in bytes. | `nil`, code defaults to 10GB |

The AWS_MAX_IMAGE_SIZE env var is deprecated in favor of STORAGE_MAX_IMAGE_SIZE: https://github.com/mendersoftware/deployments/blob/master/config.yaml#L212

@@ -87,6 +87,8 @@ spec:
value: {{ .Values.deployments.env.DEPLOYMENTS_AWS_TAG_ARTIFACT | quote }}
- name: DEPLOYMENTS_PRESIGN_SECRET
value: {{ .Values.deployments.env.DEPLOYMENTS_PRESIGN_SECRET | quote }}
- name: DEPLOYMENTS_AWS_MAX_IMAGE_SIZE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- name: DEPLOYMENTS_AWS_MAX_IMAGE_SIZE
- name: DEPLOYMENTS_STORAGE_MAX_IMAGE_SIZE

@@ -87,6 +87,8 @@ spec:
value: {{ .Values.deployments.env.DEPLOYMENTS_AWS_TAG_ARTIFACT | quote }}
- name: DEPLOYMENTS_PRESIGN_SECRET
value: {{ .Values.deployments.env.DEPLOYMENTS_PRESIGN_SECRET | quote }}
- name: DEPLOYMENTS_AWS_MAX_IMAGE_SIZE
value: {{ .Values.deployments.env.DEPLOYMENTS_AWS_MAX_IMAGE_SIZE | quote }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
value: {{ .Values.deployments.env.DEPLOYMENTS_AWS_MAX_IMAGE_SIZE | quote }}
value: {{ .Values.deployments.env.DEPLOYMENTS_STORAGE_MAX_IMAGE_SIZE | default 10737418240 | int | toString | quote }}

A default values is missing. Either set it here, or in the mender/values.yaml

@oldgiova
Copy link
Contributor

Some minor adjustment needed

Hi @ksoloway-nuro , thanks for your contribution! I didn't meant to be rude, I thought it was an internal contribution ;)
I can help you trough this review. I suggested some adjustement.

@tranchitella tranchitella removed their request for review May 20, 2024 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants