Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion scripts/refresh-flux-ghcr-auth.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1716,7 +1716,11 @@ probe_node_runtime_pull() {
imagePullPolicy: "Always",
args: ["--version"],
resources: {
requests: {cpu: "10m", memory: "16Mi"},
# The Pod names its node, so the kubelet alone admits it, and it refuses a Pod
# that asks for more memory than the node has left to request (#4664: a
# worker with 15 Mi left refused 16 Mi and stopped the deploy). The probe
# only prints a version, so it asks for the least the node can grant.
requests: {cpu: "1m", memory: "1Mi"},
limits: {cpu: "100m", memory: "64Mi"}
},
securityContext: {
Expand Down
8 changes: 8 additions & 0 deletions scripts/tests/refresh-flux-ghcr-auth/fake_kubectl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3007,6 +3007,14 @@ func fakeKubectlCreateRuntimeProbe(namespace, manifestFile string) int {
container["imagePullPolicy"] != "Always" || securityContext["allowPrivilegeEscalation"] != false {
return commandFailure(91, "runtime probe does not prove a private package pull")
}
// The probe names its node, so the kubelet alone admits it, and refuses it when the node has
// less memory left to request than the probe asks for (#4664). The smallest request the
// namespace accepts keeps that refusal to a node with nothing left at all.
resources, _ := container["resources"].(map[string]any)
requests, _ := resources["requests"].(map[string]any)
if requests["memory"] != "1Mi" || requests["cpu"] != "1m" {
return commandFailure(91, "runtime probe asks its node for more than the minimum request")
}
probeName, _ := metadata["name"].(string)
probeNode, _ := spec["nodeName"].(string)
if probeName == "" || probeNode == "" {
Expand Down
Loading