You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3c9cd6c
Browse filesBrowse the repository at this point in the historyBrowse files
fix(api): fail a pool create when the platform values cannot be read
loadWorkerPoolDefaults treated every error reading the cozystack-values
Secret as a platform that sets nothing, so a failed read stored the pool
without the defaults and told nobody. The image source and the
installer are hashed into names the MachineDeployment points at, so
putting the defaults in later re-images the pool.
Skip quietly only when the Secret does not exist. Any other read error
returns ServiceUnavailable, which a caller can repeat once the
apiserver answers, and a Secret whose content cannot be parsed returns
an internal error; both stop the create before anything is stored.
Also document that a pool written straight as a HelmRelease, as the
ComputePlane module and the node group adoption migration do, never
passes through the API and is not filled in.
Assisted-by: LLM
Signed-off-by: Myasnikov Daniil <[email protected]>
klog.Warningf("Not applying worker pool defaults: Secret %s does not hold readable %s: %v", key, platformValuesKey, err)
111
-
returnworkerPoolDefaults{}, false
122
+
klog.Errorf("Secret %s does not hold readable %s: %v", key, platformValuesKey, err)
123
+
returnworkerPoolDefaults{}, false, apierrors.NewInternalError(fmt.Errorf("secret %s does not hold readable %s, so the platform worker pool defaults cannot be applied: %w", key, platformValuesKey, err))
0 commit comments