Package io.quarkus.kubernetes.spi
Class KubernetesJobBuildItem
- java.lang.Object
-
- io.quarkus.builder.item.BuildItem
-
- io.quarkus.builder.item.MultiBuildItem
-
- io.quarkus.kubernetes.spi.KubernetesJobBuildItem
-
public final class KubernetesJobBuildItem extends io.quarkus.builder.item.MultiBuildItemA Built item for generating init containers. The generated container will have the specified fields and may optionally inherit env vars and volumes from the app container. Env vars specified through this build item, will take precedence over inherited ones.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static KubernetesJobBuildItemcreate(String image)List<String>getArguments()List<String>getCommand()Map<String,String>getEnvVars()StringgetImage()StringgetName()StringgetTarget()booleanisSharedEnvironment()Flag for tasks that require access to the environment variables of the application.booleanisSharedFilesystem()Flag for tasks that need to share filesystem with the application.KubernetesJobBuildItemwithArguments(List<String> arguments)KubernetesJobBuildItemwithCommand(List<String> command)KubernetesJobBuildItemwithEnvVars(Map<String,String> envVars)KubernetesJobBuildItemwithImage(String image)KubernetesJobBuildItemwithName(String name)KubernetesJobBuildItemwithSharedEnvironment(boolean sharedEnvironment)KubernetesJobBuildItemwithSharedFilesystem(boolean sharedFilesystem)KubernetesJobBuildItemwithTarget(String target)
-
-
-
Method Detail
-
create
public static KubernetesJobBuildItem create(String image)
-
getName
public String getName()
-
withName
public KubernetesJobBuildItem withName(String name)
-
getTarget
public String getTarget()
-
withTarget
public KubernetesJobBuildItem withTarget(String target)
-
getImage
public String getImage()
-
withImage
public KubernetesJobBuildItem withImage(String image)
-
withCommand
public KubernetesJobBuildItem withCommand(List<String> command)
-
withArguments
public KubernetesJobBuildItem withArguments(List<String> arguments)
-
withEnvVars
public KubernetesJobBuildItem withEnvVars(Map<String,String> envVars)
-
isSharedEnvironment
public boolean isSharedEnvironment()
Flag for tasks that require access to the environment variables of the application. Often tasks need to access resources, configured via environment variables. This flag expresses that the task should be executed using the same envrironment variables as the application.- Returns:
- true when the task is meant to share environment variables with the application.
-
withSharedEnvironment
public KubernetesJobBuildItem withSharedEnvironment(boolean sharedEnvironment)
-
isSharedFilesystem
public boolean isSharedFilesystem()
Flag for tasks that need to share filesystem with the application. Often tasks need to access resources, configured via filesystem (e.g. local config files, kubernetes service binding etc). In other cases, tasks may need to produce files needed by the application. This flag expresses that the task should share filesystem with the application.- Returns:
- true when the task is meant to share filesystem.
-
withSharedFilesystem
public KubernetesJobBuildItem withSharedFilesystem(boolean sharedFilesystem)
-
-