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

+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/app-json
go 1.26.2
go 1.27.1
require (
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/apps
go 1.26.2
go 1.27.1
require (
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/builder-dockerfile
go 1.26.2
go 1.27.1
require (
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/builder-herokuish
go 1.26.2
go 1.27.1
require (
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/builder-lambda
go 1.26.2
go 1.27.1
require (
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/builder-nixpacks
go 1.26.2
go 1.27.1
require (
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/builder-pack
go 1.26.2
go 1.27.1
require (
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/builder-railpack
go 1.26.2
go 1.27.1
require (
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/builder
go 1.26.2
go 1.27.1
require (
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
+4 -4
View File
@@ -15,10 +15,10 @@ func ReportSingleApp(appName string, format string, infoFlag string) error {
var flags map[string]common.ReportFunc
if appName == "--global" {
flags = map[string]common.ReportFunc{
"--builder-global-selected": reportGlobalSelected,
"--builder-global-build-dir": reportGlobalBuildDir,
"--builder-global-skip-cleanup": reportGlobalSkipCleanup,
"--builder-computed-skip-cleanup": reportComputedSkipCleanup,
"--builder-global-selected": reportGlobalSelected,
"--builder-global-build-dir": reportGlobalBuildDir,
"--builder-global-skip-cleanup": reportGlobalSkipCleanup,
"--builder-computed-skip-cleanup": reportComputedSkipCleanup,
}
} else {
flags = map[string]common.ReportFunc{
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/buildpacks
go 1.26.2
go 1.27.1
require (
github.com/dokku/dokku/plugins/app-json v0.0.0-00010101000000-000000000000
@@ -36,7 +36,7 @@ func main() {
args.Parse(os.Args[2:])
appName := args.Arg(0)
if *branch == "" {
*branch = common.PropertyGet("git", appName, "deploy-branch")
*branch = common.PropertyGet("git", appName, "deploy-branch")
}
err = buildpacks.CommandDetect(appName, *branch)
case "list":
+3 -3
View File
@@ -39,9 +39,9 @@ func CommandDetect(appName string, branch string) (err error) {
workDir := common.AppRoot(appName)
checkedOutDir, err := checkoutBareGitRepo(workDir, branch)
if err != nil {
return err
}
if err != nil {
return err
}
defer func() {
if err := os.RemoveAll(checkedOutDir); err != nil {
common.LogWarn(fmt.Sprintf("Failed to remove temporary directory %s: %v", checkedOutDir, err))
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/builds
go 1.26.2
go 1.27.1
require (
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/caddy-vhosts
go 1.26.2
go 1.27.1
require (
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/certs
go 1.26.2
go 1.27.1
require (
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/checks
go 1.26.2
go 1.27.1
require (
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/common
go 1.26.2
go 1.27.1
require (
github.com/alexellis/go-execute/v2 v2.2.1
+61
View File
@@ -0,0 +1,61 @@
package common
import (
"fmt"
"regexp"
"strconv"
"strings"
)
// memoryValueRegex matches a docker-compatible memory value: a number with an
// optional unit (b, k, m, g, t, p in either case) optionally followed by i and/or b
var memoryValueRegex = regexp.MustCompile(`^(\d+(?:\.\d+)?)(?:([kKmMgGtTpP])[iI]?)?([bB])?$`)
// IsValidMemoryValue returns true if the value is a docker-compatible memory value
func IsValidMemoryValue(value string) bool {
return memoryValueRegex.MatchString(value)
}
// IsUnitlessMemoryValue returns true if the value is a valid memory value without any unit suffix
func IsUnitlessMemoryValue(value string) bool {
matches := memoryValueRegex.FindStringSubmatch(value)
if matches == nil {
return false
}
return matches[2] == "" && matches[3] == ""
}
// ParseMemoryBytes converts a docker-compatible memory value into bytes.
// Units are binary, and a value without a unit is treated as megabytes
func ParseMemoryBytes(value string) (int64, error) {
matches := memoryValueRegex.FindStringSubmatch(value)
if matches == nil {
return 0, fmt.Errorf("Invalid memory value '%s'", value)
}
size, err := strconv.ParseFloat(matches[1], 64)
if err != nil {
return 0, fmt.Errorf("Invalid memory value '%s': %w", value, err)
}
multipliers := map[string]float64{
"k": 1 << 10,
"m": 1 << 20,
"g": 1 << 30,
"t": 1 << 40,
"p": 1 << 50,
}
unit := strings.ToLower(matches[2])
if unit == "" && matches[3] == "" {
unit = "m"
}
multiplier := float64(1)
if unit != "" {
multiplier = multipliers[unit]
}
return int64(size * multiplier), nil
}
+66
View File
@@ -0,0 +1,66 @@
package common
import (
"testing"
. "github.com/onsi/gomega"
)
func TestCommonIsValidMemoryValue(t *testing.T) {
RegisterTestingT(t)
valid := []string{"0", "100", "1.5", "100b", "100B", "512k", "512K", "512kb", "512m", "512M", "512MB", "512Mi", "512MiB", "1g", "1G", "1GB", "1Gi", "1gib", "1t", "1T", "1p", "1P"}
for _, value := range valid {
Expect(IsValidMemoryValue(value)).To(BeTrue(), value)
}
invalid := []string{"", "-1", "abc", "1x", "1Gm", "1i", "1ib", "1 G", "1.2.3", ".5g", "100G --foo", "1E", "1e9"}
for _, value := range invalid {
Expect(IsValidMemoryValue(value)).To(BeFalse(), value)
}
}
func TestCommonIsUnitlessMemoryValue(t *testing.T) {
RegisterTestingT(t)
Expect(IsUnitlessMemoryValue("100")).To(BeTrue())
Expect(IsUnitlessMemoryValue("1.5")).To(BeTrue())
Expect(IsUnitlessMemoryValue("100b")).To(BeFalse())
Expect(IsUnitlessMemoryValue("1G")).To(BeFalse())
Expect(IsUnitlessMemoryValue("1Gi")).To(BeFalse())
Expect(IsUnitlessMemoryValue("abc")).To(BeFalse())
}
func TestCommonParseMemoryBytes(t *testing.T) {
RegisterTestingT(t)
expected := map[string]int64{
"0": 0,
"512": 536870912,
"512m": 536870912,
"512M": 536870912,
"512MB": 536870912,
"512Mi": 536870912,
"512MiB": 536870912,
"1g": 1073741824,
"1G": 1073741824,
"1GB": 1073741824,
"1Gi": 1073741824,
"1.5g": 1610612736,
"1024K": 1048576,
"100b": 100,
"100B": 100,
"1t": 1099511627776,
"1p": 1125899906842624,
}
for value, bytes := range expected {
parsed, err := ParseMemoryBytes(value)
Expect(err).NotTo(HaveOccurred(), value)
Expect(parsed).To(Equal(bytes), value)
}
for _, value := range []string{"", "-1", "1x", "1Gm", "100G --foo"} {
_, err := ParseMemoryBytes(value)
Expect(err).To(HaveOccurred(), value)
}
}
+2 -2
View File
@@ -208,8 +208,8 @@ func TestReportSingleAppJSONNonPluginPrefixKey(t *testing.T) {
// Keys that don't start with --<reportType>- should pass through with
// only the leading "--" stripped, regardless of TrimPrefix.
infoFlags := map[string]string{
"--build-id": "abc123",
"--builds-retention": "5",
"--build-id": "abc123",
"--builds-retention": "5",
}
out := captureStdout(t, func() {
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/config
go 1.26.2
go 1.27.1
require (
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/cron
go 1.26.2
go 1.27.1
require (
github.com/dokku/dokku/plugins/app-json v0.0.0-00010101000000-000000000000
+6 -3
View File
@@ -154,9 +154,12 @@ func joinShellTokens(tokens []string) string {
// quoteShellArg returns s wrapped in single quotes when it contains characters
// the shell would otherwise interpret (whitespace, quotes, expansion sigils,
// globs, redirections, etc.). Embedded single quotes are escaped with the
// standard `'\''` close-escape-open sequence. Tokens free of such characters
// are returned verbatim so the stored representation stays human-readable for
// the common case.
// standard close-escape-open sequence:
//
// '\''
//
// Tokens free of such characters are returned verbatim so the stored
// representation stays human-readable for the common case.
func quoteShellArg(s string) string {
if s == "" {
return "''"
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/docker-options
go 1.26.2
go 1.27.1
require (
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/domains
go 1.26.2
go 1.27.1
require (
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/git
go 1.26.2
go 1.27.1
require (
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/haproxy-vhosts
go 1.26.2
go 1.27.1
require (
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/logs
go 1.26.2
go 1.27.1
require (
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/network
go 1.26.2
go 1.27.1
require (
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/nginx-vhosts
go 1.26.2
go 1.27.1
require (
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/openresty-vhosts
go 1.26.2
go 1.27.1
require (
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/plugin
go 1.26.2
go 1.27.1
require (
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/ports
go 1.26.2
go 1.27.1
require (
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
-1
View File
@@ -4,7 +4,6 @@ import (
"fmt"
)
// PortMap is a struct that contains a scheme:host-port:container-port mapping
type PortMap struct {
// ContainerPort is the port on the container
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/proxy
go 1.26.2
go 1.27.1
require (
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/ps
go 1.26.2
go 1.27.1
require (
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
+21 -21
View File
@@ -30,27 +30,27 @@ func ReportSingleApp(appName string, format string, infoFlag string) error {
}
} else {
flags = map[string]common.ReportFunc{
"--deployed": reportDeployed,
"--processes": reportProcesses,
"--ps-can-scale": reportCanScale,
"--ps-computed-dockerfile-start-cmd": reportComputedDockerfileStartCmd,
"--ps-computed-procfile-path": reportComputedProcfilePath,
"--ps-computed-restart-policy": reportComputedRestartPolicy,
"--ps-computed-skip-deploy": reportComputedSkipDeploy,
"--ps-computed-start-cmd": reportComputedStartCmd,
"--ps-computed-stop-timeout-seconds": reportComputedStopTimeoutSeconds,
"--ps-dockerfile-start-cmd": reportDockerfileStartCmd,
"--ps-global-procfile-path": reportGlobalProcfilePath,
"--ps-global-restart-policy": reportGlobalRestartPolicy,
"--ps-global-skip-deploy": reportGlobalSkipDeploy,
"--ps-global-stop-timeout-seconds": reportGlobalStopTimeoutSeconds,
"--ps-procfile-path": reportProcfilePath,
"--ps-restart-policy": reportRestartPolicy,
"--ps-skip-deploy": reportSkipDeploy,
"--ps-start-cmd": reportStartCmd,
"--ps-stop-timeout-seconds": reportStopTimeoutSeconds,
"--restore": reportRestore,
"--running": reportRunningState,
"--deployed": reportDeployed,
"--processes": reportProcesses,
"--ps-can-scale": reportCanScale,
"--ps-computed-dockerfile-start-cmd": reportComputedDockerfileStartCmd,
"--ps-computed-procfile-path": reportComputedProcfilePath,
"--ps-computed-restart-policy": reportComputedRestartPolicy,
"--ps-computed-skip-deploy": reportComputedSkipDeploy,
"--ps-computed-start-cmd": reportComputedStartCmd,
"--ps-computed-stop-timeout-seconds": reportComputedStopTimeoutSeconds,
"--ps-dockerfile-start-cmd": reportDockerfileStartCmd,
"--ps-global-procfile-path": reportGlobalProcfilePath,
"--ps-global-restart-policy": reportGlobalRestartPolicy,
"--ps-global-skip-deploy": reportGlobalSkipDeploy,
"--ps-global-stop-timeout-seconds": reportGlobalStopTimeoutSeconds,
"--ps-procfile-path": reportProcfilePath,
"--ps-restart-policy": reportRestartPolicy,
"--ps-skip-deploy": reportSkipDeploy,
"--ps-start-cmd": reportStartCmd,
"--ps-stop-timeout-seconds": reportStopTimeoutSeconds,
"--restore": reportRestore,
"--running": reportRunningState,
}
extraFlags := addStatusFlags(appName, infoFlag)
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/registry
go 1.26.2
go 1.27.1
require (
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/repo
go 1.26.2
go 1.27.1
require (
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
+35 -12
View File
@@ -2,25 +2,38 @@ package resource
import (
"fmt"
"strings"
"github.com/dokku/dokku/plugins/common"
)
func addMemorySuffixForDocker(key string, value string) string {
if key == "memory" {
hasSuffix := false
suffixes := []string{"b", "k", "m", "g", "KB", "MB", "GB", "B"}
for _, suffix := range suffixes {
if strings.HasSuffix(value, suffix) {
hasSuffix = true
}
// validateResourceValue returns an error if the value is not valid for the given resource key
func validateResourceValue(key string, value string) error {
switch key {
case "memory":
if !common.IsValidMemoryValue(value) {
return fmt.Errorf("Invalid memory value '%s': must be a number with an optional unit suffix of b, k, m, g, t or p", value)
}
if !hasSuffix {
value = value + "m"
case "memory-swap":
if value != "-1" && !common.IsValidMemoryValue(value) {
return fmt.Errorf("Invalid memory-swap value '%s': must be -1 or a number with an optional unit suffix of b, k, m, g, t or p", value)
}
}
return value
return nil
}
// formatResourceValueForDocker validates a resource value and formats it for use as a docker flag value.
// Memory values without a unit default to megabytes
func formatResourceValueForDocker(key string, value string) (string, error) {
if err := validateResourceValue(key, value); err != nil {
return "", err
}
if key == "memory" && common.IsUnitlessMemoryValue(value) {
value = value + "m"
}
return value, nil
}
func clearByResourceType(appName string, processType string, resourceType string) {
@@ -88,6 +101,16 @@ func setResourceType(appName string, processType string, r Resource, resourceTyp
return nil
}
for key, value := range resources {
if value == "" || value == "clear" {
continue
}
if err := validateResourceValue(key, value); err != nil {
return err
}
}
noun := "limits"
if resourceType == "reserve" {
noun = "reservation"
+55
View File
@@ -0,0 +1,55 @@
package resource
import (
"testing"
)
func TestFormatResourceValueForDocker(t *testing.T) {
testCases := []struct {
name string
key string
value string
expected string
wantErr bool
}{
{name: "unitless memory defaults to megabytes", key: "memory", value: "100", expected: "100m"},
{name: "unitless decimal memory defaults to megabytes", key: "memory", value: "1.5", expected: "1.5m"},
{name: "lowercase memory unit", key: "memory", value: "512m", expected: "512m"},
{name: "uppercase megabyte unit", key: "memory", value: "512M", expected: "512M"},
{name: "uppercase gigabyte unit", key: "memory", value: "1G", expected: "1G"},
{name: "uppercase kilobyte unit", key: "memory", value: "1024K", expected: "1024K"},
{name: "terabyte unit", key: "memory", value: "1t", expected: "1t"},
{name: "two letter unit", key: "memory", value: "512MB", expected: "512MB"},
{name: "binary unit", key: "memory", value: "1GiB", expected: "1GiB"},
{name: "byte unit", key: "memory", value: "100b", expected: "100b"},
{name: "memory rejects negative values", key: "memory", value: "-1", wantErr: true},
{name: "memory rejects extra arguments", key: "memory", value: "100G --foo", wantErr: true},
{name: "memory rejects invalid units", key: "memory", value: "1Gm", wantErr: true},
{name: "unlimited memory-swap", key: "memory-swap", value: "-1", expected: "-1"},
{name: "unitless memory-swap stays in bytes", key: "memory-swap", value: "512", expected: "512"},
{name: "uppercase memory-swap unit", key: "memory-swap", value: "2G", expected: "2G"},
{name: "memory-swap rejects invalid units", key: "memory-swap", value: "1x", wantErr: true},
{name: "memory-swap rejects other negative values", key: "memory-swap", value: "-2", wantErr: true},
{name: "other keys are passed through", key: "cpus", value: "1.5", expected: "1.5"},
}
for _, testCase := range testCases {
t.Run(testCase.name, func(t *testing.T) {
value, err := formatResourceValueForDocker(testCase.key, testCase.value)
if testCase.wantErr {
if err == nil {
t.Fatalf("expected an error for %s=%s, got %s", testCase.key, testCase.value, value)
}
return
}
if err != nil {
t.Fatalf("unexpected error for %s=%s: %v", testCase.key, testCase.value, err)
}
if value != testCase.expected {
t.Fatalf("expected %s, got %s", testCase.expected, value)
}
})
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/resource
go 1.26.2
go 1.27.1
require (
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
+19 -6
View File
@@ -71,22 +71,30 @@ func TriggerDockerArgsProcessDeploy(appName string, processType string) error {
}
}
var args strings.Builder
for key, value := range limits {
if value == "" {
continue
}
value = addMemorySuffixForDocker(key, value)
fmt.Printf(" --%s=%s ", key, value)
value, err := formatResourceValueForDocker(key, value)
if err != nil {
return fmt.Errorf("Unable to apply resource limits for %s: %w", appName, err)
}
fmt.Fprintf(&args, " --%s=%s ", key, value)
}
for key, value := range reservations {
if value == "" {
continue
}
value = addMemorySuffixForDocker(key, value)
fmt.Printf(" --%s-reservation=%s ", key, value)
value, err := formatResourceValueForDocker(key, value)
if err != nil {
return fmt.Errorf("Unable to apply resource reservations for %s: %w", appName, err)
}
fmt.Fprintf(&args, " --%s-reservation=%s ", key, value)
}
fmt.Print(args.String())
fmt.Print(string(stdin))
return nil
}
@@ -136,14 +144,19 @@ func TriggerDockerArgsProcessBuild(appName string, builderType string) error {
limits[flagName] = value
}
var args strings.Builder
for key, value := range limits {
if value == "" {
continue
}
value = addMemorySuffixForDocker(key, value)
fmt.Printf(" --%s=%s ", key, value)
value, err := formatResourceValueForDocker(key, value)
if err != nil {
return fmt.Errorf("Unable to apply build resource limits for %s: %w", appName, err)
}
fmt.Fprintf(&args, " --%s=%s ", key, value)
}
fmt.Print(args.String())
fmt.Print(string(stdin))
return nil
}
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/scheduler-docker-local
go 1.26.2
go 1.27.1
require (
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
+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 {
+41
View File
@@ -487,6 +487,47 @@ func TestDomainSlug(t *testing.T) {
}
}
func TestParseMemoryQuantity(t *testing.T) {
cases := []struct {
name string
input string
want string
wantErr bool
}{
{name: "unitless value defaults to megabytes", input: "512", want: "512Mi"},
{name: "lowercase megabytes are not millibytes", input: "256m", want: "256Mi"},
{name: "uppercase gigabytes are binary", input: "1G", want: "1Gi"},
{name: "lowercase gigabytes", input: "1g", want: "1Gi"},
{name: "kubernetes binary unit", input: "1Gi", want: "1Gi"},
{name: "two letter unit", input: "512MB", want: "512Mi"},
{name: "decimal value", input: "1.5g", want: "1536Mi"},
{name: "bytes", input: "100b", want: "100"},
{name: "zero", input: "0Mi", want: "0"},
{name: "invalid unit", input: "1x", wantErr: true},
{name: "kubernetes exponent", input: "1e9", wantErr: true},
}
for _, tc := range cases {
tc := tc
t.Run(tc.name, func(t *testing.T) {
t.Parallel()
got, err := parseMemoryQuantity(tc.input)
if tc.wantErr {
if err == nil {
t.Fatalf("parseMemoryQuantity(%q) = %q, want error", tc.input, got)
}
return
}
if err != nil {
t.Fatalf("parseMemoryQuantity(%q) unexpected error: %v", tc.input, err)
}
if got != tc.want {
t.Errorf("parseMemoryQuantity(%q) = %q, want %q", tc.input, got, tc.want)
}
})
}
}
func TestDomainSlugDistinguishesWildcardFromApex(t *testing.T) {
// A kubernetes wildcard host matches exactly one label, so *.example.com does not
// cover example.com and both are commonly added to the same app. The generated
+8 -8
View File
@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/scheduler-k3s
go 1.26.2
go 1.27.1
require (
github.com/Masterminds/semver/v3 v3.5.0
@@ -16,7 +16,7 @@ require (
github.com/dokku/dokku/plugins/registry v0.0.0-00010101000000-000000000000
github.com/dokku/dokku/plugins/storage v0.0.0-00010101000000-000000000000
github.com/fatih/color v1.19.0
github.com/fluxcd/pkg/kustomize v1.41.0
github.com/fluxcd/pkg/kustomize v1.43.0
github.com/go-openapi/jsonpointer v1.0.2
github.com/go-resty/resty/v2 v2.17.2
github.com/gosimple/slug v1.15.0
@@ -26,11 +26,11 @@ require (
github.com/onsi/gomega v1.44.0
github.com/ryanuber/columnize v2.1.2+incompatible
github.com/spf13/pflag v1.0.10
github.com/traefik/traefik/v2 v2.11.58
github.com/traefik/traefik/v2 v2.11.59
golang.org/x/sync v0.24.0
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1
helm.sh/helm/v3 v3.22.0
helm.sh/helm/v3 v3.22.1
k8s.io/api v0.37.1
k8s.io/apimachinery v0.37.1
k8s.io/client-go v0.37.1
@@ -153,7 +153,7 @@ require (
go.yaml.in/yaml/v3 v3.0.5 // indirect
golang.org/x/crypto v0.58.0 // indirect
golang.org/x/mod v0.41.0 // indirect
golang.org/x/net v0.60.0 // indirect
golang.org/x/net v0.61.0 // indirect
golang.org/x/oauth2 v0.37.0 // indirect
golang.org/x/sys v0.49.0 // indirect
golang.org/x/term v0.47.0 // indirect
@@ -164,15 +164,15 @@ require (
google.golang.org/protobuf v1.36.12 // indirect
gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
k8s.io/apiextensions-apiserver v0.37.0 // indirect
k8s.io/apiserver v0.37.0 // indirect
k8s.io/apiextensions-apiserver v0.37.1 // indirect
k8s.io/apiserver v0.37.1 // indirect
k8s.io/cli-runtime v0.37.1 // indirect
k8s.io/component-base v0.37.1 // indirect
k8s.io/klog/v2 v2.140.0 // indirect
k8s.io/kube-openapi v0.0.0-20260821135717-be32def86098 // indirect
k8s.io/streaming v0.37.1 // indirect
oras.land/oras-go/v2 v2.6.2 // indirect
sigs.k8s.io/controller-runtime v0.25.0 // indirect
sigs.k8s.io/controller-runtime v0.25.2 // indirect
sigs.k8s.io/gateway-api v1.6.0 // indirect
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
sigs.k8s.io/kustomize/kyaml v0.21.2 // indirect
+30 -32
View File
@@ -35,8 +35,6 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM=
github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ=
github.com/bshuster-repo/logrus-logstash-hook v1.1.0 h1:o2FzZifLg+z/DN1OFmzTWzZZx/roaqt8IPZCIVco8r4=
github.com/bshuster-repo/logrus-logstash-hook v1.1.0/go.mod h1:Q2aXOe7rNuPgbBtPCOzYyWDvKX7+FpxE5sRdvcPoui0=
github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM=
@@ -62,8 +60,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/distribution/distribution/v3 v3.1.1 h1:KUbk7C8CfaLXy8kbf/hGq9cad/wCoLB6dbWH6DMbmX0=
github.com/distribution/distribution/v3 v3.1.1/go.mod h1:d7lXwZpph0bVcOj4Aqn0nMrWHIwRQGdiV5TLeI+/w6Y=
github.com/distribution/distribution/v3 v3.1.2 h1:/Bv2YIqqSR00HiO49FT93hovy6r9IlrzwUDsJjCN5qg=
github.com/distribution/distribution/v3 v3.1.2/go.mod h1:Oz0Drs2Tx3iTXzK3DhUD4otfTfqlCxlWVC7QJeXWBP0=
github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk=
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
github.com/dlclark/regexp2 v1.11.0 h1:G/nrcoOa7ZXlpoa/91N3X7mM3r8eIlMBBJZvsz/mxKI=
@@ -72,8 +70,8 @@ github.com/docker/docker-credential-helpers v0.9.5 h1:EFNN8DHvaiK8zVqFA2DT6BjXE0
github.com/docker/docker-credential-helpers v0.9.5/go.mod h1:v1S+hepowrQXITkEfw6o4+BMbGot02wiKpzWhGUZK6c=
github.com/docker/go-events v0.0.0-20250808211157-605354379745 h1:yOn6Ze6IbYI/KAw2lw/83ELYvZh6hvsygTVkD0dzMC4=
github.com/docker/go-events v0.0.0-20250808211157-605354379745/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA=
github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQV8=
github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw=
github.com/docker/go-metrics v0.1.0 h1:r76KPNpstz+IvQKSWpYegSkkyzex0V3A1ZGVx6bhGlY=
github.com/docker/go-metrics v0.1.0/go.mod h1:PciI3sONtB051kXALN1JoIlpcu54E1FuPh+4DuqEzyw=
github.com/dustin/go-jsonpointer v0.0.0-20160814072949-ba0abeacc3dc h1:tP7tkU+vIsEOKiK+l/NSLN4uUtkyuxc6hgYpQeCWAeI=
github.com/dustin/go-jsonpointer v0.0.0-20160814072949-ba0abeacc3dc/go.mod h1:ORH5Qp2bskd9NzSfKqAF7tKfONsEkCarTE5ESr/RVBw=
github.com/dustin/gojson v0.0.0-20160307161227-2e71ec9dd5ad h1:Qk76DOWdOp+GlyDKBAG3Klr9cn7N+LcYc82AZ2S7+cA=
@@ -94,8 +92,8 @@ github.com/fatih/color v1.19.0 h1:Zp3PiM21/9Ld6FzSKyL5c/BULoe/ONr9KlbYVOfG8+w=
github.com/fatih/color v1.19.0/go.mod h1:zNk67I0ZUT1bEGsSGyCZYZNrHuTkJJB+r6Q9VuMi0LE=
github.com/felixge/httpsnoop v1.1.0 h1:3YtUj32ZZkqZtt3sZZsClsymw/QDuVfpNhoA31zeORc=
github.com/felixge/httpsnoop v1.1.0/go.mod h1:Zqxgdd+1Rkcz8euOqdr7lqgCRJztwr5hp9vDSi5UZCE=
github.com/fluxcd/pkg/kustomize v1.41.0 h1:ShntVMiX8ZvvQCM3MNIaxZbYT4T4ehV2wIWC73rzBrg=
github.com/fluxcd/pkg/kustomize v1.41.0/go.mod h1:fjTYKu3tdKid84b4nEeSc+9DVmRgtxcx8UtyhS0yzOw=
github.com/fluxcd/pkg/kustomize v1.43.0 h1:WNa1+KaoNvR1GNafPP6lCj+PZssOWycYIJBE/3h+yxI=
github.com/fluxcd/pkg/kustomize v1.43.0/go.mod h1:V/hHWuJyD0aqwA9tZJC6jPQHUuOJYTn0kaY3V8FGkiQ=
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 h1:BHsljHzVlRcyQhjrss6TZTdY2VfCqZPbv5k3iBFa2ZQ=
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
github.com/foxcpp/go-mockdns v1.2.0 h1:omK3OrHRD1IWJz1FuFBCFquhXslXoF17OvBS6JPzZF0=
@@ -359,8 +357,8 @@ github.com/tailscale/hujson v0.0.0-20250605163823-992244df8c5a h1:a6TNDN9CgG+cYj
github.com/tailscale/hujson v0.0.0-20250605163823-992244df8c5a/go.mod h1:EbW0wDK/qEUYI0A5bqq0C2kF8JTQwWONmGDBbzsxxHo=
github.com/traefik/paerser v0.2.2 h1:cpzW/ZrQrBh3mdwD/jnp6aXASiUFKOVr6ldP+keJTcQ=
github.com/traefik/paerser v0.2.2/go.mod h1:7BBDd4FANoVgaTZG+yh26jI6CA2nds7D/4VTEdIsh24=
github.com/traefik/traefik/v2 v2.11.58 h1:dz6rq+1kp43XHjz3Nal0uJenfxuvKpCP2dYPO8GbVnE=
github.com/traefik/traefik/v2 v2.11.58/go.mod h1:Q9mczqrf6K8G9BGkEHvX13+8mXWi1jvrMYyNrFIi5Ro=
github.com/traefik/traefik/v2 v2.11.59 h1:vUyoFQM7a7rYRSDSfwAvvQMvoOrRg1DK7UR+ebnHz3U=
github.com/traefik/traefik/v2 v2.11.59/go.mod h1:tnle1HBnPg47Bw2q9NDegW2P61ULztKQBw9AR/NMDMc=
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
github.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ=
@@ -375,10 +373,10 @@ go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.71.0 h1:3g7B90U
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.71.0/go.mod h1:Ef8SuTh59BT7+ofpDxN9z+yOlc4t2GjLmKDgYNJL/NU=
go.opentelemetry.io/otel v1.46.0 h1:FHt5/CDyVxi/8IM1CH7VE/rRgq3kLHa2mSTVMO8AWyc=
go.opentelemetry.io/otel v1.46.0/go.mod h1:Gj3SEScelsNC45tp4nSxRYlS+f5iez7W8XPMCt905kE=
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.19.0 h1:Dn8rkudDzY6KV9dr/D/bTUuWgqDf9xe0rr4G2elrn0Y=
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.19.0/go.mod h1:gMk9F0xDgyN9M/3Ed5Y1wKcx/9mlU91NXY2SNq7RQuU=
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.19.0 h1:HIBTQ3VO5aupLKjC90JgMqpezVXwFuq6Ryjn0/izoag=
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.19.0/go.mod h1:ji9vId85hMxqfvICA0Jt8JqEdrXaAkcpkI9HPXya0ro=
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.21.0 h1:WseeVYf5dJZTsyPiyW5L14k5qsSibqXAMTSiFEDiWr0=
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.21.0/go.mod h1:SiLZnQS6Qk2eCpvr2CH/XMAOa64TWGXxEZJZCpD2Lmc=
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.21.0 h1:fvNHGyo3CdRv/DQveXqhqBxnKTDyRaC5sMSQxilX/A0=
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.21.0/go.mod h1:zyGrjRKL2B/6+Jc/m4/otPoZqV2MY9ZjC/aBraRO7zc=
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.46.0 h1:qkDYCAFiZXLcs1L4aY+tP2wguQ4kURANqHOQMA2et2s=
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.46.0/go.mod h1:tkipS4DRzmpAmvg+Gw4++O1IdDq6TVDnvnYU6cmbQVs=
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.46.0 h1:AP23h/mFgb/lc7tdck1Kfn9qxsM8TAeNPCU5C3pzaps=
@@ -387,24 +385,24 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.46.0 h1:OFnwLJr+pF3iHrlGSzb
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.46.0/go.mod h1:716wFneO0ov19A2beH5hjfh9AK5z/VWNAtDijp1Y0/g=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.46.0 h1:w53CDeOA/Kurp7yRsegSr6pbbr759dOvJ+yNmWM6Hxs=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.46.0/go.mod h1:BOmGMCbAtvcJiSJ+hLuhgPLdDbimnraSl8irz3iY8sY=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.43.0 h1:3iZJKlCZufyRzPzlQhUIWVmfltrXuGyfjREgGP3UUjc=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.43.0/go.mod h1:/G+nUPfhq2e+qiXMGxMwumDrP5jtzU+mWN7/sjT2rak=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.45.0 h1:QBajQ2SrwQijzHyZbQlPsuIzpl/ll8DY6wPWsajeGcI=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.45.0/go.mod h1:08ZQLjrPLQ6R4kAXvuOvODEer5Yh4CoFvll5qB2BCI8=
go.opentelemetry.io/otel/exporters/prometheus v0.65.0 h1:jOveH/b4lU9HT7y+Gfamf18BqlOuz2PWEvs8yM7Q6XE=
go.opentelemetry.io/otel/exporters/prometheus v0.65.0/go.mod h1:i1P8pcumauPtUI4YNopea1dhzEMuEqWP1xoUZDylLHo=
go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.19.0 h1:GJkybS+crDMdExT/BUNCEgfrmfboztcS6PhvSo88HKM=
go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.19.0/go.mod h1:NuAyxRYIG2lKX3YQkB+83StTxM7s52PUUkRRiC0wnYI=
go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.21.0 h1:2lpf4hnrasYIsUyEXwnTZq5lsxrMm4T2Bwb06IctAZQ=
go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.21.0/go.mod h1:YWOW6h7jwApz9Pl76ie/izUsSPj0s2MdIlpqbPqaf3U=
go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.43.0 h1:TC+BewnDpeiAmcscXbGMfxkO+mwYUwE/VySwvw88PfA=
go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.43.0/go.mod h1:J/ZyF4vfPwsSr9xJSPyQ4LqtcTPULFR64KwTikGLe+A=
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.43.0 h1:mS47AX77OtFfKG4vtp+84kuGSFZHTyxtXIN269vChY0=
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.43.0/go.mod h1:PJnsC41lAGncJlPUniSwM81gc80GkgWJWr3cu2nKEtU=
go.opentelemetry.io/otel/log v0.19.0 h1:KUZs/GOsw79TBBMfDWsXS+KZ4g2Ckzksd1ymzsIEbo4=
go.opentelemetry.io/otel/log v0.19.0/go.mod h1:5DQYeGmxVIr4n0/BcJvF4upsraHjg6vudJJpnkL6Ipk=
go.opentelemetry.io/otel/log v0.21.0 h1:SLsVDGmtyBrdw8/a2Z0bOIxou/+bN4z56GebH7T0LvA=
go.opentelemetry.io/otel/log v0.21.0/go.mod h1:iReetQrZL9Wyg84cCkOoCmqDHS5RCFfyxC7J+r8fn8g=
go.opentelemetry.io/otel/metric v1.46.0 h1:yBnkXvgV7AXFILZc5K6IZe/CBFF3OS7BJ8ov6/lj0K8=
go.opentelemetry.io/otel/metric v1.46.0/go.mod h1:iPmdWqifKUdzziPkvvzIJXITl56fQx2mGM/DHLB3/2o=
go.opentelemetry.io/otel/sdk v1.46.0 h1:h5CNQQjEbuQXY/JfZtgt3i7HVFV3aHPO2OAwO2eTYPI=
go.opentelemetry.io/otel/sdk v1.46.0/go.mod h1:GAERFXFt5SYCEB+YiKUbMBeza6UaDH7GmGOZEfh2gSM=
go.opentelemetry.io/otel/sdk/log v0.19.0 h1:scYVLqT22D2gqXItnWiocLUKGH9yvkkeql5dBDiXyko=
go.opentelemetry.io/otel/sdk/log v0.19.0/go.mod h1:vFBowwXGLlW9AvpuF7bMgnNI95LiW10szrOdvzBHlAg=
go.opentelemetry.io/otel/sdk/log v0.21.0 h1:QsE7XSR0ktQdKmRKGnR+f1ObGF32WG+7MER/P9KgmYc=
go.opentelemetry.io/otel/sdk/log v0.21.0/go.mod h1:m9mApjCoD2/1QuKCAptjv+BrG9WKOvQLVdNx+iBldTo=
go.opentelemetry.io/otel/sdk/metric v1.46.0 h1:0piZ26EG4RBfebb2jhDH6ERCYHoVWduc3kLgPCwSnSE=
go.opentelemetry.io/otel/sdk/metric v1.46.0/go.mod h1:I1PbKrdVc8Qu8HYVDNtqVIwLwjNrhsV/uFuxfwg8mO4=
go.opentelemetry.io/otel/trace v1.46.0 h1:OULy7ccdJnZtJ0UDYFOIGaCmiWzJ8Vi2G/Rsu60qs1c=
@@ -428,8 +426,8 @@ golang.org/x/crypto v0.58.0 h1:COkYLr4k7nDI4r6QtMML2AfzeIswWHAJthLS6K/M/54=
golang.org/x/crypto v0.58.0/go.mod h1:Xh+kl5A+M0gMiWDytH2Hhr5Z7WbNCpv/eB/EFgfSk+w=
golang.org/x/mod v0.41.0 h1:qJmnOUb4YB+FsEuM3HcWucdZASCPGhsX6uljO6pog0c=
golang.org/x/mod v0.41.0/go.mod h1:Ek9pY8RKWXwsWvd3rQiHYtMqkjSUV+s1Rj7j4H5Ur6o=
golang.org/x/net v0.60.0 h1:79p50tfZlm0J9YfoDsSi639qSXNGVwEzOPLCxM2FsYU=
golang.org/x/net v0.60.0/go.mod h1:2DA/G1UfVbCpQPeWTmMPGY7Cs2PkBkwu743bVX5PIVg=
golang.org/x/net v0.61.0 h1:RR+6j/BTBCrggOLugxa+66R8FvoN6MHlzDlZIbN9YFw=
golang.org/x/net v0.61.0/go.mod h1:WgDCOTH8iwtB66T4/GfI94AHo/hhdb7Hah9NDseQfiI=
golang.org/x/oauth2 v0.37.0 h1:JUlcxA8oAtauLfiH8FX2/FkAWHAdi0QtGCGc+hofE98=
golang.org/x/oauth2 v0.37.0/go.mod h1:IxwZNxUULJmpBFf9K/9NTMSIfZZuvuTy1gGxhigP/58=
golang.org/x/sync v0.24.0 h1:iqiDrGoDgyuvAKrhLQthUEzU/R378N78gXbBjxed7oA=
@@ -468,16 +466,16 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
helm.sh/helm/v3 v3.22.0 h1:n1if5iQgHYsujPAcO5oonH/KiSNUmqmUF0iGVjSF3AU=
helm.sh/helm/v3 v3.22.0/go.mod h1:EVl/147Ai2z13JOykbO1Jn9HRaXyU7uHlbAJmODq/Fg=
helm.sh/helm/v3 v3.22.1 h1:uo2SouzAxMkKZTNzZ1lLP/c/Bu7xfUJKYDaYMxMHvk8=
helm.sh/helm/v3 v3.22.1/go.mod h1:FNQoawxnIIReGrTytJc55tKakylfpaC3pGf64BGo1rI=
k8s.io/api v0.37.1 h1:l6N77U7tjwB5L056bgrBTJIEdevac/naBZ3iSvDNfpM=
k8s.io/api v0.37.1/go.mod h1:zSlbB1YpJ1YQlFVQy20UYll81UJSJJUMLhkhvg6Z78M=
k8s.io/apiextensions-apiserver v0.37.0 h1:zRMQ3+/LIE5oZ0tVvXwYHC+dIkSP5cjNWju7AZU1LOI=
k8s.io/apiextensions-apiserver v0.37.0/go.mod h1:HU0PfSBwchHL5iDau6jjt9zU6ryWkDDlaVUiq91NK80=
k8s.io/apiextensions-apiserver v0.37.1 h1:7fIQG8eThDSTVYBWg/DOpI8v5wYfKCo0N8/TDMjj+zY=
k8s.io/apiextensions-apiserver v0.37.1/go.mod h1:1Q3ujWwHgnhBoGsdmGORflwK1sDFmuaqH1OsMDWk2Gs=
k8s.io/apimachinery v0.37.1 h1:hGCYyvKHCwtwMitj2vU4vYx0Z16N9GyZk9BBnz0wDAE=
k8s.io/apimachinery v0.37.1/go.mod h1:jF84AyUi/IRIXRot5f+lm6MpxoWI+F1XgjaMmwCdTFw=
k8s.io/apiserver v0.37.0 h1:TXg7OxsOWrAH8J4Zi/gBAZuMw1Dfdd+6cca2h4qjRqo=
k8s.io/apiserver v0.37.0/go.mod h1:OddHDF4gy9qyIb8o/3+qaeP6S0vEObWLgOygVqXksv0=
k8s.io/apiserver v0.37.1 h1:dUsNwjsvItyVKNpC1N0AhQ0OBSiUJKfWz004vPifOe0=
k8s.io/apiserver v0.37.1/go.mod h1:EWXW6PntGfOC2uD9GGVobnOExgFoX1z0hZo7f7Rs7Ng=
k8s.io/cli-runtime v0.37.1 h1:3mir5bM4XjMJHW3SMRk++3Ylf4YQne0XFFsW+IGT85U=
k8s.io/cli-runtime v0.37.1/go.mod h1:g3VQOm71f//aNbp79g0az9jBRTrvPjAHz7WxVysbZ4M=
k8s.io/client-go v0.37.1 h1:QTv/5ha4jAHtW9qxxVBkQVFBRDb4jHfFopQqqMdc+wM=
@@ -500,8 +498,8 @@ mvdan.cc/sh/v3 v3.14.1 h1:bXkhQWNHCs0KZEChF8hYS6FC+T2N9mUZLbQv9blditI=
mvdan.cc/sh/v3 v3.14.1/go.mod h1:syYCoFET8w9tvevxiXUtY8/ICrU+l26jHmhJDra3Vwo=
oras.land/oras-go/v2 v2.6.2 h1:N04RXngAp1LJKTG6ifz3xHPipasEkWr+hFmInja5YKo=
oras.land/oras-go/v2 v2.6.2/go.mod h1:PlTtg4JTDJkDe8yVHpM2wz7/YDc00GVas+i4jAW2TZ4=
sigs.k8s.io/controller-runtime v0.25.0 h1:44KgRUPew331KSJpNu8zJow3iTR5W0p/SfrHdw3lV40=
sigs.k8s.io/controller-runtime v0.25.0/go.mod h1:4QqLdT6z/L6Olj8JJCtvztid4/fnIiYsfaTFScegctc=
sigs.k8s.io/controller-runtime v0.25.2 h1:bEkK3PVOIVK9X8QWLGVhJgmFc++47vfT6wakSzAOLsQ=
sigs.k8s.io/controller-runtime v0.25.2/go.mod h1:4QqLdT6z/L6Olj8JJCtvztid4/fnIiYsfaTFScegctc=
sigs.k8s.io/gateway-api v1.6.0 h1:735YBRj5NXFrOGX0GoSjwzUIzbz8kiEOfADsqHFmHgE=
sigs.k8s.io/gateway-api v1.6.0/go.mod h1:FVfx3t389ybeXOqvDghLbdvJdSCfI/PReqCUI3lu3mY=
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg=
+5 -5
View File
@@ -41,11 +41,11 @@ func TestGetLowestNodeVersion(t *testing.T) {
}
cases := []struct {
name string
nodes []*corev1.Node
selector string
want string
wantErr string
name string
nodes []*corev1.Node
selector string
want string
wantErr string
}{
{
name: "single control-plane node returns its kubelet version",
+3 -3
View File
@@ -88,7 +88,7 @@ func TestMigrateChartPropertiesToMapFormatPreservesExistingNonOverlappingKeys(t
setupChartMigrationTest(t)
Expect(common.PropertyMapWrite("scheduler-k3s", "--global", "chart-overrides.cert-manager", map[string]string{
"installCRDs": "true",
"installCRDs": "true",
"service.annotations.prometheus.io/scrape": "true",
})).To(Succeed())
Expect(common.PropertyWrite("scheduler-k3s", "--global", "chart.cert-manager.installCRDs", "false")).To(Succeed())
@@ -99,9 +99,9 @@ func TestMigrateChartPropertiesToMapFormatPreservesExistingNonOverlappingKeys(t
got, err := common.PropertyMapGet("scheduler-k3s", "--global", "chart-overrides.cert-manager")
Expect(err).NotTo(HaveOccurred())
Expect(got).To(Equal(map[string]string{
"installCRDs": "false",
"installCRDs": "false",
"service.annotations.prometheus.io/scrape": "true",
"version": "1.13.3",
"version": "1.13.3",
}))
}
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/scheduler
go 1.26.2
go 1.27.1
require (
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/storage
go 1.26.2
go 1.27.1
require (
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
+1 -1
View File
@@ -1 +1 @@
FROM traefik:v3.7.14
FROM traefik:v3.7.15
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/dokku/dokku/plugins/traefik-vhosts
go 1.26.2
go 1.27.1
require (
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000