From 9573ed45c026e6d7781e58765fa532d6e23be65b Mon Sep 17 00:00:00 2001 From: Jon Perritt Date: Wed, 5 Sep 2018 17:35:16 -0500 Subject: [PATCH] add openstack gate flag --- docs/tutorial/openstack.md | 3 +-- upup/pkg/fi/cloudup/apply_cluster.go | 22 ++++++++++++---------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/docs/tutorial/openstack.md b/docs/tutorial/openstack.md index 1e83fae53c..c0fa9cb680 100644 --- a/docs/tutorial/openstack.md +++ b/docs/tutorial/openstack.md @@ -36,9 +36,8 @@ It is important to set the following environment variables: export OPENSTACK_CREDENTIAL_FILE= # where is the path of the config file export KOPS_STATE_STORE=swift:// # where is the name of the Swift container to use for kops state -# TODO(lmb): Add a feature gate for OpenStack # this is required since OpenStack support is currently in alpha so it is feature gated -# export KOPS_FEATURE_FLAGS="AlphaAllowOpenStack" +export KOPS_FEATURE_FLAGS="AlphaAllowOpenStack" ``` ## Creating a Cluster diff --git a/upup/pkg/fi/cloudup/apply_cluster.go b/upup/pkg/fi/cloudup/apply_cluster.go index cfd5507975..499136ad53 100644 --- a/upup/pkg/fi/cloudup/apply_cluster.go +++ b/upup/pkg/fi/cloudup/apply_cluster.go @@ -84,6 +84,8 @@ var ( AlphaAllowDO = featureflag.New("AlphaAllowDO", featureflag.Bool(false)) // AlphaAllowGCE is a feature flag that gates GCE support while it is alpha AlphaAllowGCE = featureflag.New("AlphaAllowGCE", featureflag.Bool(false)) + // AlphaAllowOpenstack is a feature flag that gates OpenStack support while it is alpha + AlphaAllowOpenstack = featureflag.New("AlphaAllowOpenstack", featureflag.Bool(false)) // AlphaAllowVsphere is a feature flag that gates vsphere support while it is alpha AlphaAllowVsphere = featureflag.New("AlphaAllowVsphere", featureflag.Bool(false)) // AlphaAllowALI is a feature flag that gates aliyun support while it is alpha @@ -414,16 +416,16 @@ func (c *ApplyClusterCmd) Run() error { "iamRolePolicy": &awstasks.IAMRolePolicy{}, // VPC / Networking - "dhcpOptions": &awstasks.DHCPOptions{}, - "internetGateway": &awstasks.InternetGateway{}, - "route": &awstasks.Route{}, - "routeTable": &awstasks.RouteTable{}, - "routeTableAssociation": &awstasks.RouteTableAssociation{}, - "securityGroup": &awstasks.SecurityGroup{}, - "securityGroupRule": &awstasks.SecurityGroupRule{}, - "subnet": &awstasks.Subnet{}, - "vpc": &awstasks.VPC{}, - "ngw": &awstasks.NatGateway{}, + "dhcpOptions": &awstasks.DHCPOptions{}, + "internetGateway": &awstasks.InternetGateway{}, + "route": &awstasks.Route{}, + "routeTable": &awstasks.RouteTable{}, + "routeTableAssociation": &awstasks.RouteTableAssociation{}, + "securityGroup": &awstasks.SecurityGroup{}, + "securityGroupRule": &awstasks.SecurityGroupRule{}, + "subnet": &awstasks.Subnet{}, + "vpc": &awstasks.VPC{}, + "ngw": &awstasks.NatGateway{}, "vpcDHDCPOptionsAssociation": &awstasks.VPCDHCPOptionsAssociation{}, // ELB