Skip to content

Split K8sHelper, add WorkerProvisioner protocol, and add LinuxWorker … - #2110

Open
jshi991 wants to merge 4 commits into
apple:mainfrom
jshi991:k8s-worker-provisioner
Open

Split K8sHelper, add WorkerProvisioner protocol, and add LinuxWorker …#2110
jshi991 wants to merge 4 commits into
apple:mainfrom
jshi991:k8s-worker-provisioner

Conversation

@jshi991

@jshi991 jshi991 commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

closes #2102

@jshi991
jshi991 force-pushed the k8s-worker-provisioner branch 3 times, most recently from 84bc66c to 549d886 Compare August 12, 2026 03:03
Comment thread Sources/ContainerK8s/Commands/K8sCreate.swift Outdated
Comment thread Sources/ContainerK8s/Support/K8sHelper+Bootstrap.swift Outdated
Comment thread Sources/Services/ContainerAPIService/Client/Utility.swift Outdated
let containsHelp = fullArgs.contains("-h") || fullArgs.contains("--help")
if fullArgs.count <= 2 && containsHelp {
let pluginLoader = try? await createPluginLoader()
let pluginLoader = try? await Utility.createPluginLoader(log: bootstrapLogger)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove all these changes; they've been merged already.

var defaultNodeImage: String? { get }

/// Start the machine identified by `name` before cluster initialisation.
func provision(name: String, log: Logger) async throws

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why change NodeProvisioner so that it can only generate a single node configuration?

/// Called by the executable target to supply the default control-plane provisioner.
/// The closure receives the parsed CLI values and returns a `NodeProvisioner`.
/// Set this before `K8sCommand.main()` runs.
nonisolated(unsafe) public static var makeDefaultProvisioner:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure we need a factory pattern here (see below comment) but if we go this way it might make more sense to create a dedicated prototype for it.

@jshi991
jshi991 force-pushed the k8s-worker-provisioner branch from 5ae84a9 to ac1e684 Compare August 13, 2026 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[k8s]: refactor K8sHelper into focused extensions and add K8sWorker protocol

2 participants