argoproj/argo-workflows · error
ConfigMap '%s' needs to have the label %s: %s to load parame
Error message
ConfigMap '%s' needs to have the label %s: %s to load parameters
What it means
GetConfigMapValue loads a value from a ConfigMap used as an Argo parameter source. The controller requires such ConfigMaps to carry the label `workflows.argoproj.io/configmap-type: Parameter` so it only ever treats explicitly-marked ConfigMaps as parameter stores. If the ConfigMap exists but lacks (or mismatches) that label, this error is returned instead of reading its data.
Source
Thrown at workflow/common/configmap.go:27
)
type ConfigMapStore interface {
GetByKey(key string) (any, bool, error)
}
// GetConfigMapValue retrieves a configmap value
func GetConfigMapValue(configMapStore ConfigMapStore, namespace, name, key string) (string, error) {
obj, exists, err := configMapStore.GetByKey(namespace + "/" + name)
if err != nil {
return "", err
}
if exists {
cm, ok := obj.(*apiv1.ConfigMap)
if !ok {
return "", fmt.Errorf("unable to convert object %s to configmap when syncing ConfigMaps", name)
}
if cmType := cm.Labels[LabelKeyConfigMapType]; cmType != LabelValueTypeConfigMapParameter {
return "", fmt.Errorf(
"ConfigMap '%s' needs to have the label %s: %s to load parameters",
name, LabelKeyConfigMapType, LabelValueTypeConfigMapParameter)
}
cmValue, ok := cm.Data[key]
if !ok {
return "", errors.Errorf(errors.CodeNotFound, "ConfigMap '%s' does not have the key '%s'", name, key)
}
return cmValue, nil
}
return "", errors.Errorf(errors.CodeNotFound, "ConfigMap '%s' does not exist. Please make sure it has the label %s: %s to be detectable by the controller",
name, LabelKeyConfigMapType, LabelValueTypeConfigMapParameter)
}
View on GitHub (pinned to 35bff19146)
Solutions
- Add the label to the ConfigMap: `kubectl label configmap <name> workflows.argoproj.io/configmap-type=Parameter -n <namespace>`
- If the ConfigMap is managed by Helm/Kustomize, add the label to the manifest under metadata.labels so it persists across upgrades
- Verify the label key/value match exactly: `workflows.argoproj.io/configmap-type: Parameter` (capital P, no plural)
- Confirm the controller is reading the ConfigMap from the workflow's namespace
Example fix
# before
apiVersion: v1
kind: ConfigMap
metadata:
name: my-params
data:
key: value
# after
apiVersion: v1
kind: ConfigMap
metadata:
name: my-params
labels:
workflows.argoproj.io/configmap-type: Parameter
data:
key: value Defensive patterns
Strategy: validation
Validate before calling
cm, err := clientset.CoreV1().ConfigMaps(ns).Get(ctx, name, metav1.GetOptions{})
if err != nil { return err }
if cm.Labels["workflows.argoproj.io/configmap-type"] != "Parameter" {
return fmt.Errorf("configmap %s must be labeled workflows.argoproj.io/configmap-type=Parameter", name)
} Prevention
- Always label parameter ConfigMaps with workflows.argoproj.io/configmap-type: Parameter in manifests/Helm charts
- Run `argo lint` and a pre-submit script that verifies ConfigMap labels
- Encode the label in a Kustomize commonLabels or Helm template helper
When it happens
Trigger: Calling GetConfigMapValue (directly or via substituteAndGetConfigMapValue / setGlobalParameters, e.g. workflow-level global parameters from `spec.arguments` referencing a configMapKeyRef, or cron workflow `globalParameters`) against a ConfigMap whose `metadata.labels` omit `workflows.argoproj.io/configmap-type: Parameter`.
Common situations: Ops teams create the ConfigMap with kubectl but forget the required label; a Helm chart generates the ConfigMap without extraLabels; the label is typo'd (wrong key or value like `Parameters` vs `Parameter`); upgrading Argo where the label requirement was added to an existing ConfigMap.
Related errors
- failed to unmarshal container args: %w
- memoization configmap doesn't have %s label, refusing to use
- CodeBadRequest
- unable to parse node field selector '%s': %w
- failed to read container args file %s: %w
AI-assisted analysis of argoproj/argo-workflows@35bff19146 (2026-09-03).
Data as JSON: /api/errors/6f585c28d1efe626.
Report an issue: GitHub.