Skip to content

Commit

Permalink
Update all to.Ptr equivalents to our internal one (#4085)
Browse files Browse the repository at this point in the history
  • Loading branch information
bennerv authored Feb 5, 2025
1 parent 8c7da10 commit 7847b01
Show file tree
Hide file tree
Showing 10 changed files with 111 additions and 111 deletions.
10 changes: 5 additions & 5 deletions pkg/cluster/clustermsi.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ import (
"github.com/Azure/azure-sdk-for-go/services/keyvault/v7.0/keyvault"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/msi-dataplane/pkg/dataplane"
"k8s.io/utils/ptr"

"github.com/Azure/ARO-RP/pkg/api"
"github.com/Azure/ARO-RP/pkg/env"
"github.com/Azure/ARO-RP/pkg/util/azureclient/azuresdk/armmsi"
"github.com/Azure/ARO-RP/pkg/util/azureerrors"
"github.com/Azure/ARO-RP/pkg/util/pointerutils"
)

const (
Expand Down Expand Up @@ -91,11 +91,11 @@ func (m *manager) ensureClusterMsiCertificate(ctx context.Context) error {
}

return m.clusterMsiKeyVaultStore.SetSecret(ctx, secretName, keyvault.SecretSetParameters{
Value: ptr.To(string(raw)),
Value: pointerutils.ToPtr(string(raw)),
SecretAttributes: &keyvault.SecretAttributes{
Enabled: ptr.To(true),
Expires: ptr.To(date.UnixTime(expirationDate)),
NotBefore: ptr.To(date.UnixTime(expirationDate)),
Enabled: pointerutils.ToPtr(true),
Expires: pointerutils.ToPtr(date.UnixTime(expirationDate)),
NotBefore: pointerutils.ToPtr(date.UnixTime(expirationDate)),
},
Tags: nil,
})
Expand Down
58 changes: 29 additions & 29 deletions pkg/cluster/deploybaseresources_additional.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ import (
mgmtauthorization "github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-09-01-preview/authorization"
mgmtstorage "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage"
"github.com/Azure/go-autorest/autorest/to"
"k8s.io/utils/ptr"

"github.com/Azure/ARO-RP/pkg/api"
"github.com/Azure/ARO-RP/pkg/util/arm"
"github.com/Azure/ARO-RP/pkg/util/azureclient"
"github.com/Azure/ARO-RP/pkg/util/platformworkloadidentity"
"github.com/Azure/ARO-RP/pkg/util/pointerutils"
"github.com/Azure/ARO-RP/pkg/util/rbac"
"github.com/Azure/ARO-RP/pkg/util/stringutils"
)
Expand All @@ -27,13 +27,13 @@ func (m *manager) denyAssignment() *arm.Resource {
if m.doc.OpenShiftCluster.UsesWorkloadIdentity() {
for _, identity := range m.doc.OpenShiftCluster.Properties.PlatformWorkloadIdentityProfile.PlatformWorkloadIdentities {
excludePrincipals = append(excludePrincipals, mgmtauthorization.Principal{
ID: ptr.To(identity.ObjectID),
ID: pointerutils.ToPtr(identity.ObjectID),
Type: to.StringPtr(string(mgmtauthorization.ServicePrincipal)),
})
}
excludePrincipals = append(excludePrincipals, mgmtauthorization.Principal{
ID: ptr.To(m.fpServicePrincipalID),
Type: ptr.To(string(mgmtauthorization.ServicePrincipal)),
ID: pointerutils.ToPtr(m.fpServicePrincipalID),
Type: pointerutils.ToPtr(string(mgmtauthorization.ServicePrincipal)),
})
} else {
excludePrincipals = append(excludePrincipals, mgmtauthorization.Principal{
Expand Down Expand Up @@ -540,13 +540,13 @@ func (m *manager) networkInternalLoadBalancer(azureRegion string) *arm.Resource
func (m *manager) networkPublicLoadBalancer(azureRegion string, outboundIPs []api.ResourceReference) *arm.Resource {
lb := &sdknetwork.LoadBalancer{
SKU: &sdknetwork.LoadBalancerSKU{
Name: ptr.To(sdknetwork.LoadBalancerSKUNameStandard),
Name: pointerutils.ToPtr(sdknetwork.LoadBalancerSKUNameStandard),
},
Properties: &sdknetwork.LoadBalancerPropertiesFormat{
FrontendIPConfigurations: []*sdknetwork.FrontendIPConfiguration{},
BackendAddressPools: []*sdknetwork.BackendAddressPool{
{
Name: ptr.To(m.doc.OpenShiftCluster.Properties.InfraID),
Name: pointerutils.ToPtr(m.doc.OpenShiftCluster.Properties.InfraID),
},
},
LoadBalancingRules: []*sdknetwork.LoadBalancingRule{}, //required to override default LB rules for port 80 and 443
Expand All @@ -556,60 +556,60 @@ func (m *manager) networkPublicLoadBalancer(azureRegion string, outboundIPs []ap
Properties: &sdknetwork.OutboundRulePropertiesFormat{
FrontendIPConfigurations: []*sdknetwork.SubResource{},
BackendAddressPool: &sdknetwork.SubResource{
ID: ptr.To(fmt.Sprintf("[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', '%s', '%[1]s')]", m.doc.OpenShiftCluster.Properties.InfraID)),
ID: pointerutils.ToPtr(fmt.Sprintf("[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', '%s', '%[1]s')]", m.doc.OpenShiftCluster.Properties.InfraID)),
},
Protocol: ptr.To(sdknetwork.LoadBalancerOutboundRuleProtocolAll),
IdleTimeoutInMinutes: ptr.To(int32(30)),
Protocol: pointerutils.ToPtr(sdknetwork.LoadBalancerOutboundRuleProtocolAll),
IdleTimeoutInMinutes: pointerutils.ToPtr(int32(30)),
},
Name: ptr.To("outbound-rule-v4"),
Name: pointerutils.ToPtr("outbound-rule-v4"),
},
},
},
Name: &m.doc.OpenShiftCluster.Properties.InfraID,
Type: ptr.To("Microsoft.Network/loadBalancers"),
Type: pointerutils.ToPtr("Microsoft.Network/loadBalancers"),
Location: &azureRegion,
}

if m.doc.OpenShiftCluster.Properties.APIServerProfile.Visibility == api.VisibilityPublic {
lb.Properties.FrontendIPConfigurations = append(lb.Properties.FrontendIPConfigurations, &sdknetwork.FrontendIPConfiguration{
Properties: &sdknetwork.FrontendIPConfigurationPropertiesFormat{
PublicIPAddress: &sdknetwork.PublicIPAddress{
ID: ptr.To("[resourceId('Microsoft.Network/publicIPAddresses', '" + m.doc.OpenShiftCluster.Properties.InfraID + "-pip-v4')]"),
ID: pointerutils.ToPtr("[resourceId('Microsoft.Network/publicIPAddresses', '" + m.doc.OpenShiftCluster.Properties.InfraID + "-pip-v4')]"),
},
},
Name: ptr.To("public-lb-ip-v4"),
Name: pointerutils.ToPtr("public-lb-ip-v4"),
})

lb.Properties.LoadBalancingRules = append(lb.Properties.LoadBalancingRules, &sdknetwork.LoadBalancingRule{
Properties: &sdknetwork.LoadBalancingRulePropertiesFormat{
FrontendIPConfiguration: &sdknetwork.SubResource{
ID: ptr.To(fmt.Sprintf("[resourceId('Microsoft.Network/loadBalancers/frontendIPConfigurations', '%s', 'public-lb-ip-v4')]", m.doc.OpenShiftCluster.Properties.InfraID)),
ID: pointerutils.ToPtr(fmt.Sprintf("[resourceId('Microsoft.Network/loadBalancers/frontendIPConfigurations', '%s', 'public-lb-ip-v4')]", m.doc.OpenShiftCluster.Properties.InfraID)),
},
BackendAddressPool: &sdknetwork.SubResource{
ID: ptr.To(fmt.Sprintf("[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', '%s', '%[1]s')]", m.doc.OpenShiftCluster.Properties.InfraID)),
ID: pointerutils.ToPtr(fmt.Sprintf("[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', '%s', '%[1]s')]", m.doc.OpenShiftCluster.Properties.InfraID)),
},
Probe: &sdknetwork.SubResource{
ID: ptr.To(fmt.Sprintf("[resourceId('Microsoft.Network/loadBalancers/probes', '%s', 'api-internal-probe')]", m.doc.OpenShiftCluster.Properties.InfraID)),
ID: pointerutils.ToPtr(fmt.Sprintf("[resourceId('Microsoft.Network/loadBalancers/probes', '%s', 'api-internal-probe')]", m.doc.OpenShiftCluster.Properties.InfraID)),
},
Protocol: ptr.To(sdknetwork.TransportProtocolTCP),
LoadDistribution: ptr.To(sdknetwork.LoadDistributionDefault),
FrontendPort: ptr.To(int32(6443)),
BackendPort: ptr.To(int32(6443)),
IdleTimeoutInMinutes: ptr.To(int32(30)),
DisableOutboundSnat: ptr.To(true),
Protocol: pointerutils.ToPtr(sdknetwork.TransportProtocolTCP),
LoadDistribution: pointerutils.ToPtr(sdknetwork.LoadDistributionDefault),
FrontendPort: pointerutils.ToPtr(int32(6443)),
BackendPort: pointerutils.ToPtr(int32(6443)),
IdleTimeoutInMinutes: pointerutils.ToPtr(int32(30)),
DisableOutboundSnat: pointerutils.ToPtr(true),
},
Name: ptr.To("api-internal-v4"),
Name: pointerutils.ToPtr("api-internal-v4"),
})

lb.Properties.Probes = append(lb.Properties.Probes, &sdknetwork.Probe{
Properties: &sdknetwork.ProbePropertiesFormat{
Protocol: ptr.To(sdknetwork.ProbeProtocolHTTPS),
Port: ptr.To(int32(6443)),
IntervalInSeconds: ptr.To(int32(5)),
NumberOfProbes: ptr.To(int32(2)),
RequestPath: ptr.To("/readyz"),
Protocol: pointerutils.ToPtr(sdknetwork.ProbeProtocolHTTPS),
Port: pointerutils.ToPtr(int32(6443)),
IntervalInSeconds: pointerutils.ToPtr(int32(5)),
NumberOfProbes: pointerutils.ToPtr(int32(2)),
RequestPath: pointerutils.ToPtr("/readyz"),
},
Name: ptr.To("api-internal-probe"),
Name: pointerutils.ToPtr("api-internal-probe"),
})
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/cluster/ipaddresses.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ import (
"github.com/Azure/go-autorest/autorest/to"
"github.com/apparentlymart/go-cidr/cidr"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/utils/ptr"

"github.com/Azure/ARO-RP/pkg/api"
"github.com/Azure/ARO-RP/pkg/database/cosmosdb"
"github.com/Azure/ARO-RP/pkg/env"
"github.com/Azure/ARO-RP/pkg/util/installer"
"github.com/Azure/ARO-RP/pkg/util/pointerutils"
"github.com/Azure/ARO-RP/pkg/util/stringutils"
)

Expand Down Expand Up @@ -275,7 +275,7 @@ func (m *manager) ensureGatewayCreate(ctx context.Context) error {

resourceGroup := stringutils.LastTokenByte(m.doc.OpenShiftCluster.Properties.ClusterProfile.ResourceGroupID, '/')

pe, err := m.armPrivateEndpoints.Get(ctx, resourceGroup, infraID+"-pe", &armnetwork.PrivateEndpointsClientGetOptions{Expand: ptr.To("networkInterfaces")})
pe, err := m.armPrivateEndpoints.Get(ctx, resourceGroup, infraID+"-pe", &armnetwork.PrivateEndpointsClientGetOptions{Expand: pointerutils.ToPtr("networkInterfaces")})
if err != nil {
return err
}
Expand Down
8 changes: 4 additions & 4 deletions pkg/cluster/loadbalancerprofile.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"strings"

sdknetwork "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2"
"k8s.io/utils/ptr"

"github.com/Azure/ARO-RP/pkg/api"
"github.com/Azure/ARO-RP/pkg/util/pointerutils"
"github.com/Azure/ARO-RP/pkg/util/stringutils"
"github.com/Azure/ARO-RP/pkg/util/uuid"
)
Expand Down Expand Up @@ -427,11 +427,11 @@ func newPublicIPAddress(name, resourceID, location string) sdknetwork.PublicIPAd
ID: &resourceID,
Location: &location,
Properties: &sdknetwork.PublicIPAddressPropertiesFormat{
PublicIPAllocationMethod: ptr.To(sdknetwork.IPAllocationMethodStatic),
PublicIPAddressVersion: ptr.To(sdknetwork.IPVersionIPv4),
PublicIPAllocationMethod: pointerutils.ToPtr(sdknetwork.IPAllocationMethodStatic),
PublicIPAddressVersion: pointerutils.ToPtr(sdknetwork.IPVersionIPv4),
},
SKU: &sdknetwork.PublicIPAddressSKU{
Name: ptr.To(sdknetwork.PublicIPAddressSKUNameStandard),
Name: pointerutils.ToPtr(sdknetwork.PublicIPAddressSKUNameStandard),
},
}
}
Expand Down
87 changes: 43 additions & 44 deletions pkg/deploy/devconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ import (
"encoding/pem"
"os"

"k8s.io/utils/ptr"

"github.com/Azure/ARO-RP/pkg/env"
"github.com/Azure/ARO-RP/pkg/util/pointerutils"
"github.com/Azure/ARO-RP/pkg/util/version"
)

Expand Down Expand Up @@ -108,32 +107,32 @@ func DevConfig(_env env.Core) (*Config, error) {
RPResourceGroupName: azureUniquePrefix + "-aro-" + _env.Location(),
Configuration: &Configuration{
AzureCloudName: &_env.Environment().ActualCloudName,
DatabaseAccountName: ptr.To(azureUniquePrefix + "-aro-" + _env.Location()),
DatabaseAccountName: pointerutils.ToPtr(azureUniquePrefix + "-aro-" + _env.Location()),
KeyvaultDNSSuffix: &_env.Environment().KeyVaultDNSSuffix,
KeyvaultPrefix: &keyvaultPrefix,
OIDCStorageAccountName: ptr.To(oidcStorageAccountName),
OIDCStorageAccountName: pointerutils.ToPtr(oidcStorageAccountName),
},
},
},
Configuration: &Configuration{
ACRResourceID: ptr.To("/subscriptions/" + _env.SubscriptionID() + "/resourceGroups/" + azureUniquePrefix + "-global/providers/Microsoft.ContainerRegistry/registries/" + azureUniquePrefix + "aro"),
AdminAPICABundle: ptr.To(string(pem.EncodeToMemory(&pem.Block{Type: "CERTIFICATE", Bytes: ca}))),
ACRResourceID: pointerutils.ToPtr("/subscriptions/" + _env.SubscriptionID() + "/resourceGroups/" + azureUniquePrefix + "-global/providers/Microsoft.ContainerRegistry/registries/" + azureUniquePrefix + "aro"),
AdminAPICABundle: pointerutils.ToPtr(string(pem.EncodeToMemory(&pem.Block{Type: "CERTIFICATE", Bytes: ca}))),
AdminAPIClientCertCommonName: &clientCert.Subject.CommonName,
ARMAPICABundle: ptr.To(string(pem.EncodeToMemory(&pem.Block{Type: "CERTIFICATE", Bytes: ca}))),
ARMAPICABundle: pointerutils.ToPtr(string(pem.EncodeToMemory(&pem.Block{Type: "CERTIFICATE", Bytes: ca}))),
ARMAPIClientCertCommonName: &clientCert.Subject.CommonName,
ARMClientID: ptr.To(os.Getenv("AZURE_ARM_CLIENT_ID")),
AzureSecPackVSATenantId: ptr.To(""),
ClusterMDMAccount: ptr.To(version.DevClusterGenevaMetricsAccount),
ClusterMDSDAccount: ptr.To(version.DevClusterGenevaLoggingAccount),
ClusterMDSDConfigVersion: ptr.To(version.DevClusterGenevaLoggingConfigVersion),
ClusterMDSDNamespace: ptr.To(version.DevClusterGenevaLoggingNamespace),
ClusterParentDomainName: ptr.To(azureUniquePrefix + "-clusters." + os.Getenv("PARENT_DOMAIN_NAME")),
ARMClientID: pointerutils.ToPtr(os.Getenv("AZURE_ARM_CLIENT_ID")),
AzureSecPackVSATenantId: pointerutils.ToPtr(""),
ClusterMDMAccount: pointerutils.ToPtr(version.DevClusterGenevaMetricsAccount),
ClusterMDSDAccount: pointerutils.ToPtr(version.DevClusterGenevaLoggingAccount),
ClusterMDSDConfigVersion: pointerutils.ToPtr(version.DevClusterGenevaLoggingConfigVersion),
ClusterMDSDNamespace: pointerutils.ToPtr(version.DevClusterGenevaLoggingNamespace),
ClusterParentDomainName: pointerutils.ToPtr(azureUniquePrefix + "-clusters." + os.Getenv("PARENT_DOMAIN_NAME")),
CosmosDB: &CosmosDBConfiguration{
StandardProvisionedThroughput: 1000,
PortalProvisionedThroughput: 400,
GatewayProvisionedThroughput: 400,
},
DisableCosmosDBFirewall: ptr.To(true),
DisableCosmosDBFirewall: pointerutils.ToPtr(true),
ExtraClusterKeyvaultAccessPolicies: []interface{}{
adminKeyvaultAccessPolicy(_env),
},
Expand All @@ -148,9 +147,9 @@ func DevConfig(_env env.Core) (*Config, error) {
adminKeyvaultAccessPolicy(_env),
deployKeyvaultAccessPolicy(_env),
},
FluentbitImage: ptr.To(version.FluentbitImage(azureUniquePrefix + "aro." + _env.Environment().ContainerRegistryDNSSuffix)),
FPClientID: ptr.To(os.Getenv("AZURE_FP_CLIENT_ID")),
FPServicePrincipalID: ptr.To(os.Getenv("AZURE_FP_SERVICE_PRINCIPAL_ID")),
FluentbitImage: pointerutils.ToPtr(version.FluentbitImage(azureUniquePrefix + "aro." + _env.Environment().ContainerRegistryDNSSuffix)),
FPClientID: pointerutils.ToPtr(os.Getenv("AZURE_FP_CLIENT_ID")),
FPServicePrincipalID: pointerutils.ToPtr(os.Getenv("AZURE_FP_SERVICE_PRINCIPAL_ID")),
GatewayDomains: []string{
"eastus-shared.ppe.warm.ingest.monitor.core.windows.net",
"gcs.ppe.monitoring.core.windows.net",
Expand All @@ -164,22 +163,22 @@ func DevConfig(_env env.Core) (*Config, error) {
"qos.ppe.warm.ingest.monitor.core.windows.net",
"test1.diagnostics.monitoring.core.windows.net",
},
GatewayMDSDConfigVersion: ptr.To(version.DevGatewayGenevaLoggingConfigVersion),
GatewayVMSSCapacity: ptr.To(1),
GlobalResourceGroupLocation: ptr.To(_env.Location()),
GlobalResourceGroupName: ptr.To(azureUniquePrefix + "-global"),
GlobalSubscriptionID: ptr.To(_env.SubscriptionID()),
MDMFrontendURL: ptr.To("https://global.ppe.microsoftmetrics.com/"),
MDSDEnvironment: ptr.To(version.DevGenevaLoggingEnvironment),
MsiRpEndpoint: ptr.To("https://iamaplaceholder.com"),
GatewayMDSDConfigVersion: pointerutils.ToPtr(version.DevGatewayGenevaLoggingConfigVersion),
GatewayVMSSCapacity: pointerutils.ToPtr(1),
GlobalResourceGroupLocation: pointerutils.ToPtr(_env.Location()),
GlobalResourceGroupName: pointerutils.ToPtr(azureUniquePrefix + "-global"),
GlobalSubscriptionID: pointerutils.ToPtr(_env.SubscriptionID()),
MDMFrontendURL: pointerutils.ToPtr("https://global.ppe.microsoftmetrics.com/"),
MDSDEnvironment: pointerutils.ToPtr(version.DevGenevaLoggingEnvironment),
MsiRpEndpoint: pointerutils.ToPtr("https://iamaplaceholder.com"),
PortalAccessGroupIDs: []string{
os.Getenv("AZURE_PORTAL_ACCESS_GROUP_IDS"),
},
PortalClientID: ptr.To(os.Getenv("AZURE_PORTAL_CLIENT_ID")),
PortalClientID: pointerutils.ToPtr(os.Getenv("AZURE_PORTAL_CLIENT_ID")),
PortalElevatedGroupIDs: []string{
os.Getenv("AZURE_PORTAL_ELEVATED_GROUP_IDS"),
},
AzureSecPackQualysUrl: ptr.To(""),
AzureSecPackQualysUrl: pointerutils.ToPtr(""),
RPFeatures: []string{
"DisableDenyAssignments",
"DisableSignedCertificates",
Expand All @@ -191,24 +190,24 @@ func DevConfig(_env env.Core) (*Config, error) {
"UseMockMsiRp",
},
// TODO update this to support FF
RPImagePrefix: ptr.To(azureUniquePrefix + "aro.azurecr.io/aro"),
RPMDMAccount: ptr.To(version.DevRPGenevaMetricsAccount),
RPMDSDAccount: ptr.To(version.DevRPGenevaLoggingAccount),
RPMDSDConfigVersion: ptr.To(version.DevRPGenevaLoggingConfigVersion),
RPMDSDNamespace: ptr.To(version.DevRPGenevaLoggingNamespace),
RPParentDomainName: ptr.To(azureUniquePrefix + "-rp." + os.Getenv("PARENT_DOMAIN_NAME")),
RPVersionStorageAccountName: ptr.To(azureUniquePrefix + "rpversion"),
RPVMSSCapacity: ptr.To(1),
SSHPublicKey: ptr.To(string(sshPublicKey)),
SubscriptionResourceGroupLocation: ptr.To(_env.Location()),
SubscriptionResourceGroupName: ptr.To(azureUniquePrefix + "-subscription"),
VMSSCleanupEnabled: ptr.To(true),
VMSize: ptr.To("Standard_D2s_v3"),
RPImagePrefix: pointerutils.ToPtr(azureUniquePrefix + "aro.azurecr.io/aro"),
RPMDMAccount: pointerutils.ToPtr(version.DevRPGenevaMetricsAccount),
RPMDSDAccount: pointerutils.ToPtr(version.DevRPGenevaLoggingAccount),
RPMDSDConfigVersion: pointerutils.ToPtr(version.DevRPGenevaLoggingConfigVersion),
RPMDSDNamespace: pointerutils.ToPtr(version.DevRPGenevaLoggingNamespace),
RPParentDomainName: pointerutils.ToPtr(azureUniquePrefix + "-rp." + os.Getenv("PARENT_DOMAIN_NAME")),
RPVersionStorageAccountName: pointerutils.ToPtr(azureUniquePrefix + "rpversion"),
RPVMSSCapacity: pointerutils.ToPtr(1),
SSHPublicKey: pointerutils.ToPtr(string(sshPublicKey)),
SubscriptionResourceGroupLocation: pointerutils.ToPtr(_env.Location()),
SubscriptionResourceGroupName: pointerutils.ToPtr(azureUniquePrefix + "-subscription"),
VMSSCleanupEnabled: pointerutils.ToPtr(true),
VMSize: pointerutils.ToPtr("Standard_D2s_v3"),

// TODO: Replace with Live Service Configuration in KeyVault
InstallViaHive: ptr.To(os.Getenv("ARO_INSTALL_VIA_HIVE")),
DefaultInstallerPullspec: ptr.To(os.Getenv("ARO_HIVE_DEFAULT_INSTALLER_PULLSPEC")),
AdoptByHive: ptr.To(os.Getenv("ARO_ADOPT_BY_HIVE")),
InstallViaHive: pointerutils.ToPtr(os.Getenv("ARO_INSTALL_VIA_HIVE")),
DefaultInstallerPullspec: pointerutils.ToPtr(os.Getenv("ARO_HIVE_DEFAULT_INSTALLER_PULLSPEC")),
AdoptByHive: pointerutils.ToPtr(os.Getenv("ARO_ADOPT_BY_HIVE")),
},
}, nil
}
Loading

0 comments on commit 7847b01

Please sign in to comment.