quarkusio/quarkus · error · IllegalArgumentException
At least one enabled entry must be active
Error message
At least one enabled entry must be active
What it means
EnabledKubernetesDeploymentTargetsBuildItem is the build item carrying the list of enabled Kubernetes deployment targets (e.g. kubernetes, openshift, knative). Its constructor enforces that at least one entry is active; an empty list means nothing would be generated, so it throws IllegalArgumentException at build time.
Source
Thrown at extensions/kubernetes/vanilla/deployment/src/main/java/io/quarkus/kubernetes/deployment/EnabledKubernetesDeploymentTargetsBuildItem.java:13
package io.quarkus.kubernetes.deployment;
import java.util.List;
import io.quarkus.builder.item.SimpleBuildItem;
public final class EnabledKubernetesDeploymentTargetsBuildItem extends SimpleBuildItem {
private final List<DeploymentTargetEntry> entriesSortedByPriority;
public EnabledKubernetesDeploymentTargetsBuildItem(List<DeploymentTargetEntry> entriesSortedByPriority) {
if (entriesSortedByPriority.isEmpty()) {
throw new IllegalArgumentException("At least one enabled entry must be active");
}
this.entriesSortedByPriority = entriesSortedByPriority;
}
public List<DeploymentTargetEntry> getEntriesSortedByPriority() {
return entriesSortedByPriority;
}
}
View on GitHub (pinned to e1c734241f)
Solutions
- Enable at least one deployment target, e.g. quarkus.kubernetes.deploy=true
- Check that a container-image extension is present and its deploy flags are not all disabled
- If writing a custom processor, guard the produce() call and skip producing the build item when no target is enabled
Example fix
// before quarkus.kubernetes.deploy=false // after quarkus.kubernetes.deploy=true
Defensive patterns
Strategy: validation
Validate before calling
boolean anyEnabled = Stream.of("kubernetes","openshift","knative")
.anyMatch(t -> config.getValue("quarkus." + t + ".deploy", Boolean.class, false));
if (!anyEnabled) throw new IllegalStateException("Enable at least one deployment target"); Prevention
- Keep quarkus.kubernetes.deploy=true in profiles that deploy
- Never disable every deployment target when a deployer step runs
- In custom processors, only produce the build item when entries are non-empty
When it happens
Trigger: A build step produces EnabledKubernetesDeploymentTargetsBuildItem with an empty list — i.e. all quarkus.<target>.deploy flags are false and no deployment target is enabled.
Common situations: User disables every deployment target (e.g. quarkus.kubernetes.deploy=false and similar for openshift/knative) while other steps still require the build item; custom extensions filtering out all entries.
Related errors
- Merging of KubernetesDeploymentTargetBuildItem having differ
- '%s' env var can't simultaneously take its value from '%s' c
- '%s' env var can't simultaneously have a '%s' value & take i
- When generating a CronJob resource, you need to specify a sc
- No role has been set in the RoleBinding resource!
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/045bbe5c384d44c1.
Report an issue: GitHub.