2019-12-23 20:52:04 +00:00
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
// Package provision provides abstract definitions for Talos cluster provisioners.
package provision
2019-12-27 20:49:24 +00:00
import (
"context"
2020-02-21 21:58:30 +03:00
"io"
2019-12-27 20:49:24 +00:00
2023-05-25 17:14:01 +04:00
"github.com/siderolabs/talos/pkg/machinery/config/generate"
2023-05-29 23:00:13 +04:00
"github.com/siderolabs/talos/pkg/machinery/config/types/v1alpha1"
2019-12-27 20:49:24 +00:00
)
2019-12-23 20:52:04 +00:00
// Provisioner is an interface each provisioner should implement.
2024-03-08 21:57:26 +03:00
//
//nolint:interfacebloat
2019-12-23 20:52:04 +00:00
type Provisioner interface {
Create ( context . Context , ClusterRequest , ... Option ) ( Cluster , error )
Destroy ( context . Context , Cluster , ... Option ) error
2020-02-21 21:58:30 +03:00
CrashDump ( context . Context , Cluster , io . Writer )
2020-01-17 22:25:15 +00:00
Reflect ( ctx context . Context , clusterName , stateDirectory string ) ( Cluster , error )
2023-05-25 17:14:01 +04:00
GenOptions ( NetworkRequest ) [ ] generate . Option
2024-03-08 21:57:26 +03:00
GetInClusterKubernetesControlPlaneEndpoint ( req NetworkRequest , controlPlanePort int ) string
GetExternalKubernetesControlPlaneEndpoint ( req NetworkRequest , controlPlanePort int ) string
GetTalosAPIEndpoints ( NetworkRequest ) [ ] string
2023-05-29 23:00:13 +04:00
GetFirstInterface ( ) v1alpha1 . IfaceSelector
2019-12-27 20:49:24 +00:00
2019-12-23 20:52:04 +00:00
Close ( ) error
2020-10-29 19:19:31 +03:00
UserDiskName ( index int ) string
2019-12-23 20:52:04 +00:00
}