Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pkg/talos/talos_cluster_health_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ type talosClusterHealthDataSourceModelV0 struct {
ClientConfiguration clientConfiguration `tfsdk:"client_configuration"`
Timeouts timeouts.Value `tfsdk:"timeouts"`
SkipKubernetesChecks types.Bool `tfsdk:"skip_kubernetes_checks"`
SkipWorkerNodeChecks types.Bool `tfsdk:"skip_worker_node_checks"`
}

type clusterNodes struct {
Expand Down Expand Up @@ -224,6 +225,10 @@ func (d *talosClusterHealthDataSource) Read(ctx context.Context, req datasource.
}
defer clientProvider.Close() //nolint:errcheck

if state.SkipWorkerNodeChecks.ValueBool() {
workerNodes = []string{}
}

nodeInfos, err := newClusterNodes(controlPlaneNodes, workerNodes)
if err != nil {
resp.Diagnostics.AddError("failed to generate node infos", err.Error())
Expand Down