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

  1. Enable at least one deployment target, e.g. quarkus.kubernetes.deploy=true
  2. Check that a container-image extension is present and its deploy flags are not all disabled
  3. 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

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


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/045bbe5c384d44c1. Report an issue: GitHub.