Merge branch 'master' into make-nginx-proxy-http-version-configurable

This commit is contained in:
Schlepptop authored and GitHub committed 2026-10-22 11:37:55 +02:00
commit 5b72061845
91 files changed
+561 -202

No files matched your search

+5 -8
View File
@@ -1950,7 +1950,7 @@ func getProcessResources(appName string, processType string) (ProcessResourcesMa
if err != nil {
return ProcessResourcesMap{}, fmt.Errorf("Error parsing memory limit: %w", err)
}
if quantity != "0Mi" {
if quantity != "0" {
processResources.Limits.Memory = quantity
} else {
processResources.Limits.Memory = ""
@@ -1981,7 +1981,7 @@ func getProcessResources(appName string, processType string) (ProcessResourcesMa
if err != nil {
return ProcessResourcesMap{}, fmt.Errorf("Error parsing memory request: %w", err)
}
if quantity != "0Mi" {
if quantity != "0" {
processResources.Requests.Memory = quantity
} else {
processResources.Requests.Memory = ""
@@ -2724,17 +2724,14 @@ func cronIDLabelValue(cronID string) string {
return hex.EncodeToString(sum[:])
}
// parseMemoryQuantity parses a string into a valid memory quantity
// parseMemoryQuantity parses a docker-compatible memory value into a binary memory quantity
func parseMemoryQuantity(input string) (string, error) {
if _, err := strconv.ParseInt(input, 10, 64); err == nil {
input = fmt.Sprintf("%sMi", input)
}
quantity, err := resource.ParseQuantity(input)
bytes, err := common.ParseMemoryBytes(input)
if err != nil {
return "", err
}
return quantity.String(), nil
return resource.NewQuantity(bytes, resource.BinarySI).String(), nil
}
func uninstallHelperCommands(ctx context.Context) error {