From 7ab8c3de40847ce7112892a5b51b34bf309428d2 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Tue, 7 May 2019 12:03:48 -0700 Subject: [PATCH] pkg/asset/manifests/infrastructure: Set status.platformStatus.aws.region Using openshift/api@dedfb47b1f (config/v1/types_infrastructure: Add AWS Region, 2019-04-26, openshift/api#300) so the registry can use it as a default for their config resource [1,2]. [1]: https://github.com/openshift/cluster-image-registry-operator/blob/670539cda460d97e0a3e23f077fdf9dd00d2ccdc/manifests/00-crd.yaml [2]: https://github.com/openshift/cluster-image-registry-operator/blob/670539cda460d97e0a3e23f077fdf9dd00d2ccdc/pkg/apis/imageregistry/v1/types.go#L179-L184 --- pkg/asset/manifests/infrastructure.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkg/asset/manifests/infrastructure.go b/pkg/asset/manifests/infrastructure.go index 189984785e0..83a39692536 100644 --- a/pkg/asset/manifests/infrastructure.go +++ b/pkg/asset/manifests/infrastructure.go @@ -83,12 +83,22 @@ func (i *Infrastructure) Generate(dependencies asset.Parents) error { Status: configv1.InfrastructureStatus{ InfrastructureName: clusterID.InfraID, Platform: platform, + PlatformStatus: &configv1.PlatformStatus{ + Type: platform, + }, APIServerURL: getInternalAPIServerURL(installConfig.Config), APIServerInternalURL: getInternalAPIServerURL(installConfig.Config), EtcdDiscoveryDomain: getEtcdDiscoveryDomain(installConfig.Config), }, } + switch installConfig.Config.Platform.Name() { + case aws.Name: + config.Status.PlatformStatus.AWS = &configv1.AWSPlatformStatus{ + Region: installconfig.Config.Platform.AWS.Region, + } + } + if cloudproviderconfig.ConfigMap != nil { // set the configmap reference. config.Spec.CloudConfig = configv1.ConfigMapFileReference{Name: cloudproviderconfig.ConfigMap.Name, Key: cloudProviderConfigDataKey}