File tree Expand file tree Collapse file tree 3 files changed +22
-0
lines changed
Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 1+ package clusterapi
2+
3+ import (
4+ "github.com/openshift/installer/pkg/infrastructure/clusterapi"
5+ awstypes "github.com/openshift/installer/pkg/types/aws"
6+ )
7+
8+ var _ clusterapi.Provider = (* Provider )(nil )
9+
10+ // Provider implements AWS CAPI installation.
11+ type Provider struct {}
12+
13+ // Name gives the name of the provider, AWS.
14+ func (* Provider ) Name () string { return awstypes .Name }
Original file line number Diff line number Diff line change 99 configv1 "github.com/openshift/api/config/v1"
1010 "github.com/openshift/installer/pkg/infrastructure"
1111 awsinfra "github.com/openshift/installer/pkg/infrastructure/aws"
12+ awscapi "github.com/openshift/installer/pkg/infrastructure/aws/clusterapi"
1213 "github.com/openshift/installer/pkg/infrastructure/clusterapi"
1314 gcpcapi "github.com/openshift/installer/pkg/infrastructure/gcp/clusterapi"
1415 "github.com/openshift/installer/pkg/terraform"
@@ -43,6 +44,9 @@ import (
4344func ProviderForPlatform (platform string , fg featuregates.FeatureGate ) (infrastructure.Provider , error ) {
4445 switch platform {
4546 case awstypes .Name :
47+ if fg .Enabled (configv1 .FeatureGateClusterAPIInstall ) {
48+ return clusterapi .InitializeProvider (& awscapi.Provider {}), nil
49+ }
4650 if fg .Enabled (configv1 .FeatureGateInstallAlternateInfrastructureAWS ) {
4751 return awsinfra .InitializeProvider (), nil
4852 }
Original file line number Diff line number Diff line change 99 configv1 "github.com/openshift/api/config/v1"
1010 "github.com/openshift/installer/pkg/infrastructure"
1111 "github.com/openshift/installer/pkg/infrastructure/aws"
12+ awscapi "github.com/openshift/installer/pkg/infrastructure/aws/clusterapi"
1213 "github.com/openshift/installer/pkg/infrastructure/clusterapi"
1314 gcpcapi "github.com/openshift/installer/pkg/infrastructure/gcp/clusterapi"
1415 awstypes "github.com/openshift/installer/pkg/types/aws"
@@ -22,6 +23,9 @@ import (
2223func ProviderForPlatform (platform string , fg featuregates.FeatureGate ) (infrastructure.Provider , error ) {
2324 switch platform {
2425 case awstypes .Name :
26+ if fg .Enabled (configv1 .FeatureGateClusterAPIInstall ) {
27+ return clusterapi .InitializeProvider (& awscapi.Provider {}), nil
28+ }
2529 return aws .InitializeProvider (), nil
2630 case azuretypes .Name :
2731 panic ("not implemented" )
You can’t perform that action at this time.
0 commit comments