зеркало из https://github.com/Azure/ARO-RP.git
ARO-4373 resolve comments and parameter fixes
This commit is contained in:
Родитель
17805e9120
Коммит
42daa82815
|
@ -68,6 +68,12 @@ func rp(ctx context.Context, log, audit *logrus.Entry) error {
|
|||
}
|
||||
}
|
||||
|
||||
if !_env.FeatureIsSet(env.FeatureRequireOIDCStorageWebEndpoint) {
|
||||
if err := env.ValidateVars(env.OIDCAFDEndpoint); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if err = env.ValidateVars(keys...); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -102,7 +102,7 @@ deploy_oic_for_dedicated_rp() {
|
|||
"rpServicePrincipalId=$(az identity show -g $RESOURCEGROUP -n aro-rp-$LOCATION | jq -r '.["principalId"]')" \
|
||||
"oidcStorageAccountName=$(yq '.rps[].configuration.oidcStorageAccountName' dev-config.yaml)" >/dev/null
|
||||
echo "########## Enabling Static Website for OIDC storage account in RG $RESOURCEGROUP ##########"
|
||||
az storage blob service-properties update --static-website true --account-name ${yq '.rps[].configuration.oidcStorageAccountName' dev-config.yaml} --auth-mode login >/dev/null
|
||||
az storage blob service-properties update --static-website true --account-name $(yq '.rps[].configuration.oidcStorageAccountName' dev-config.yaml) --auth-mode login >/dev/null
|
||||
}
|
||||
|
||||
deploy_env_dev_override() {
|
||||
|
|
|
@ -117,6 +117,9 @@
|
|||
"westus"
|
||||
]
|
||||
},
|
||||
"oidcStorageAccountName": {
|
||||
"value": ""
|
||||
},
|
||||
"portalAccessGroupIds": {
|
||||
"value": ""
|
||||
},
|
||||
|
|
|
@ -140,6 +140,9 @@
|
|||
"westus"
|
||||
]
|
||||
},
|
||||
"oidcStorageAccountName": {
|
||||
"type": "string"
|
||||
},
|
||||
"portalAccessGroupIds": {
|
||||
"type": "string"
|
||||
},
|
||||
|
|
|
@ -15,8 +15,6 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
// Storage accounts must not contain dashes or be more than 24 characters
|
||||
// Append "oic" to the pre-existing storage account prefix.
|
||||
storageAccountName string = "parameters('oidcStorageAccountName')"
|
||||
resourceTypeStorageAccount string = "Microsoft.Storage/storageAccounts"
|
||||
)
|
||||
|
|
|
@ -76,6 +76,7 @@ func (g *generator) rpTemplate() *arm.Template {
|
|||
"vmSize",
|
||||
"vmssCleanupEnabled",
|
||||
"vmssName",
|
||||
"oidcStorageAccountName",
|
||||
|
||||
// TODO: Replace with Live Service Configuration in KeyVault
|
||||
"clustersInstallViaHive",
|
||||
|
|
|
@ -209,12 +209,6 @@ func newProd(ctx context.Context, log *logrus.Entry, component ServiceComponent)
|
|||
return nil, err
|
||||
}
|
||||
|
||||
if !p.FeatureIsSet(FeatureRequireOIDCStorageWebEndpoint) {
|
||||
if err := ValidateVars(OIDCAFDEndpoint); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
p.ARMHelper, err = newARMHelper(ctx, log, p)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
|
@ -45,7 +45,7 @@ func (m *manager) GetAZBlobClient(blobContainerURL string, options *azblob.Clien
|
|||
|
||||
type AZBlobClient interface {
|
||||
UploadBuffer(ctx context.Context, containerName string, blobName string, buffer []byte) error
|
||||
DeleteBlob(ctx context.Context, containerName string, directoryName string) error
|
||||
DeleteBlob(ctx context.Context, containerName string, blobName string) error
|
||||
}
|
||||
|
||||
type azBlobClient struct {
|
||||
|
@ -65,7 +65,7 @@ func (azBlobClient *azBlobClient) UploadBuffer(ctx context.Context, containerNam
|
|||
return err
|
||||
}
|
||||
|
||||
func (azBlobClient *azBlobClient) DeleteBlob(ctx context.Context, containerName string, directoryName string) error {
|
||||
_, err := azBlobClient.client.DeleteBlob(ctx, containerName, directoryName, &azblob.DeleteBlobOptions{})
|
||||
func (azBlobClient *azBlobClient) DeleteBlob(ctx context.Context, containerName string, blobName string) error {
|
||||
_, err := azBlobClient.client.DeleteBlob(ctx, containerName, blobName, &azblob.DeleteBlobOptions{})
|
||||
return err
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче