{"record":{"id":"045bbe5c384d44c1","repo":"quarkusio/quarkus","slug":"at-least-one-enabled-entry-must-be-active","errorCode":null,"errorMessage":"At least one enabled entry must be active","messagePattern":"At least one enabled entry must be active","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"extensions/kubernetes/vanilla/deployment/src/main/java/io/quarkus/kubernetes/deployment/EnabledKubernetesDeploymentTargetsBuildItem.java","lineNumber":13,"sourceCode":"package io.quarkus.kubernetes.deployment;\n\nimport java.util.List;\n\nimport io.quarkus.builder.item.SimpleBuildItem;\n\npublic final class EnabledKubernetesDeploymentTargetsBuildItem extends SimpleBuildItem {\n\n    private final List<DeploymentTargetEntry> entriesSortedByPriority;\n\n    public EnabledKubernetesDeploymentTargetsBuildItem(List<DeploymentTargetEntry> entriesSortedByPriority) {\n        if (entriesSortedByPriority.isEmpty()) {\n            throw new IllegalArgumentException(\"At least one enabled entry must be active\");\n        }\n        this.entriesSortedByPriority = entriesSortedByPriority;\n    }\n\n    public List<DeploymentTargetEntry> getEntriesSortedByPriority() {\n        return entriesSortedByPriority;\n    }\n\n}\n","sourceCodeStart":1,"sourceCodeEnd":23,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/kubernetes/vanilla/deployment/src/main/java/io/quarkus/kubernetes/deployment/EnabledKubernetesDeploymentTargetsBuildItem.java#L1-L23","documentation":"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.","triggerScenarios":"A build step produces EnabledKubernetesDeploymentTargetsBuildItem with an empty list — i.e. all quarkus.<target>.deploy flags are false and no deployment target is enabled.","commonSituations":"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.","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"],"exampleFix":"// before\nquarkus.kubernetes.deploy=false\n// after\nquarkus.kubernetes.deploy=true","handlingStrategy":"validation","validationCode":"boolean anyEnabled = Stream.of(\"kubernetes\",\"openshift\",\"knative\")\n    .anyMatch(t -> config.getValue(\"quarkus.\" + t + \".deploy\", Boolean.class, false));\nif (!anyEnabled) throw new IllegalStateException(\"Enable at least one deployment target\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"tags":["kubernetes","build-item","config"],"backgroundTag":"no-deployment-target-enabled","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}