Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Azure Cloud configurable for director blobstore #2552

Merged
merged 2 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions jobs/director/spec
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,9 @@ properties:
description: container_name of azure storage account
blobstore.account_key:
description: account_key of azure storage account
blobstore.azure_cloud_name:
description: Name of the Azure Cloud
default: AzureCloud
blobstore.swift_auth_account:
description: swift_auth_account of swift storage account
blobstore.swift_temp_url_key:
Expand Down
1 change: 1 addition & 0 deletions jobs/director/templates/director.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ elsif p('blobstore.provider') == 'gcs'
end
elsif p('blobstore.provider') == 'azure-storage'
blobstore_options = {
'azure_cloud_name' => p('blobstore.azure_cloud_name'),
'account_name' => p('blobstore.account_name'),
'container_name' => p('blobstore.container_name'),
'account_key' => p('blobstore.account_key'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ class AzurestoragecliBlobstoreClient < BaseClient
# key that is applied before the object is sent to azure storage account
# @option options [Symbol, optional] account_key
# @option options [Symbol, optional] container_name
# @option options [Symbol, optional] azure_cloud_name
# Azure Cloud Name to use for azure storage account
# @option options [Symbol] azure_storage_cli_path
# path to azure-storage-cli binary
# @option options [Symbol, optional] azure_storage_cli_config_path
Expand All @@ -29,7 +31,8 @@ def initialize(options)
@azure_storage_cli_options = {
"account_name": @options[:account_name],
"container_name": @options[:container_name],
"account_key": @options[:account_key]
"account_key": @options[:account_key],
"environment": @options[:azure_cloud_name]
}

@azure_storage_cli_options.reject! { |_k, v| v.nil? }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ module Bosh::Blobstore
container_name: 'test',
account_name: 'NAME',
account_key: 'SECRET',
azure_cloud_name: 'foo-cloud',
azure_storage_cli_path: '/var/vcap/packages/azure-storage-cli/bin/azure-storage-cli',
}
end
Expand All @@ -37,7 +38,8 @@ module Bosh::Blobstore
{
'container_name' => 'test',
'account_name' => 'NAME',
'account_key' => 'SECRET'
'account_key' => 'SECRET',
'environment' => 'foo-cloud',
}
end
let(:stored_config_file) { File.new(expected_config_file).readlines }
Expand Down
Loading