зеркало из https://github.com/Azure/ARO-RP.git
fixes associated with updating installer vendoring
This commit is contained in:
Родитель
974c3ff823
Коммит
fa25a1c9a7
|
@ -64,6 +64,8 @@ upstream OCP.
|
|||
|
||||
* No managed identity (for now).
|
||||
|
||||
* No IPv6 support (for now).
|
||||
|
||||
* Upstream installer closely binds the installConfig (cluster) name, cluster
|
||||
domain name, infra ID and Azure resource name prefix. ARO separates these out
|
||||
a little. The installConfig (cluster) name and the domain name remain bound;
|
||||
|
|
|
@ -20,7 +20,7 @@ var allowedPaths = []*regexp.Regexp{
|
|||
regexp.MustCompile(`^/manifests$`),
|
||||
regexp.MustCompile(`^/manifests/bootkube($|/)`),
|
||||
regexp.MustCompile(`^/manifests/openshift($|/)`),
|
||||
regexp.MustCompile(`^/rhcos.json$`),
|
||||
regexp.MustCompile(`^/rhcos-amd64.json$`),
|
||||
}
|
||||
|
||||
type fileSystem struct {
|
||||
|
|
|
@ -13,6 +13,7 @@ import (
|
|||
azstorage "github.com/Azure/azure-sdk-for-go/storage"
|
||||
"github.com/Azure/go-autorest/autorest/azure/auth"
|
||||
"github.com/openshift/installer/pkg/rhcos"
|
||||
"github.com/openshift/installer/pkg/types"
|
||||
|
||||
_ "github.com/Azure/ARO-RP/pkg/install"
|
||||
"github.com/Azure/ARO-RP/pkg/util/azureclient/mgmt/storage"
|
||||
|
@ -55,7 +56,7 @@ func run(ctx context.Context) error {
|
|||
if len(os.Args) == 2 {
|
||||
vhd = os.Args[1]
|
||||
} else {
|
||||
vhd, err = rhcos.VHD(ctx)
|
||||
vhd, err = rhcos.VHD(ctx, types.ArchitectureAMD64)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -199,7 +199,11 @@ func (m *Manager) Create(ctx context.Context) error {
|
|||
SSHKey: sshkey.Type() + " " + base64.StdEncoding.EncodeToString(sshkey.Marshal()),
|
||||
BaseDomain: domain[strings.IndexByte(domain, '.')+1:],
|
||||
Networking: &types.Networking{
|
||||
MachineCIDR: ipnet.MustParseCIDR("127.0.0.0/8"), // dummy
|
||||
MachineNetwork: []types.MachineNetworkEntry{
|
||||
{
|
||||
CIDR: *ipnet.MustParseCIDR("127.0.0.0/8"), // dummy
|
||||
},
|
||||
},
|
||||
NetworkType: "OpenShiftSDN",
|
||||
ClusterNetwork: []types.ClusterNetworkEntry{
|
||||
{
|
||||
|
@ -221,6 +225,7 @@ func (m *Manager) Create(ctx context.Context) error {
|
|||
},
|
||||
},
|
||||
Hyperthreading: "Enabled",
|
||||
Architecture: types.ArchitectureAMD64,
|
||||
},
|
||||
Compute: []types.MachinePool{
|
||||
{
|
||||
|
@ -236,6 +241,7 @@ func (m *Manager) Create(ctx context.Context) error {
|
|||
},
|
||||
},
|
||||
Hyperthreading: "Enabled",
|
||||
Architecture: types.ArchitectureAMD64,
|
||||
},
|
||||
},
|
||||
Platform: types.Platform{
|
||||
|
@ -307,7 +313,7 @@ var rxRHCOS = regexp.MustCompile(`rhcos-((\d+)\.\d+\.\d{8})\d{4}\.\d+-azure\.x86
|
|||
|
||||
func getRHCOSImage(ctx context.Context) (*azuretypes.Image, error) {
|
||||
// https://rhcos.blob.core.windows.net/imagebucket/rhcos-43.81.201911221453.0-azure.x86_64.vhd
|
||||
osImage, err := rhcos.VHD(ctx)
|
||||
osImage, err := rhcos.VHD(ctx, types.ArchitectureAMD64)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
@ -174,7 +174,7 @@ func (i *Installer) installResources(ctx context.Context) error {
|
|||
PrivateLinkServiceProperties: &mgmtnetwork.PrivateLinkServiceProperties{
|
||||
LoadBalancerFrontendIPConfigurations: &[]mgmtnetwork.FrontendIPConfiguration{
|
||||
{
|
||||
ID: to.StringPtr("[resourceId('Microsoft.Network/loadBalancers/frontendIPConfigurations', '" + infraID + "-internal-lb', 'internal-lb-ip')]"),
|
||||
ID: to.StringPtr("[resourceId('Microsoft.Network/loadBalancers/frontendIPConfigurations', '" + infraID + "-internal-lb', 'internal-lb-ip-v4')]"),
|
||||
},
|
||||
},
|
||||
IPConfigurations: &[]mgmtnetwork.PrivateLinkServiceIPConfiguration{
|
||||
|
@ -215,7 +215,7 @@ func (i *Installer) installResources(ctx context.Context) error {
|
|||
PublicIPAddressPropertiesFormat: &mgmtnetwork.PublicIPAddressPropertiesFormat{
|
||||
PublicIPAllocationMethod: mgmtnetwork.Static,
|
||||
},
|
||||
Name: to.StringPtr(infraID + "-pip"),
|
||||
Name: to.StringPtr(infraID + "-pip-v4"),
|
||||
Type: to.StringPtr("Microsoft.Network/publicIPAddresses"),
|
||||
Location: &installConfig.Config.Azure.Region,
|
||||
},
|
||||
|
@ -236,22 +236,22 @@ func (i *Installer) installResources(ctx context.Context) error {
|
|||
ID: to.StringPtr(i.doc.OpenShiftCluster.Properties.MasterProfile.SubnetID),
|
||||
},
|
||||
},
|
||||
Name: to.StringPtr("internal-lb-ip"),
|
||||
Name: to.StringPtr("internal-lb-ip-v4"),
|
||||
},
|
||||
},
|
||||
BackendAddressPools: &[]mgmtnetwork.BackendAddressPool{
|
||||
{
|
||||
Name: to.StringPtr(infraID + "-internal-controlplane"),
|
||||
Name: to.StringPtr(infraID + "-internal-controlplane-v4"),
|
||||
},
|
||||
},
|
||||
LoadBalancingRules: &[]mgmtnetwork.LoadBalancingRule{
|
||||
{
|
||||
LoadBalancingRulePropertiesFormat: &mgmtnetwork.LoadBalancingRulePropertiesFormat{
|
||||
FrontendIPConfiguration: &mgmtnetwork.SubResource{
|
||||
ID: to.StringPtr("[resourceId('Microsoft.Network/loadBalancers/frontendIPConfigurations', '" + infraID + "-internal-lb', 'internal-lb-ip')]"),
|
||||
ID: to.StringPtr("[resourceId('Microsoft.Network/loadBalancers/frontendIPConfigurations', '" + infraID + "-internal-lb', 'internal-lb-ip-v4')]"),
|
||||
},
|
||||
BackendAddressPool: &mgmtnetwork.SubResource{
|
||||
ID: to.StringPtr("[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', '" + infraID + "-internal-lb', '" + infraID + "-internal-controlplane')]"),
|
||||
ID: to.StringPtr("[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', '" + infraID + "-internal-lb', '" + infraID + "-internal-controlplane-v4')]"),
|
||||
},
|
||||
Probe: &mgmtnetwork.SubResource{
|
||||
ID: to.StringPtr("[resourceId('Microsoft.Network/loadBalancers/probes', '" + infraID + "-internal-lb', 'api-internal-probe')]"),
|
||||
|
@ -263,15 +263,15 @@ func (i *Installer) installResources(ctx context.Context) error {
|
|||
IdleTimeoutInMinutes: to.Int32Ptr(30),
|
||||
DisableOutboundSnat: to.BoolPtr(true),
|
||||
},
|
||||
Name: to.StringPtr("api-internal"),
|
||||
Name: to.StringPtr("api-internal-v4"),
|
||||
},
|
||||
{
|
||||
LoadBalancingRulePropertiesFormat: &mgmtnetwork.LoadBalancingRulePropertiesFormat{
|
||||
FrontendIPConfiguration: &mgmtnetwork.SubResource{
|
||||
ID: to.StringPtr("[resourceId('Microsoft.Network/loadBalancers/frontendIPConfigurations', '" + infraID + "-internal-lb', 'internal-lb-ip')]"),
|
||||
ID: to.StringPtr("[resourceId('Microsoft.Network/loadBalancers/frontendIPConfigurations', '" + infraID + "-internal-lb', 'internal-lb-ip-v4')]"),
|
||||
},
|
||||
BackendAddressPool: &mgmtnetwork.SubResource{
|
||||
ID: to.StringPtr("[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', '" + infraID + "-internal-lb', '" + infraID + "-internal-controlplane')]"),
|
||||
ID: to.StringPtr("[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', '" + infraID + "-internal-lb', '" + infraID + "-internal-controlplane-v4')]"),
|
||||
},
|
||||
Probe: &mgmtnetwork.SubResource{
|
||||
ID: to.StringPtr("[resourceId('Microsoft.Network/loadBalancers/probes', '" + infraID + "-internal-lb', 'sint-probe')]"),
|
||||
|
@ -282,7 +282,7 @@ func (i *Installer) installResources(ctx context.Context) error {
|
|||
BackendPort: to.Int32Ptr(22623),
|
||||
IdleTimeoutInMinutes: to.Int32Ptr(30),
|
||||
},
|
||||
Name: to.StringPtr("sint"),
|
||||
Name: to.StringPtr("sint-v4"),
|
||||
},
|
||||
},
|
||||
Probes: &[]mgmtnetwork.Probe{
|
||||
|
@ -320,17 +320,17 @@ func (i *Installer) installResources(ctx context.Context) error {
|
|||
InterfaceIPConfigurationPropertiesFormat: &mgmtnetwork.InterfaceIPConfigurationPropertiesFormat{
|
||||
LoadBalancerBackendAddressPools: &[]mgmtnetwork.BackendAddressPool{
|
||||
{
|
||||
ID: to.StringPtr("[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', '" + infraID + "-public-lb', '" + infraID + "-public-lb-control-plane')]"),
|
||||
ID: to.StringPtr("[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', '" + infraID + "-public-lb', '" + infraID + "-public-lb-control-plane-v4')]"),
|
||||
},
|
||||
{
|
||||
ID: to.StringPtr("[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', '" + infraID + "-internal-lb', '" + infraID + "-internal-controlplane')]"),
|
||||
ID: to.StringPtr("[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', '" + infraID + "-internal-lb', '" + infraID + "-internal-controlplane-v4')]"),
|
||||
},
|
||||
},
|
||||
Subnet: &mgmtnetwork.Subnet{
|
||||
ID: to.StringPtr(i.doc.OpenShiftCluster.Properties.MasterProfile.SubnetID),
|
||||
},
|
||||
},
|
||||
Name: to.StringPtr("bootstrap-nic-ip"),
|
||||
Name: to.StringPtr("bootstrap-nic-ip-v4"),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -352,10 +352,10 @@ func (i *Installer) installResources(ctx context.Context) error {
|
|||
InterfaceIPConfigurationPropertiesFormat: &mgmtnetwork.InterfaceIPConfigurationPropertiesFormat{
|
||||
LoadBalancerBackendAddressPools: &[]mgmtnetwork.BackendAddressPool{
|
||||
{
|
||||
ID: to.StringPtr("[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', '" + infraID + "-public-lb', '" + infraID + "-public-lb-control-plane')]"),
|
||||
ID: to.StringPtr("[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', '" + infraID + "-public-lb', '" + infraID + "-public-lb-control-plane-v4')]"),
|
||||
},
|
||||
{
|
||||
ID: to.StringPtr("[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', '" + infraID + "-internal-lb', '" + infraID + "-internal-controlplane')]"),
|
||||
ID: to.StringPtr("[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', '" + infraID + "-internal-lb', '" + infraID + "-internal-controlplane-v4')]"),
|
||||
},
|
||||
},
|
||||
Subnet: &mgmtnetwork.Subnet{
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -14,6 +14,7 @@ import (
|
|||
"github.com/openshift/installer/pkg/asset/kubeconfig"
|
||||
"github.com/openshift/installer/pkg/asset/machines"
|
||||
"github.com/openshift/installer/pkg/asset/manifests"
|
||||
"github.com/openshift/installer/pkg/asset/openshiftinstall"
|
||||
"github.com/openshift/installer/pkg/asset/password"
|
||||
"github.com/openshift/installer/pkg/asset/releaseimage"
|
||||
"github.com/openshift/installer/pkg/asset/rhcos"
|
||||
|
@ -71,6 +72,7 @@ var registeredTypes = map[string]asset.Asset{
|
|||
"*openshift.NetworkCRDs": &openshift.NetworkCRDs{},
|
||||
"*openshift.PrivateClusterOutbound": &openshift.PrivateClusterOutbound{},
|
||||
"*openshift.RoleCloudCredsSecretReader": &openshift.RoleCloudCredsSecretReader{},
|
||||
"*openshiftinstall.Config": &openshiftinstall.Config{},
|
||||
"*password.KubeadminPassword": &password.KubeadminPassword{},
|
||||
"*releaseimage.Image": &releaseimage.Image{},
|
||||
"*rhcos.BootstrapImage": new(rhcos.BootstrapImage),
|
||||
|
|
|
@ -58,7 +58,11 @@ func TestGraphRoundTrip(t *testing.T) {
|
|||
SSHKey: sshkey.Type() + " " + base64.StdEncoding.EncodeToString(sshkey.Marshal()),
|
||||
BaseDomain: "dummy",
|
||||
Networking: &types.Networking{
|
||||
MachineCIDR: ipnet.MustParseCIDR("10.0.0.0/16"),
|
||||
MachineNetwork: []types.MachineNetworkEntry{
|
||||
{
|
||||
CIDR: *ipnet.MustParseCIDR("10.0.0.0/16"),
|
||||
},
|
||||
},
|
||||
NetworkType: "OpenShiftSDN",
|
||||
ClusterNetwork: []types.ClusterNetworkEntry{
|
||||
{
|
||||
|
@ -74,12 +78,14 @@ func TestGraphRoundTrip(t *testing.T) {
|
|||
Name: "master",
|
||||
Replicas: to.Int64Ptr(3),
|
||||
Hyperthreading: "Enabled",
|
||||
Architecture: types.ArchitectureAMD64,
|
||||
},
|
||||
Compute: []types.MachinePool{
|
||||
{
|
||||
Name: "worker",
|
||||
Replicas: to.Int64Ptr(3),
|
||||
Hyperthreading: "Enabled",
|
||||
Architecture: types.ArchitectureAMD64,
|
||||
},
|
||||
},
|
||||
Platform: types.Platform{
|
||||
|
|
|
@ -60,7 +60,7 @@ func (i *Installer) updateAPIIP(ctx context.Context) error {
|
|||
resourceGroup := stringutils.LastTokenByte(i.doc.OpenShiftCluster.Properties.ClusterProfile.ResourceGroupID, '/')
|
||||
var ipAddress string
|
||||
if i.doc.OpenShiftCluster.Properties.APIServerProfile.Visibility == api.VisibilityPublic {
|
||||
ip, err := i.publicipaddresses.Get(ctx, resourceGroup, infraID+"-pip", "")
|
||||
ip, err := i.publicipaddresses.Get(ctx, resourceGroup, infraID+"-pip-v4", "")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -27,15 +27,15 @@ func (i *Installer) apiServerPublicLoadBalancer(location string, visibility api.
|
|||
{
|
||||
FrontendIPConfigurationPropertiesFormat: &mgmtnetwork.FrontendIPConfigurationPropertiesFormat{
|
||||
PublicIPAddress: &mgmtnetwork.PublicIPAddress{
|
||||
ID: to.StringPtr("[resourceId('Microsoft.Network/publicIPAddresses', '" + infraID + "-pip')]"),
|
||||
ID: to.StringPtr("[resourceId('Microsoft.Network/publicIPAddresses', '" + infraID + "-pip-v4')]"),
|
||||
},
|
||||
},
|
||||
Name: to.StringPtr("public-lb-ip"),
|
||||
Name: to.StringPtr("public-lb-ip-v4"),
|
||||
},
|
||||
},
|
||||
BackendAddressPools: &[]mgmtnetwork.BackendAddressPool{
|
||||
{
|
||||
Name: to.StringPtr(infraID + "-public-lb-control-plane"),
|
||||
Name: to.StringPtr(infraID + "-public-lb-control-plane-v4"),
|
||||
},
|
||||
},
|
||||
OutboundRules: &[]mgmtnetwork.OutboundRule{
|
||||
|
@ -43,11 +43,11 @@ func (i *Installer) apiServerPublicLoadBalancer(location string, visibility api.
|
|||
OutboundRulePropertiesFormat: &mgmtnetwork.OutboundRulePropertiesFormat{
|
||||
FrontendIPConfigurations: &[]mgmtnetwork.SubResource{
|
||||
{
|
||||
ID: to.StringPtr("[resourceId('Microsoft.Network/loadBalancers/frontendIPConfigurations', '" + infraID + "-public-lb', 'public-lb-ip')]"),
|
||||
ID: to.StringPtr("[resourceId('Microsoft.Network/loadBalancers/frontendIPConfigurations', '" + infraID + "-public-lb', 'public-lb-ip-v4')]"),
|
||||
},
|
||||
},
|
||||
BackendAddressPool: &mgmtnetwork.SubResource{
|
||||
ID: to.StringPtr("[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', '" + infraID + "-public-lb', '" + infraID + "-public-lb-control-plane')]"),
|
||||
ID: to.StringPtr("[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', '" + infraID + "-public-lb', '" + infraID + "-public-lb-control-plane-v4')]"),
|
||||
},
|
||||
Protocol: mgmtnetwork.LoadBalancerOutboundRuleProtocolAll,
|
||||
IdleTimeoutInMinutes: to.Int32Ptr(30),
|
||||
|
@ -66,10 +66,10 @@ func (i *Installer) apiServerPublicLoadBalancer(location string, visibility api.
|
|||
{
|
||||
LoadBalancingRulePropertiesFormat: &mgmtnetwork.LoadBalancingRulePropertiesFormat{
|
||||
FrontendIPConfiguration: &mgmtnetwork.SubResource{
|
||||
ID: to.StringPtr("[resourceId('Microsoft.Network/loadBalancers/frontendIPConfigurations', '" + infraID + "-public-lb', 'public-lb-ip')]"),
|
||||
ID: to.StringPtr("[resourceId('Microsoft.Network/loadBalancers/frontendIPConfigurations', '" + infraID + "-public-lb', 'public-lb-ip-v4')]"),
|
||||
},
|
||||
BackendAddressPool: &mgmtnetwork.SubResource{
|
||||
ID: to.StringPtr("[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', '" + infraID + "-public-lb', '" + infraID + "-public-lb-control-plane')]"),
|
||||
ID: to.StringPtr("[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', '" + infraID + "-public-lb', '" + infraID + "-public-lb-control-plane-v4')]"),
|
||||
},
|
||||
Probe: &mgmtnetwork.SubResource{
|
||||
ID: to.StringPtr("[resourceId('Microsoft.Network/loadBalancers/probes', '" + infraID + "-public-lb', 'api-internal-probe')]"),
|
||||
|
@ -81,7 +81,7 @@ func (i *Installer) apiServerPublicLoadBalancer(location string, visibility api.
|
|||
IdleTimeoutInMinutes: to.Int32Ptr(30),
|
||||
DisableOutboundSnat: to.BoolPtr(true),
|
||||
},
|
||||
Name: to.StringPtr("api-internal"),
|
||||
Name: to.StringPtr("api-internal-v4"),
|
||||
},
|
||||
}
|
||||
lb.Probes = &[]mgmtnetwork.Probe{
|
||||
|
@ -102,7 +102,7 @@ func (i *Installer) apiServerPublicLoadBalancer(location string, visibility api.
|
|||
Resource: lb,
|
||||
APIVersion: azureclient.APIVersions["Microsoft.Network"],
|
||||
DependsOn: []string{
|
||||
"Microsoft.Network/publicIPAddresses/" + infraID + "-pip",
|
||||
"Microsoft.Network/publicIPAddresses/" + infraID + "-pip-v4",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче