Skip to content

Commit

Permalink
fix: update Sfyra to install CAPI v0.3
Browse files Browse the repository at this point in the history
This fixes a problem that our providers are not v1alpha4 ready yet.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
(cherry picked from commit ea3016f)
  • Loading branch information
smira authored and rsmitty committed Aug 5, 2021
1 parent 654a1d0 commit 0fc255e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions sfyra/cmd/sfyra/cmd/bootstrap_capi.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ var bootstrapCAPICmd = &cobra.Command{

clusterAPI, err := capi.NewManager(ctx, bootstrapCluster, capi.Options{
ClusterctlConfigPath: options.ClusterctlConfigPath,
CoreProvider: options.CoreProvider,
BootstrapProviders: options.BootstrapProviders,
InfrastructureProviders: options.InfrastructureProviders,
ControlPlaneProviders: options.ControlPlaneProviders,
Expand Down
2 changes: 2 additions & 0 deletions sfyra/cmd/sfyra/cmd/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ type Options struct {
TalosInitrdURL string

ClusterctlConfigPath string
CoreProvider string
BootstrapProviders []string
InfrastructureProviders []string
ControlPlaneProviders []string
Expand Down Expand Up @@ -63,6 +64,7 @@ func DefaultOptions() Options {
TalosKernelURL: fmt.Sprintf("https://github.com/talos-systems/talos/releases/download/%s/vmlinuz-amd64", TalosRelease),
TalosInitrdURL: fmt.Sprintf("https://github.com/talos-systems/talos/releases/download/%s/initramfs-amd64.xz", TalosRelease),

CoreProvider: "cluster-api:v0.3.19",
BootstrapProviders: []string{"talos"},
InfrastructureProviders: []string{"sidero"},
ControlPlaneProviders: []string{"talos"},
Expand Down
1 change: 1 addition & 0 deletions sfyra/cmd/sfyra/cmd/test_integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ var testIntegrationCmd = &cobra.Command{

clusterAPI, err := capi.NewManager(ctx, bootstrapCluster, capi.Options{
ClusterctlConfigPath: options.ClusterctlConfigPath,
CoreProvider: options.CoreProvider,
BootstrapProviders: options.BootstrapProviders,
InfrastructureProviders: options.InfrastructureProviders,
ControlPlaneProviders: options.ControlPlaneProviders,
Expand Down
3 changes: 2 additions & 1 deletion sfyra/pkg/capi/capi.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ type Manager struct {
// Options for the CAPI installer.
type Options struct {
ClusterctlConfigPath string
CoreProvider string
BootstrapProviders []string
InfrastructureProviders []string
ControlPlaneProviders []string
Expand Down Expand Up @@ -128,7 +129,7 @@ func (clusterAPI *Manager) Install(ctx context.Context) error {

options := client.InitOptions{
Kubeconfig: kubeconfig,
CoreProvider: "",
CoreProvider: clusterAPI.options.CoreProvider,
BootstrapProviders: clusterAPI.options.BootstrapProviders,
ControlPlaneProviders: clusterAPI.options.ControlPlaneProviders,
InfrastructureProviders: clusterAPI.options.InfrastructureProviders,
Expand Down

0 comments on commit 0fc255e

Please sign in to comment.