Class InboundLaunchStrategy
java.lang.Object
hudson.model.AbstractDescribableImpl<AgentLaunchStrategy>
io.jenkins.plugins.namespacecloud.launcher.AgentLaunchStrategy
io.jenkins.plugins.namespacecloud.launcher.InboundLaunchStrategy
- All Implemented Interfaces:
ExtensionPoint,Describable<AgentLaunchStrategy>
Runs the Jenkins inbound agent as a Namespace-managed container, which dials
out to the controller over WebSocket.
Namespace-managed containers (those declared at creation time) are treated as critical: if the agent process exits, the instance fails as a whole, which makes a dead agent visible rather than leaving an idle VM burning budget.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class io.jenkins.plugins.namespacecloud.launcher.AgentLaunchStrategy
AgentLaunchStrategy.AgentLaunchStrategyDescriptorNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidContributes to the instance request before it is sent — typically the container that will host the agent, plus any credentials it needs.createLauncher(NamespaceClient client, Compute.InstanceMetadata instance, LaunchContext ctx) Builds the Jenkins-side launcher.getImage()booleanbooleanbooleanWhether the Jenkins node must be registered before the instance is created.voidsetExposeDockerSocket(boolean exposeDockerSocket) voidvoidsetWebSocket(boolean webSocket) Methods inherited from class io.jenkins.plugins.namespacecloud.launcher.AgentLaunchStrategy
getDescriptor, requiresSshGrants
-
Field Details
-
DEFAULT_IMAGE
Default agent image. The JDK tag should track the controller's Java major version so remoting negotiates a matching protocol.- See Also:
-
-
Constructor Details
-
InboundLaunchStrategy
@DataBoundConstructor public InboundLaunchStrategy()
-
-
Method Details
-
getImage
-
setImage
-
isWebSocket
public boolean isWebSocket() -
setWebSocket
@DataBoundSetter public void setWebSocket(boolean webSocket) -
isExposeDockerSocket
public boolean isExposeDockerSocket() -
setExposeDockerSocket
@DataBoundSetter public void setExposeDockerSocket(boolean exposeDockerSocket) -
requiresNodeRegisteredFirst
public boolean requiresNodeRegisteredFirst()Description copied from class:AgentLaunchStrategyWhether the Jenkins node must be registered before the instance is created. True for inbound: the agent connects on its own and the controller rejects a connection from a node it does not know about yet.- Overrides:
requiresNodeRegisteredFirstin classAgentLaunchStrategy
-
configureInstance
public void configureInstance(@NonNull Compute.CreateInstanceRequest.Builder builder, @NonNull LaunchContext ctx) Description copied from class:AgentLaunchStrategyContributes to the instance request before it is sent — typically the container that will host the agent, plus any credentials it needs.- Specified by:
configureInstancein classAgentLaunchStrategy
-
createLauncher
@NonNull public ComputerLauncher createLauncher(@NonNull NamespaceClient client, @NonNull Compute.InstanceMetadata instance, @NonNull LaunchContext ctx) Description copied from class:AgentLaunchStrategyBuilds the Jenkins-side launcher. Called once the instance is RUNNING, so implementations may query the instance for connection details.- Specified by:
createLauncherin classAgentLaunchStrategy
-